Created
February 15, 2022 08:20
-
-
Save tssandor/5027328511bf9757ae2055426a211fb9 to your computer and use it in GitHub Desktop.
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 <your-dbname>.<table-name> ( | |
`device_id` string, | |
`id_type` string, | |
`latitude` float, | |
`longitude` float, | |
`horizontal_accuracy` float, | |
`timestamp` bigint, | |
`ip_address` string, | |
`device_os` string, | |
`os_version` string, | |
`user_agent` string, | |
`country_code` string, | |
`source_id` string, | |
`publisherid` string, | |
`app_id` string, | |
`location_context` string, | |
`geohash` string) | |
PARTITIONED BY ( | |
`year` int, | |
`month` int, | |
`day` int) | |
ROW FORMAT DELIMITED | |
FIELDS TERMINATED BY ',' | |
STORED AS INPUTFORMAT | |
'org.apache.hadoop.mapred.TextInputFormat' | |
OUTPUTFORMAT | |
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' | |
LOCATION 's3://<your-s3-bucket-name>/' | |
TBLPROPERTIES ( | |
'has_encrypted_data'='false', | |
'parquet.compression'='GZIP') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment