我已经以这样的配置单元格式将分区数据存储在 s3 中。
/bucket/year=2017/month=02/date=20
/bucket/year=2017/month=02/date=21
我在 Athena 中创建了一个外部表
CREATE EXTERNAL TABLE mts_prod_8(
event struct<type:string, id:string>,
longitude double,
application string,
latitude double,
device_id string,
trip_id string
)
PARTITIONED BY (year string, month string, date string)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
WITH SERDEPROPERTIES ('serialization.format' = '1') LOCATION 's3://mts-data/dispatcher/'
每天都会在 s3 中添加新分区并将其加载到 athena 表中,我运行以下查询
MSCK REPAIR TABLE TABLE_NAME
但不知何故,上面的查询失败了,元数据没有被加载。
我完全陷入其中。
任何帮助都会得到帮助。
提前致谢