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
asked a year ago192 views
1 Answer
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions