我试图了解如何使用 s3 库存。我正在关注本教程
将库存清单加载到我的表中后,我试图查询它并发现两个问题。
1)SELECT key, size FROM table;
所有记录的大小列显示一个幻数(值)4923069104295859283
2)select * from table;
查询编号:cf07c309-c685-4bf4-9705-8bca69b00b3c。
接收错误:
HIVE_BAD_DATA: Field size's type LONG in ORC is incompatible with type varchar defined in table schema
Run Code Online (Sandbox Code Playgroud)
这是我的表架构:
CREATE EXTERNAL TABLE `table`(
`bucket` string,
`key` string,
`version_id` string,
`is_latest` boolean,
`is_delete_marker` boolean,
`size` bigint,
`last_modified_date` timestamp,
`e_tag` string,
`storage_class` string)
PARTITIONED BY (
`dt` string)
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
's3://......../hive'
TBLPROPERTIES (
'transient_lastDdlTime'='1516093603')
Run Code Online (Sandbox Code Playgroud)