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?

已提问 3 年前1511 查看次数
1 回答
0
已接受的回答

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
已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则