AWS Athena query returns results in incorrect format when query is run again

可紊 提交于 2020-07-09 04:30:09

问题


The first time I ran the query, it returned 2 rows with columns names. I edited the table and added skip.header.line.count - 1 and reran(First time), but it returned same result with double inverted commas. Then reran again(Second time), and this changed everything.

First time Query run output: https://i.stack.imgur.com/k6T2O.png

Second time Query run output: https://i.stack.imgur.com/6Cxrf.png


回答1:


The problem is that output files from Amazon Athena are being mixed-in with your source files.

To fix it, go to the Athena console and click Settings.

Then, change the Query result location to a different location that does not point to the location where you are storing the source data files.

The Query result location is where Athena stores the output of queries, in case you need the results again or want to use them as input to future queries.



来源:https://stackoverflow.com/questions/62494792/aws-athena-query-returns-results-in-incorrect-format-when-query-is-run-again

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!