Last active
July 13, 2017 13:33
-
-
Save julienba/dae4b76d5870986e1b22b75fa1c5eed4 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 checkins ( | |
id int | |
user_id int, | |
venue_id int, | |
date timestamp | |
) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/checkins' | |
CREATE EXTERNAL TABLE IF NOT EXISTS categories ( | |
id int, | |
name string) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/categories' | |
CREATE EXTERNAL TABLE IF NOT EXISTS users ( | |
id int, | |
name string, | |
last_login timestamp, | |
password string) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/users' | |
CREATE EXTERNAL TABLE IF NOT EXISTS venues ( | |
id int, | |
name string, | |
latitude float, | |
longitude float, | |
price int, | |
category_id int) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/venues' | |
CREATE EXTERNAL TABLE IF NOT EXISTS sightings ( | |
id int, | |
city_id int, | |
category_id int, | |
timestamp bigint) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/tupac/sightings' | |
CREATE EXTERNAL TABLE IF NOT EXISTS incidents ( | |
id int, | |
severity int, | |
timestamp bigint) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/toucan/incidents' | |
CREATE EXTERNAL TABLE IF NOT EXISTS urls ( | |
id int, | |
url string) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/urls' | |
CREATE EXTERNAL TABLE IF NOT EXISTS places ( | |
id int, | |
liked boolean, | |
name string) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/places' | |
CREATE EXTERNAL TABLE IF NOT EXISTS cities ( | |
id int, | |
name string, | |
latitude float, | |
longitude float) | |
ROW FORMAT SERDE | |
'org.openx.data.jsonserde.JsonSerDe' | |
LOCATION | |
's3://YOUR_BUCKET/tupac/cities' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment