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?

asked 3 years ago1470 views
1 Answer
0
Accepted Answer

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
answered 3 years 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