Created
May 10, 2017 20:58
-
-
Save reecestart/000985367a80d0c965e0430a0f87c8a7 to your computer and use it in GitHub Desktop.
Create Athena Table for CSVs
This file contains hidden or 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 athenadatabaseforcsvs.athenatableforcsvs ( | |
aws_account_id string, | |
name string, | |
email string, | |
status string, | |
category string, | |
description string, | |
refreshed string, | |
processed string, | |
flagged string, | |
percent_flagged string, | |
ta_proposed_actions string | |
) | |
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde' | |
WITH SERDEPROPERTIES ( | |
'separatorChar' = ',', | |
'quoteChar' = '\"', | |
'escapeChar' = '\\' | |
) | |
STORED AS TEXTFILE | |
LOCATION 's3://bucket-with-csvs/'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment