'AWS Athena change ouput config to return an actual csv file, python dictionary or list?

I have some parquet files setup in AWS Athena to query. the table has the following fields: name, type, value

I use the following query: SELECT value from <table> WHERE name LIKE <condition>;

The s3 output location for the query saves a .csv file, however it looks like this:

"value"
"127.1.1.1"
"888.1.2.3"

It looks like the output is newline delimited \n and not comma delimited. I'd like to turn the output into a standard python dictionary or list.

I know how to do this using read/write operations, but I was wondering if there's some output config I can change on the AWS Athena end to get it done without the need for post-processing the output.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source