Amazon Athena query outputting all columns in the csv as VARCHARs

0

A customer wants to join two AWS Glue generated tables via Athena. The Athena query CSV result is crawled, creating a new table in the data catalog. Whenever Athena is generating a CSV output that has all VARCHAR columns which have double quotes on the values, even the ones that are not supposed to be a VARCHAR. All of the columns have double quotes; how do you remove the double quotes so the Glue crawler can detect the proper data type?

Is there a way to fix this?

posta 3 anni fa1511 visualizzazioni
1 Risposta
0
Risposta accettata

To have a Glue Crawler use OpenCSVSerDe you can use a custom CSV classifier, specify Double-quote(") in the quote symbol and select Trim whitespace before identifying column names.

AWS
Matt_M
con risposta 3 anni 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