Created
September 11, 2019 12:22
-
-
Save jthandy/82278df1109859443aae306bc56adcc8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
with staged_events as ( | |
select * from {{ ref('snowplow_events_base') }} | |
), | |
context as ( | |
select | |
event_id as root_id, | |
c.value:data:id::string as id, | |
collector_tstamp | |
from staged_events, | |
lateral flatten (input => contexts:data) c | |
) | |
select * from context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment