我正在使用qubole来运行presto查询。
我需要上传一个csv文件到我的查询,但无法知道如何做到这一点。
有人有这方面的经验吗?
关于更多细节,我在分析部分。


这就是我到目前为止基于左撇子的回答-
use adhoc;
create external table adhoc.test(
Media_Buy_Key string,
Day string,
DSP_Publisher string,
Final_Media_Cost string
)
row format delimited
fields terminated by ','
lines terminated by '\n'
location 's3://bucket/folder/folder/file.csv/';然后我运行蜂巢查询,它会以[Empty]的形式出现
这就是我的s3桶的样子:

发布于 2018-08-27 17:19:57
Presto利用蜂巢亚稳态来获取表格信息和数据定位。
s3://your-bucket-name/your-location/yourfile.csv的位置是s3://your-bucket-name/your-location。如果文件已在s3中,则可以使用aws s3 cp命令将其复制到新位置。use your_schema; create external table test( col1 string, col2 string, ... coln type ) row format delimited fields terminated by ',' lines terminated by '\n' location 's3://your-bucket-name/your-location/';检查它在蜂巢中的工作情况:
select * from your_schema.test limit 10;select * from your_schema.test limit 10;
https://stackoverflow.com/questions/52042200
复制相似问题