Created
September 19, 2017 12:05
-
-
Save rachelannelise/baf566532d7a136323812fa7d22e464f 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 public.tmp_dpl_staging ( | |
-- fields | |
action VARCHAR(256) NOT NULL, | |
apikey VARCHAR(256) NOT NULL, | |
campaign_id VARCHAR(256), | |
display BOOLEAN, | |
display_avail_height INTEGER, | |
display_avail_width INTEGER, | |
display_pixel_depth INTEGER, | |
display_total_height INTEGER, | |
display_total_width INTEGER, | |
engaged_time_inc INTEGER, | |
event_id VARCHAR(64) NOT NULL, | |
flags_is_amp BOOLEAN, | |
ip_city VARCHAR(256), | |
ip_continent VARCHAR(256), | |
ip_country VARCHAR(256), | |
ip_lat VARCHAR(256), | |
ip_lon VARCHAR(256), | |
ip_postal VARCHAR(256), | |
ip_subdivision VARCHAR(256), | |
ip_timezone VARCHAR(256), | |
ip_market_name VARCHAR(256), | |
ip_market_nielsen VARCHAR(256), | |
ip_market_doubleclick VARCHAR(256), | |
metadata BOOLEAN, | |
metadata_authors VARCHAR(MAX), | |
metadata_canonical_url VARCHAR(4096), | |
metadata_custom_metadata VARCHAR(4096), | |
metadata_duration INTEGER, | |
metadata_data_source VARCHAR(8), | |
metadata_full_content_word_count INTEGER, | |
metadata_image_url VARCHAR(4096), | |
metadata_page_type VARCHAR(256), | |
metadata_post_id VARCHAR(4096), | |
metadata_pub_date_tmsp BIGINT, | |
metadata_save_date_tmsp BIGINT, | |
metadata_section VARCHAR(256), | |
metadata_share_urls VARCHAR(MAX), | |
metadata_tags VARCHAR(MAX), | |
metadata_thumb_url VARCHAR(4096), | |
metadata_title VARCHAR(4096), | |
metadata_urls VARCHAR(MAX), | |
ref_category VARCHAR(64), | |
ref_clean VARCHAR(4096), | |
ref_domain VARCHAR(256), | |
ref_fragment VARCHAR(4096), | |
ref_netloc VARCHAR(256), | |
ref_params VARCHAR(4096), | |
ref_path VARCHAR(4096), | |
ref_query VARCHAR(4096), | |
ref_scheme VARCHAR(64), | |
referrer VARCHAR(4096), | |
session BOOLEAN, | |
session_id INTEGER, | |
session_initial_referrer VARCHAR(4096), | |
session_initial_url VARCHAR(4096), | |
session_last_session_timestamp BIGINT, | |
session_timestamp BIGINT, | |
slot BOOLEAN, | |
sref_category VARCHAR(64), | |
sref_clean VARCHAR(4096), | |
sref_domain VARCHAR(256), | |
sref_fragment VARCHAR(4096), | |
sref_netloc VARCHAR(256), | |
sref_params VARCHAR(4096), | |
sref_path VARCHAR(4096), | |
sref_query VARCHAR(4096), | |
sref_scheme VARCHAR(64), | |
surl_clean VARCHAR(4096), | |
surl_domain VARCHAR(256), | |
surl_fragment VARCHAR(4096), | |
surl_netloc VARCHAR(256), | |
surl_params VARCHAR(4096), | |
surl_path VARCHAR(4096), | |
surl_query VARCHAR(4096), | |
surl_scheme VARCHAR(64), | |
timestamp_info BOOLEAN, | |
timestamp_info_nginx_ms BIGINT NOT NULL, | |
timestamp_info_override_ms BIGINT, | |
timestamp_info_pixel_ms BIGINT, | |
ts_action TIMESTAMP, | |
ts_session_current TIMESTAMP, | |
ts_session_last TIMESTAMP, | |
ua_browser VARCHAR(4096), | |
ua_browserversion VARCHAR(4096), | |
ua_device VARCHAR(4096), | |
ua_devicebrand VARCHAR(4096), | |
ua_devicemodel VARCHAR(4096), | |
ua_devicetouchcapable BOOLEAN, | |
ua_devicetype VARCHAR(4096), | |
ua_os VARCHAR(4096), | |
ua_osversion VARCHAR(4096), | |
url VARCHAR(4096), | |
url_clean VARCHAR(4096), | |
url_domain VARCHAR(256), | |
url_fragment VARCHAR(4096), | |
url_netloc VARCHAR(256), | |
url_params VARCHAR(4096), | |
url_path VARCHAR(4096), | |
url_query VARCHAR(4096), | |
url_scheme VARCHAR(64), | |
utm_campaign VARCHAR(256), | |
utm_medium VARCHAR(64), | |
utm_source VARCHAR(64), | |
utm_term VARCHAR(64), | |
utm_content VARCHAR(256), | |
user_agent VARCHAR(4096), | |
version INTEGER, | |
visitor BOOLEAN, | |
visitor_ip VARCHAR(256), | |
visitor_network_id VARCHAR(128), | |
visitor_site_id VARCHAR(128) NOT NULL, | |
-- keys | |
content_key VARCHAR(256), | |
session_content_fact_key VARCHAR(256), | |
session_fact_key VARCHAR(256), | |
--session_detail_key VARCHAR(256), | |
user_key VARCHAR(256), | |
session_key VARCHAR(256) | |
) distkey(session_content_fact_key) sortkey(session_content_fact_key, action); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment