Last active
August 29, 2015 14:00
-
-
Save bradhe/11126047 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 TABLE facts ( | |
dimension1 STRING, | |
dimension3 STRING, | |
dimension4 STRING, | |
timestamp2 TIMESTAMP, | |
measure1 DECIMAL, | |
measure2 DECIMAL, | |
measure3 DECIMAL | |
) PARTITIONED BY(dimension2 STRING, timestamp1 TIMESTAMP) | |
CLUSTERED BY(dimension1) INTO 32 BUCKETS; |
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
INSERT INTO TABLE facts PARTITION (dimension2, timestamp1) SELECT dimension1, dimension3, dimension4, timestamp2, measure1, measure2, measure3 FROM raw_facts; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment