Skip to content

Instantly share code, notes, and snippets.

@goduncan
Created January 8, 2017 12:34
Show Gist options
  • Save goduncan/627c595bccb13f5505ccf83b80b40931 to your computer and use it in GitHub Desktop.
Save goduncan/627c595bccb13f5505ccf83b80b40931 to your computer and use it in GitHub Desktop.
Create New Flow Logs table
CREATE EXTERNAL TABLE IF NOT EXISTS goduncan.flow_logs (
src string,
spt int,
dst string,
dpt int,
proto int,
start_time bigint,
end_time bigint,
out_bytes bigint
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'serialization.format' = ',',
'field.delim' = ',',
'collection.delim' = 'undefined',
'mapkey.delim' = 'undefined'
) LOCATION 'your.s3.bucket.com'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment