Created
April 3, 2019 14:29
-
-
Save jinwook-k/47a6181f26aac73fa72c3cdd6b73eef5 to your computer and use it in GitHub Desktop.
create table account_d
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
( | |
account_id bigint encode bytedict, | |
account_name varchar(100) encode ztsd, | |
account_update_date date, | |
primary key (account_id) | |
) | |
distsyle all | |
sortkey(account_id) | |
; | |
create table campaign_d | |
( | |
account_id bigint encode bytedict, | |
campaign_id bigint encode bytedict, | |
campaign_name varchar(150) encode ztsd, | |
campaign_update_date date, | |
primary key (account_id, campaign_id) | |
) | |
distsyle all | |
sortkey(account_id, campaign_id) | |
; | |
create table campaign_performance_f | |
( | |
performance_date date, | |
account_id bigint encode bytedict, | |
campaign_id bigint encode bytedict, | |
impressions int encode bytedict, | |
clicks int encode bytedict, | |
cost float encode bytedict, | |
load_date date, | |
primary key (performance_date, account_id, campaign_id) | |
) | |
distsyle auto | |
sortkey(performance_date,account_id,campaign_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment