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
질문됨 일 년 전215회 조회
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠