CREATE TRANSIENT TABLE dim_user (
    -- Primary identifiers
    user_id NUMBER PRIMARY KEY
    , user_uid VARCHAR(255) UNIQUE
    , clerk_id VARCHAR(255) UNIQUE

    -- Account information
    , email VARCHAR(255)
    , phone_number VARCHAR(255)
    , handle VARCHAR(255)
    , display_name VARCHAR(255)

    -- User metadata
    , user_joined_at TIMESTAMP_NTZ(9)
    , registered_platform VARCHAR(255)
    , signup_country VARCHAR(255)
    , recent_country VARCHAR(255)
    , recent_city VARCHAR(255)
    , birthday VARCHAR(255)
    , is_staff BOOLEAN

    -- Subscription information
    , has_active_subscription BOOLEAN
    , current_subscription_tier VARCHAR(255)
    , stripe_customer_id VARCHAR(255)
    , stripe_subscription_id VARCHAR(255)
    , revcat_customer_id VARCHAR(255)
    , revcat_subscription_id VARCHAR(255)
    , p_date VARCHAR(255)
    , is_deleted BOOLEAN
)
COMMENT = 'Table contains user information';
