-- RDS_USER_SHARE_ATTRIBUTION table
-- Populated by Glue job rds_to_s3_growth_usershareattribution_hourly_upsert
CREATE TRANSIENT TABLE IF NOT EXISTS {user_share_attribution_table_name} CLUSTER BY (p_date, p_hour) (
    USER_ID NUMBER(38,0), -- User who shared the content
    SHARE_ID VARCHAR(16777216), -- ID of the share
    CONTENT_ID VARCHAR(16777216), -- ID of the content
    CONTENT_TYPE VARCHAR(16777216), -- Type of the content
    SOURCE VARCHAR(16777216), -- Source of the share
    CREATED_AT TIMESTAMP_TZ(9), -- When the share was created
    UPDATED_AT TIMESTAMP_TZ(9), -- When the share was last updated
    P_DATE DATE, -- Partition date
    P_HOUR NUMBER(38,0) -- Partition hour
);

