建表
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;
标签:log,s3,aws,int,库表,testlog,year,logs
From: https://blog.51cto.com/yht1990/6362534