Skip to content

Instantly share code, notes, and snippets.

@jdwyah
Created February 17, 2017 18:14
Show Gist options
  • Save jdwyah/7e25f3ca2eba172f46f9a65e338cdc3f to your computer and use it in GitHub Desktop.
Save jdwyah/7e25f3ca2eba172f46f9a65e338cdc3f to your computer and use it in GitHub Desktop.
CREATE TABLE events (
event_guid CHARACTER VARYING(128),
tracking_id CHARACTER VARYING(128),
category CHARACTER VARYING(128) encode TEXT255,
sub_category CHARACTER VARYING(128),
event CHARACTER VARYING(128) encode TEXT255,
event_name CHARACTER VARYING(128) encode TEXT255,
value_decimal NUMERIC(38, 6),
value_string CHARACTER VARYING(255),
created_at TIMESTAMP WITHOUT TIME ZONE,
experiment_result CHARACTER VARYING(128) encode TEXT255,
experiment_test CHARACTER VARYING(128) encode TEXT255,
params_action CHARACTER VARYING(128) encode TEXT255,
params_controller CHARACTER VARYING(128) encode TEXT255,
utm_account CHARACTER VARYING(128) encode TEXT255,
utm_adgroup CHARACTER VARYING(128) encode TEXT255,
utm_campaign CHARACTER VARYING(128) encode TEXT255,
utm_content CHARACTER VARYING(128) encode TEXT255,
utm_medium CHARACTER VARYING(128) encode TEXT255,
utm_source CHARACTER VARYING(128) encode TEXT255,
utm_term CHARACTER VARYING(128) encode TEXT255,
page_interactive BIGINT,
server_response BIGINT,
browser_name CHARACTER VARYING(128) encode TEXT255,
browser_version CHARACTER VARYING(128),
device_name CHARACTER VARYING(128) encode TEXT255,
platform_name CHARACTER VARYING(128) encode TEXT255,
browser_full_version CHARACTER VARYING(128),
language CHARACTER VARYING(128),
user_agent CHARACTER VARYING(512) encode lzo
) distkey (tracking_id)
interleaved sortkey (created_at, event_name, tracking_id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment