Skip to content

Conversation

@osipovartem
Copy link
Contributor

@osipovartem osipovartem commented Jan 3, 2025

  • added convert_timezone stub to unblock sql queries
  • added additional logic to fix table names
CREATE OR REPLACE TABLE snowplow_web_base_sessions_lifecycle_manifest AS (SELECT * FROM (WITH new_events_session_ids_init AS (SELECT COALESCE(e.domain_sessionid, NULL) AS session_identifier, max(COALESCE(e.domain_userid, NULL)) AS user_identifier, min(collector_tstamp) AS start_tstamp, max(collector_tstamp) AS end_tstamp FROM embucket.datasets.events AS e WHERE dvce_sent_tstamp <= dateadd('day', 3, dvce_created_tstamp) AND collector_tstamp >= CAST('2022-08-19 00:00:00' AS TIMESTAMP) AND collector_tstamp <= CAST('2022-09-18 00:00:00' AS TIMESTAMP) AND true AND true GROUP BY 1), new_events_session_ids AS (SELECT * FROM new_events_session_ids_init AS e WHERE session_identifier IS NOT NULL AND NOT EXISTS (SELECT 1 FROM datasets.public_snowplow_manifest.snowplow_web_base_quarantined_sessions AS a WHERE a.session_identifier = e.session_identifier)), session_lifecycle AS (SELECT * FROM new_events_session_ids) SELECT sl.session_identifier, sl.user_identifier, sl.start_tstamp, least(dateadd('day', 3, sl.start_tstamp), sl.end_tstamp) AS end_tstamp FROM session_lifecycle AS sl) ORDER BY (to_date(start_tstamp)))

table identifier should be fixed from
datasets.public_snowplow_manifest.snowplow_web_base_quarantined_sessions to embucket.datasets.public_snowplow_manifest.snowplow_web_base_quarantined_sessions

  • disabled size limit for CSV files for upload

Copy link
Contributor

@eadgbear eadgbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@osipovartem osipovartem merged commit be691af into main Jan 6, 2025
@osipovartem osipovartem deleted the table_relations branch January 13, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants