Created
October 11, 2018 12:49
-
-
Save rioner/3fe310facb152cd9ed1ee114e9f47350 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTERNAL TABLE IF NOT EXISTS データベース名.テーブル名 ( | |
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 | |
) | |
PARTITIONED BY (dt string) | |
ROW FORMAT DELIMITED | |
FIELDS TERMINATED BY ' ' | |
LOCATION 's3://バケット名/AWSLogs/アカウント番号/vpcflowlogs/ap-northeast-1' | |
TBLPROPERTIES ("skip.header.line.count"="1"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment