【发布时间】:2019-04-14 05:20:44
【问题描述】:
此查询按预期工作。
CREATE EXTERNAL TABLE IF NOT EXISTS vpc_flow_logs3 (
version int,
account string,
interfaceid string,
sourceaddress string,
destinationaddress string,
sourceport int,
destinationport int,
protocol int,
numpackets int,
numbytes bigint,
starttime int,
endtime int,
action string,
logstatus string
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ' '
LOCATION 's3://todel162/AWSLogs/XXXXX/vpcflowlogs/us-east-1/'
TBLPROPERTIES ("skip.header.line.count"="1");
但是如果我按照文档中的建议添加分区子句,它不会读取一行。 (虽然表创建成功)
https://docs.aws.amazon.com/athena/latest/ug/vpc-flow-logs.html
换句话说,我无法在 create table 语句中使用此子句来使用分区。
PARTITIONED BY(dt 字符串)
如何为 vpc 流日志创建带有分区的表?
【问题讨论】:
标签: amazon-athena