Created
March 4, 2019 15:02
-
-
Save JoaoCarabetta/739b7047b2e4c66aa7ca245b50def948 to your computer and use it in GitHub Desktop.
Create table from Athena CSV dump
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
-- Delete *.csv.metadata | |
-- aws s3 rm s3://... --recursive --exclude '*.csv' | |
CREATE EXTERNAL TABLE `osm_pems_ids`( | |
`osm_id` bigint COMMENT '', | |
`sensor_id` string COMMENT '', | |
`neigh_level` bigint COMMENT '') | |
ROW FORMAT SERDE | |
'org.apache.hadoop.hive.ql.io.orc.OrcSerde' | |
STORED AS INPUTFORMAT | |
'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' | |
OUTPUTFORMAT | |
'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat' | |
LOCATION | |
's3://athena-fgv/osm_pems/osm_pems_ids/3' | |
TBLPROPERTIES ( | |
'has_encrypted_data'='false') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment