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
posta un anno fa209 visualizzazioni
1 Risposta
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
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande