Athena AWS创建空表
在我的以下 S3 存储桶中,我有 gz
文件,没有包含一列的标题
在 Athena 编辑器中,我运行以下语句
CREATE EXTERNAL TABLE IF NOT EXISTS `access_file_o`.`Access_one` (
`ad_id` string,
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'serialization.format' = ',',
'field.delim' = ','
) LOCATION 's3://ttt.pix/2022/01/01/00/rrrf.log.1-2022_01_01_00_00_06_316845229-i-06877974d15a00d7e.gz/'
TBLPROPERTIES ('has_encrypted_data'='false','compressionType'='gzip');
该文件看起来像
111,
222,
222,
3333,
该表已创建,但是当我
select * from "Access_one"
在那里 查询该表时没有行,只有列名。
请指教
In my following S3 bucket I've gz
file without a header that contains one column
In Athena editor, I run the following statement
CREATE EXTERNAL TABLE IF NOT EXISTS `access_file_o`.`Access_one` (
`ad_id` string,
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'serialization.format' = ',',
'field.delim' = ','
) LOCATION 's3://ttt.pix/2022/01/01/00/rrrf.log.1-2022_01_01_00_00_06_316845229-i-06877974d15a00d7e.gz/'
TBLPROPERTIES ('has_encrypted_data'='false','compressionType'='gzip');
The file looks like that
111,
222,
222,
3333,
The table has been created but when I query this table
select * from "Access_one"
there are no rows, only columns name.
Please advice
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该位置应该是文件夹而不是文件
此 URI 运行良好
,但返回一个空表。
The location should be folder and not file
This URI working well
While this one returns an empty table.