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
feita há um ano210 visualizações
1 Resposta
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
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas