0
点赞
收藏
分享

微信扫一扫

aws athena创建库表读取s3数据并查询

建表

CREATE EXTERNAL TABLE testlogdb.testlog(
 `date` string, 
 `log`  string
)
PARTITIONED BY (year int,month int,day int)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES ('ignore.malformed.json'='true')
LOCATION 's3://fluent-bit-s3-gj/fluentbit-logs/test-log/'

运行repair分区

MSCK REPAIR TABLE default.test_logs;

查询

SELECT * FROM "testlogdb"."testlog" where log like '%"uid":"105470271911"%' and year=2023 and month=5 and day=24;

举报

相关推荐

0 条评论