CSV file downloaded from QuickSight has extra single quotes when string starts with hyphens

0

Hi,

I'm creating a dashboard for operators to download the athena query results. The ID column values contain hyphens - and

For example, if table contains the following data

idname
-xyzFirst example
a-b-cSecond example

The generated csv contains a extra single quote in the id column at the first row

"id","name"
"'-xyz","First example"
"a-b-c","Second example"

Is there any way to avoid it?

hota
質問済み 1年前210ビュー
1回答
0

The single quote in front of the hyphen is intentional to escape the character when the file is opened using excel. If there is no single quote, the cell would have an error in excel when the data is opened. Here is a workaround if you don't want the single quote.

  1. Create a calculated field in QuickSight (use this link - https://docs.aws.amazon.com/quicksight/latest/user/adding-a-calculated-field-analysis.html)
  2. Use the concat function to add a space in front of the id field for e.g., concat(' ',id) then use this calculated field for your output.
AWS
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ