diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a7a41fa --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ + +target/ +dbt_modules/ +dbt_packages/ +logs/ +.DS_Store diff --git a/README.md b/README.md index cd2bcd7..f944fb1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,97 @@ +[![early-release]][tracker-classificiation] [![License][license-image]][license] [![Discourse posts][discourse-image]][discourse] + +![snowplow-logo](https://raw.githubusercontent.com/snowplow/dbt-snowplow-utils/main/assets/snowplow_logo.png) + # dbt-snowplow-media-player -A fully incremental model, that transforms media player event data generated by the Snowplow JavaScript tracker into derived tables for easier querying + +A fully incremental model that transforms media player event data into derived tables for easier querying generated by the Snowplow [JavaScript tracker][javascript-tracker] in combination with media tracking specific plugins such as the [Media Tracking plugin][media-tracking] or the [YouTube Tracking plugin][youtube-tracking]. The package is built on top of the [dbt-snowplow-web package][dbt-snowplow-web] taking that as a basis to carry out the incremental update. It is therefore designed to be run together with the web model very similar to how a custom module would run. + +Please refer to the [doc site][snowplow-media-player-docs] for a full breakdown of the package. + +### Adapter Support + +The snowplow-media-player v0.1.0 package currently supports Redshift & Postgres. + +| warehouse | dbt versions | snowplow-web version | snowplow-media-player version | +|:------------------------:|:-------------------:|:--------------------:|:-----------------------------:| +| Redshift & Postgres | >=0.20.0 to <1.1.0 | >=0.6.0 to <0.7.0> | 0.1.0 | + +### Requirements + +- A dataset of media-player web events from the [Snowplow JavaScript tracker][tracker-docs] must be available in the database. In order for this to happen at least one of the JavaScript based media tracking plugins need to be enabled: [Media Tracking plugin][media-tracking] or [YouTube Tracking plugin][youtube-tracking] +- Have the [`webPage` context][webpage-context] enabled. +- Have the [media-player event schema][media-player-event-schema] enabled. +- Have the [media-player context schema][media-player-context-schema] enabled. +- Depending on the plugin / intention have all the relevant contexts from below enabled: + - in case of embedded YouTube tracking: Have the [YouTube specific context schema][youtube-specific-context-schema] enabled. + - in case of HTML5 audio or video tracking: Have the [HTML5 media element context schema][html5-media-element-context-schema] enabled. + - in case of HTML5 video tracking: Have the [HTML5 video element context schema][html5-video-element-context-schema] enabled. + +### Installation + +Check dbt Hub for the latest installation instructions, or read the [dbt docs][dbt-package-docs] for more information on installing packages. + +### Configuration & Operation + +Please refer to the [doc site][snowplow-media-player-docs] for extensive details on how to configure and run the package. + +### Models + +The package contains multiple staging models however the mart models are as follows: + +| Model | Description | +|------------------------------------------|--------------------------------------------------------------------------------------------| +| snowplow_media_player_base | A table summarising media player events by media and pageview including impressions. | +| snowplow_media_player_plays_by_pageview | A view summarising media plays by media on a pageview level. | +| snowplow_media_player_media_stats | An aggregated table of media metrics on a media_id level. | + +# Join the Snowplow community + +We welcome all ideas, questions and contributions! + +For support requests, please use our community support [Discourse][discourse] forum. + +If you find a bug, please report an issue on GitHub. + +# Copyright and license + +The snowplow-media-player package is Copyright 2022 Snowplow Analytics Ltd. + +Licensed under the [Apache License, Version 2.0][license] (the "License"); +you may not use this software except in compliance with the License. + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +[license]: http://www.apache.org/licenses/LICENSE-2.0 +[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat +[tracker-classificiation]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/ +[early-release]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Early%20Release&color=014477&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC + +[tracker-docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/ + +[webpage-context]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/tracker-setup/initialization-options/#Adding_predefined_contexts + +[media-player-event-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/media_player_event/jsonschema/1-0-0 +[media-player-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/media_player/jsonschema/1-0-0 +[youtube-specific-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.youtube/youtube/jsonschema/1-0-0 +[html5-media-element-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/org.whatwg/media_element/jsonschema/1-0-0 +[html5-video-element-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/org.whatwg/video_element/jsonschema/1-0-0 + +[media-tracking]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/plugins/media-tracking/ + +[javascript-tracker]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3 + +[youtube-tracking]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/plugins/youtube-tracking/ + +[dbt-package-docs]: https://docs.getdbt.com/docs/building-a-dbt-project/package-management + +[discourse-image]: https://img.shields.io/discourse/posts?server=https%3A%2F%2Fdiscourse.snowplowanalytics.com%2F +[discourse]: http://discourse.snowplowanalytics.com/ + +[snowplow-media-player-docs]: https://snowplow.github.io/dbt-snowplow-media-player/#!/overview/snowplow_media_player + +[dbt-snowplow-web]: https://hub.getdbt.com/dbt-labs/snowplow/latest/ diff --git a/analyses/.gitkeep b/analyses/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/dbt_project.yml b/dbt_project.yml new file mode 100644 index 0000000..454b202 --- /dev/null +++ b/dbt_project.yml @@ -0,0 +1,41 @@ +name: 'snowplow_media_player' +version: '0.1.0' +config-version: 2 +require-dbt-version: ">=1.0.0" + +profile: 'default' + +model-paths: ["models"] +analysis-paths: ["analyses"] +test-paths: ["tests"] +seed-paths: ["seeds"] +macro-paths: ["macros"] +docs-paths: ["docs"] +snapshot-paths: ["snapshots"] + +target-path: "target" +clean-targets: + - "target" + - "dbt_packages" + +vars: + snowplow__percent_progress_boundaries: [10, 25, 50, 75] + snowplow__valid_play_sec: 30 + snowplow__complete_play_rate: 0.99 + snowplow__max_media_pv_window: 10 + +models: + snowplow_media_player: + +bind: false + +materialized: view + web: + +schema: "derived" + +tags: "snowplow_web_incremental" + +enabled: true + scratch: + +schema: "scratch" + +tags: "scratch" + custom: + +schema: "scratch" + +tags: "snowplow_web_incremental" + +enabled: false diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/catalog.json b/docs/catalog.json new file mode 100644 index 0000000..6c221d8 --- /dev/null +++ b/docs/catalog.json @@ -0,0 +1 @@ +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.0.0", "generated_at": "2022-05-12T15:44:14.248744Z", "invocation_id": "842c68f8-0b2e-4ace-8bfc-9f191c9508e0", "env": {}}, "nodes": {"model.snowplow_web.snowplow_web_base_quarantined_sessions": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_snowplow_manifest", "name": "snowplow_web_base_quarantined_sessions", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"session_id": {"type": "character varying(64)", "index": 1, "name": "session_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_base_quarantined_sessions"}, "model.snowplow_web.snowplow_web_incremental_manifest": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_snowplow_manifest", "name": "snowplow_web_incremental_manifest", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"model": {"type": "character varying(4096)", "index": 1, "name": "model", "comment": null}, "last_success": {"type": "timestamp without time zone", "index": 2, "name": "last_success", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_incremental_manifest"}, "model.snowplow_media_player.snowplow_media_player_pivot_base": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_media_player_pivot_base", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"percent_progress": {"type": "integer", "index": 1, "name": "percent_progress", "comment": null}, "weight_rate": {"type": "integer", "index": 2, "name": "weight_rate", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_media_player.snowplow_media_player_pivot_base"}, "model.snowplow_web.snowplow_web_base_new_event_limits": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_base_new_event_limits", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"lower_limit": {"type": "timestamp without time zone", "index": 1, "name": "lower_limit", "comment": null}, "upper_limit": {"type": "timestamp without time zone", "index": 2, "name": "upper_limit", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_base_new_event_limits"}, "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_snowplow_manifest", "name": "snowplow_web_base_sessions_lifecycle_manifest", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"session_id": {"type": "character(128)", "index": 1, "name": "session_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 2, "name": "domain_userid", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 3, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "end_tstamp", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"}, "model.snowplow_web.snowplow_web_base_sessions_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_base_sessions_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"session_id": {"type": "character(128)", "index": 1, "name": "session_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 2, "name": "domain_userid", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 3, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "end_tstamp", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_base_sessions_this_run"}, "model.snowplow_web.snowplow_web_base_events_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_base_events_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"app_id": {"type": "character varying(255)", "index": 1, "name": "app_id", "comment": null}, "platform": {"type": "character varying(255)", "index": 2, "name": "platform", "comment": null}, "etl_tstamp": {"type": "timestamp without time zone", "index": 3, "name": "etl_tstamp", "comment": null}, "collector_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "collector_tstamp", "comment": null}, "dvce_created_tstamp": {"type": "timestamp without time zone", "index": 5, "name": "dvce_created_tstamp", "comment": null}, "event": {"type": "character varying(128)", "index": 6, "name": "event", "comment": null}, "event_id": {"type": "character(36)", "index": 7, "name": "event_id", "comment": null}, "txn_id": {"type": "integer", "index": 8, "name": "txn_id", "comment": null}, "name_tracker": {"type": "character varying(128)", "index": 9, "name": "name_tracker", "comment": null}, "v_tracker": {"type": "character varying(100)", "index": 10, "name": "v_tracker", "comment": null}, "v_collector": {"type": "character varying(100)", "index": 11, "name": "v_collector", "comment": null}, "v_etl": {"type": "character varying(100)", "index": 12, "name": "v_etl", "comment": null}, "user_id": {"type": "character varying(255)", "index": 13, "name": "user_id", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 14, "name": "user_ipaddress", "comment": null}, "user_fingerprint": {"type": "character varying(128)", "index": 15, "name": "user_fingerprint", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 16, "name": "domain_userid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 17, "name": "domain_sessionidx", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 18, "name": "network_userid", "comment": null}, "geo_country": {"type": "character(2)", "index": 19, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 20, "name": "geo_region", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 21, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 22, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 23, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 24, "name": "geo_longitude", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 25, "name": "geo_region_name", "comment": null}, "ip_isp": {"type": "character varying(100)", "index": 26, "name": "ip_isp", "comment": null}, "ip_organization": {"type": "character varying(128)", "index": 27, "name": "ip_organization", "comment": null}, "ip_domain": {"type": "character varying(128)", "index": 28, "name": "ip_domain", "comment": null}, "ip_netspeed": {"type": "character varying(100)", "index": 29, "name": "ip_netspeed", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 30, "name": "page_url", "comment": null}, "page_title": {"type": "character varying(2000)", "index": 31, "name": "page_title", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 32, "name": "page_referrer", "comment": null}, "page_urlscheme": {"type": "character varying(16)", "index": 33, "name": "page_urlscheme", "comment": null}, "page_urlhost": {"type": "character varying(255)", "index": 34, "name": "page_urlhost", "comment": null}, "page_urlport": {"type": "integer", "index": 35, "name": "page_urlport", "comment": null}, "page_urlpath": {"type": "character varying(3000)", "index": 36, "name": "page_urlpath", "comment": null}, "page_urlquery": {"type": "character varying(6000)", "index": 37, "name": "page_urlquery", "comment": null}, "page_urlfragment": {"type": "character varying(3000)", "index": 38, "name": "page_urlfragment", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 39, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 40, "name": "refr_urlhost", "comment": null}, "refr_urlport": {"type": "integer", "index": 41, "name": "refr_urlport", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 42, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 43, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 44, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 45, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 46, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 47, "name": "refr_term", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 48, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 49, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 50, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 51, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 52, "name": "mkt_campaign", "comment": null}, "se_category": {"type": "character varying(1000)", "index": 53, "name": "se_category", "comment": null}, "se_action": {"type": "character varying(1000)", "index": 54, "name": "se_action", "comment": null}, "se_label": {"type": "character varying(4096)", "index": 55, "name": "se_label", "comment": null}, "se_property": {"type": "character varying(1000)", "index": 56, "name": "se_property", "comment": null}, "se_value": {"type": "double precision", "index": 57, "name": "se_value", "comment": null}, "tr_orderid": {"type": "character varying(255)", "index": 58, "name": "tr_orderid", "comment": null}, "tr_affiliation": {"type": "character varying(255)", "index": 59, "name": "tr_affiliation", "comment": null}, "tr_total": {"type": "numeric(18,2)", "index": 60, "name": "tr_total", "comment": null}, "tr_tax": {"type": "numeric(18,2)", "index": 61, "name": "tr_tax", "comment": null}, "tr_shipping": {"type": "numeric(18,2)", "index": 62, "name": "tr_shipping", "comment": null}, "tr_city": {"type": "character varying(255)", "index": 63, "name": "tr_city", "comment": null}, "tr_state": {"type": "character varying(255)", "index": 64, "name": "tr_state", "comment": null}, "tr_country": {"type": "character varying(255)", "index": 65, "name": "tr_country", "comment": null}, "ti_orderid": {"type": "character varying(255)", "index": 66, "name": "ti_orderid", "comment": null}, "ti_sku": {"type": "character varying(255)", "index": 67, "name": "ti_sku", "comment": null}, "ti_name": {"type": "character varying(255)", "index": 68, "name": "ti_name", "comment": null}, "ti_category": {"type": "character varying(255)", "index": 69, "name": "ti_category", "comment": null}, "ti_price": {"type": "numeric(18,2)", "index": 70, "name": "ti_price", "comment": null}, "ti_quantity": {"type": "integer", "index": 71, "name": "ti_quantity", "comment": null}, "pp_xoffset_min": {"type": "integer", "index": 72, "name": "pp_xoffset_min", "comment": null}, "pp_xoffset_max": {"type": "integer", "index": 73, "name": "pp_xoffset_max", "comment": null}, "pp_yoffset_min": {"type": "integer", "index": 74, "name": "pp_yoffset_min", "comment": null}, "pp_yoffset_max": {"type": "integer", "index": 75, "name": "pp_yoffset_max", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 76, "name": "useragent", "comment": null}, "br_name": {"type": "character varying(50)", "index": 77, "name": "br_name", "comment": null}, "br_family": {"type": "character varying(50)", "index": 78, "name": "br_family", "comment": null}, "br_version": {"type": "character varying(50)", "index": 79, "name": "br_version", "comment": null}, "br_type": {"type": "character varying(50)", "index": 80, "name": "br_type", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 81, "name": "br_renderengine", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 82, "name": "br_lang", "comment": null}, "br_features_pdf": {"type": "boolean", "index": 83, "name": "br_features_pdf", "comment": null}, "br_features_flash": {"type": "boolean", "index": 84, "name": "br_features_flash", "comment": null}, "br_features_java": {"type": "boolean", "index": 85, "name": "br_features_java", "comment": null}, "br_features_director": {"type": "boolean", "index": 86, "name": "br_features_director", "comment": null}, "br_features_quicktime": {"type": "boolean", "index": 87, "name": "br_features_quicktime", "comment": null}, "br_features_realplayer": {"type": "boolean", "index": 88, "name": "br_features_realplayer", "comment": null}, "br_features_windowsmedia": {"type": "boolean", "index": 89, "name": "br_features_windowsmedia", "comment": null}, "br_features_gears": {"type": "boolean", "index": 90, "name": "br_features_gears", "comment": null}, "br_features_silverlight": {"type": "boolean", "index": 91, "name": "br_features_silverlight", "comment": null}, "br_cookies": {"type": "boolean", "index": 92, "name": "br_cookies", "comment": null}, "br_colordepth": {"type": "character varying(12)", "index": 93, "name": "br_colordepth", "comment": null}, "br_viewwidth": {"type": "integer", "index": 94, "name": "br_viewwidth", "comment": null}, "br_viewheight": {"type": "integer", "index": 95, "name": "br_viewheight", "comment": null}, "os_name": {"type": "character varying(50)", "index": 96, "name": "os_name", "comment": null}, "os_family": {"type": "character varying(50)", "index": 97, "name": "os_family", "comment": null}, "os_manufacturer": {"type": "character varying(50)", "index": 98, "name": "os_manufacturer", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 99, "name": "os_timezone", "comment": null}, "dvce_type": {"type": "character varying(50)", "index": 100, "name": "dvce_type", "comment": null}, "dvce_ismobile": {"type": "boolean", "index": 101, "name": "dvce_ismobile", "comment": null}, "dvce_screenwidth": {"type": "integer", "index": 102, "name": "dvce_screenwidth", "comment": null}, "dvce_screenheight": {"type": "integer", "index": 103, "name": "dvce_screenheight", "comment": null}, "doc_charset": {"type": "character varying(128)", "index": 104, "name": "doc_charset", "comment": null}, "doc_width": {"type": "integer", "index": 105, "name": "doc_width", "comment": null}, "doc_height": {"type": "integer", "index": 106, "name": "doc_height", "comment": null}, "tr_currency": {"type": "character(3)", "index": 107, "name": "tr_currency", "comment": null}, "tr_total_base": {"type": "numeric(18,2)", "index": 108, "name": "tr_total_base", "comment": null}, "tr_tax_base": {"type": "numeric(18,2)", "index": 109, "name": "tr_tax_base", "comment": null}, "tr_shipping_base": {"type": "numeric(18,2)", "index": 110, "name": "tr_shipping_base", "comment": null}, "ti_currency": {"type": "character(3)", "index": 111, "name": "ti_currency", "comment": null}, "ti_price_base": {"type": "numeric(18,2)", "index": 112, "name": "ti_price_base", "comment": null}, "base_currency": {"type": "character(3)", "index": 113, "name": "base_currency", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 114, "name": "geo_timezone", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 115, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 116, "name": "mkt_network", "comment": null}, "etl_tags": {"type": "character varying(500)", "index": 117, "name": "etl_tags", "comment": null}, "dvce_sent_tstamp": {"type": "timestamp without time zone", "index": 118, "name": "dvce_sent_tstamp", "comment": null}, "refr_domain_userid": {"type": "character varying(128)", "index": 119, "name": "refr_domain_userid", "comment": null}, "refr_dvce_tstamp": {"type": "timestamp without time zone", "index": 120, "name": "refr_dvce_tstamp", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 121, "name": "domain_sessionid", "comment": null}, "derived_tstamp": {"type": "timestamp without time zone", "index": 122, "name": "derived_tstamp", "comment": null}, "event_vendor": {"type": "character varying(1000)", "index": 123, "name": "event_vendor", "comment": null}, "event_name": {"type": "character varying(1000)", "index": 124, "name": "event_name", "comment": null}, "event_format": {"type": "character varying(128)", "index": 125, "name": "event_format", "comment": null}, "event_version": {"type": "character varying(128)", "index": 126, "name": "event_version", "comment": null}, "event_fingerprint": {"type": "character varying(128)", "index": 127, "name": "event_fingerprint", "comment": null}, "true_tstamp": {"type": "timestamp without time zone", "index": 128, "name": "true_tstamp", "comment": null}, "event_id_dedupe_index": {"type": "bigint", "index": 129, "name": "event_id_dedupe_index", "comment": null}, "row_count": {"type": "bigint", "index": 130, "name": "row_count", "comment": null}, "page_view_id": {"type": "character varying(4096)", "index": 131, "name": "page_view_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_base_events_this_run"}, "model.snowplow_web.snowplow_web_pv_limits": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_pv_limits", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"lower_limit": {"type": "timestamp without time zone", "index": 1, "name": "lower_limit", "comment": null}, "upper_limit": {"type": "timestamp without time zone", "index": 2, "name": "upper_limit", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_pv_limits"}, "model.snowplow_web.snowplow_web_pv_engaged_time": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_pv_engaged_time", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"page_view_id": {"type": "character varying(4096)", "index": 1, "name": "page_view_id", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 2, "name": "end_tstamp", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 3, "name": "engaged_time_in_s", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_pv_engaged_time"}, "model.snowplow_media_player.snowplow_media_player_interactions_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_media_player_interactions_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"event_id": {"type": "character(36)", "index": 1, "name": "event_id", "comment": null}, "page_view_id": {"type": "character varying(4096)", "index": 2, "name": "page_view_id", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 3, "name": "domain_sessionid", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 4, "name": "domain_userid", "comment": null}, "media_id": {"type": "character varying(65535)", "index": 5, "name": "media_id", "comment": null}, "media_label": {"type": "character varying(4096)", "index": 6, "name": "media_label", "comment": null}, "play_id": {"type": "character varying(32)", "index": 7, "name": "play_id", "comment": null}, "duration": {"type": "double precision", "index": 8, "name": "duration", "comment": null}, "media_type": {"type": "character varying(5)", "index": 9, "name": "media_type", "comment": null}, "media_player_type": {"type": "character varying(257)", "index": 10, "name": "media_player_type", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 11, "name": "page_referrer", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 12, "name": "page_url", "comment": null}, "source_url": {"type": "character varying(65535)", "index": 13, "name": "source_url", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 14, "name": "geo_region_name", "comment": null}, "br_name": {"type": "character varying(50)", "index": 15, "name": "br_name", "comment": null}, "dvce_type": {"type": "character varying(50)", "index": 16, "name": "dvce_type", "comment": null}, "os_name": {"type": "character varying(50)", "index": 17, "name": "os_name", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 18, "name": "os_timezone", "comment": null}, "event_type": {"type": "character varying(255)", "index": 19, "name": "event_type", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 20, "name": "start_tstamp", "comment": null}, "player_current_time": {"type": "double precision", "index": 21, "name": "player_current_time", "comment": null}, "playback_rate": {"type": "double precision", "index": 22, "name": "playback_rate", "comment": null}, "playback_quality": {"type": "character varying(128)", "index": 23, "name": "playback_quality", "comment": null}, "percent_progress": {"type": "integer", "index": 24, "name": "percent_progress", "comment": null}, "is_muted": {"type": "boolean", "index": 25, "name": "is_muted", "comment": null}, "is_live": {"type": "boolean", "index": 26, "name": "is_live", "comment": null}, "loop": {"type": "boolean", "index": 27, "name": "loop", "comment": null}, "volume": {"type": "smallint", "index": 28, "name": "volume", "comment": null}, "play_time_sec": {"type": "integer", "index": 29, "name": "play_time_sec", "comment": null}, "play_time_sec_muted": {"type": "integer", "index": 30, "name": "play_time_sec_muted", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_media_player.snowplow_media_player_interactions_this_run"}, "model.snowplow_web.snowplow_web_page_view_events": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_page_view_events", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"page_view_id": {"type": "character varying(4096)", "index": 1, "name": "page_view_id", "comment": null}, "event_id": {"type": "character(36)", "index": 2, "name": "event_id", "comment": null}, "app_id": {"type": "character varying(255)", "index": 3, "name": "app_id", "comment": null}, "user_id": {"type": "character varying(255)", "index": 4, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 5, "name": "domain_userid", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 6, "name": "network_userid", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 7, "name": "domain_sessionid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 8, "name": "domain_sessionidx", "comment": null}, "dvce_created_tstamp": {"type": "timestamp without time zone", "index": 9, "name": "dvce_created_tstamp", "comment": null}, "collector_tstamp": {"type": "timestamp without time zone", "index": 10, "name": "collector_tstamp", "comment": null}, "derived_tstamp": {"type": "timestamp without time zone", "index": 11, "name": "derived_tstamp", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 12, "name": "start_tstamp", "comment": null}, "doc_width": {"type": "integer", "index": 13, "name": "doc_width", "comment": null}, "doc_height": {"type": "integer", "index": 14, "name": "doc_height", "comment": null}, "page_title": {"type": "character varying(2000)", "index": 15, "name": "page_title", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 16, "name": "page_url", "comment": null}, "page_urlscheme": {"type": "character varying(16)", "index": 17, "name": "page_urlscheme", "comment": null}, "page_urlhost": {"type": "character varying(255)", "index": 18, "name": "page_urlhost", "comment": null}, "page_urlpath": {"type": "character varying(3000)", "index": 19, "name": "page_urlpath", "comment": null}, "page_urlquery": {"type": "character varying(6000)", "index": 20, "name": "page_urlquery", "comment": null}, "page_urlfragment": {"type": "character varying(3000)", "index": 21, "name": "page_urlfragment", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 22, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 23, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 24, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 25, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 26, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 27, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 28, "name": "mkt_network", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 29, "name": "page_referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 30, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 31, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 32, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 33, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 34, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 35, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 36, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 37, "name": "refr_term", "comment": null}, "geo_country": {"type": "character(2)", "index": 38, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 39, "name": "geo_region", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 40, "name": "geo_region_name", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 41, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 42, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 43, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 44, "name": "geo_longitude", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 45, "name": "geo_timezone", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 46, "name": "user_ipaddress", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 47, "name": "useragent", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 48, "name": "br_lang", "comment": null}, "br_viewwidth": {"type": "integer", "index": 49, "name": "br_viewwidth", "comment": null}, "br_viewheight": {"type": "integer", "index": 50, "name": "br_viewheight", "comment": null}, "br_colordepth": {"type": "character varying(12)", "index": 51, "name": "br_colordepth", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 52, "name": "br_renderengine", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 53, "name": "os_timezone", "comment": null}, "page_view_in_session_index": {"type": "bigint", "index": 54, "name": "page_view_in_session_index", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_page_view_events"}, "model.snowplow_web.snowplow_web_pv_scroll_depth": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_pv_scroll_depth", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"page_view_id": {"type": "character varying(4096)", "index": 1, "name": "page_view_id", "comment": null}, "doc_width": {"type": "integer", "index": 2, "name": "doc_width", "comment": null}, "doc_height": {"type": "integer", "index": 3, "name": "doc_height", "comment": null}, "br_viewwidth": {"type": "integer", "index": 4, "name": "br_viewwidth", "comment": null}, "br_viewheight": {"type": "integer", "index": 5, "name": "br_viewheight", "comment": null}, "hmin": {"type": "integer", "index": 6, "name": "hmin", "comment": null}, "hmax": {"type": "integer", "index": 7, "name": "hmax", "comment": null}, "vmin": {"type": "integer", "index": 8, "name": "vmin", "comment": null}, "vmax": {"type": "integer", "index": 9, "name": "vmax", "comment": null}, "relative_hmin": {"type": "double precision", "index": 10, "name": "relative_hmin", "comment": null}, "relative_hmax": {"type": "double precision", "index": 11, "name": "relative_hmax", "comment": null}, "relative_vmin": {"type": "double precision", "index": 12, "name": "relative_vmin", "comment": null}, "relative_vmax": {"type": "double precision", "index": 13, "name": "relative_vmax", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_pv_scroll_depth"}, "model.snowplow_web.snowplow_web_user_mapping": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_derived", "name": "snowplow_web_user_mapping", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"domain_userid": {"type": "character varying(128)", "index": 1, "name": "domain_userid", "comment": null}, "user_id": {"type": "character varying(255)", "index": 2, "name": "user_id", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 3, "name": "end_tstamp", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_user_mapping"}, "model.snowplow_media_player.snowplow_media_player_base_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_media_player_base_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"play_id": {"type": "character varying(32)", "index": 1, "name": "play_id", "comment": null}, "page_view_id": {"type": "character varying(4096)", "index": 2, "name": "page_view_id", "comment": null}, "media_id": {"type": "character varying(65535)", "index": 3, "name": "media_id", "comment": null}, "media_label": {"type": "character varying(4096)", "index": 4, "name": "media_label", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 5, "name": "domain_sessionid", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 6, "name": "domain_userid", "comment": null}, "duration": {"type": "double precision", "index": 7, "name": "duration", "comment": null}, "media_type": {"type": "character varying(5)", "index": 8, "name": "media_type", "comment": null}, "media_player_type": {"type": "character varying(257)", "index": 9, "name": "media_player_type", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 10, "name": "page_referrer", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 11, "name": "page_url", "comment": null}, "source_url": {"type": "character varying(65535)", "index": 12, "name": "source_url", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 13, "name": "geo_region_name", "comment": null}, "br_name": {"type": "character varying(50)", "index": 14, "name": "br_name", "comment": null}, "dvce_type": {"type": "character varying(50)", "index": 15, "name": "dvce_type", "comment": null}, "os_name": {"type": "character varying(50)", "index": 16, "name": "os_name", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 17, "name": "os_timezone", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 18, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 19, "name": "end_tstamp", "comment": null}, "play_time_sec": {"type": "bigint", "index": 20, "name": "play_time_sec", "comment": null}, "play_time_sec_muted": {"type": "bigint", "index": 21, "name": "play_time_sec_muted", "comment": null}, "is_played": {"type": "boolean", "index": 22, "name": "is_played", "comment": null}, "is_valid_play": {"type": "boolean", "index": 23, "name": "is_valid_play", "comment": null}, "is_complete_play": {"type": "boolean", "index": 24, "name": "is_complete_play", "comment": null}, "avg_playback_rate": {"type": "double precision", "index": 25, "name": "avg_playback_rate", "comment": null}, "retention_rate": {"type": "double precision", "index": 26, "name": "retention_rate", "comment": null}, "seeks": {"type": "bigint", "index": 27, "name": "seeks", "comment": null}, "percent_progress_reached": {"type": "character varying(65535)", "index": 28, "name": "percent_progress_reached", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_media_player.snowplow_media_player_base_this_run"}, "model.snowplow_media_player.snowplow_media_player_base": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_derived", "name": "snowplow_media_player_base", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"play_id": {"type": "character varying(32)", "index": 1, "name": "play_id", "comment": null}, "page_view_id": {"type": "character varying(4096)", "index": 2, "name": "page_view_id", "comment": null}, "media_id": {"type": "character varying(65535)", "index": 3, "name": "media_id", "comment": null}, "media_label": {"type": "character varying(4096)", "index": 4, "name": "media_label", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 5, "name": "domain_sessionid", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 6, "name": "domain_userid", "comment": null}, "duration": {"type": "double precision", "index": 7, "name": "duration", "comment": null}, "media_type": {"type": "character varying(5)", "index": 8, "name": "media_type", "comment": null}, "media_player_type": {"type": "character varying(257)", "index": 9, "name": "media_player_type", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 10, "name": "page_referrer", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 11, "name": "page_url", "comment": null}, "source_url": {"type": "character varying(65535)", "index": 12, "name": "source_url", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 13, "name": "geo_region_name", "comment": null}, "br_name": {"type": "character varying(50)", "index": 14, "name": "br_name", "comment": null}, "dvce_type": {"type": "character varying(50)", "index": 15, "name": "dvce_type", "comment": null}, "os_name": {"type": "character varying(50)", "index": 16, "name": "os_name", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 17, "name": "os_timezone", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 18, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 19, "name": "end_tstamp", "comment": null}, "play_time_sec": {"type": "bigint", "index": 20, "name": "play_time_sec", "comment": null}, "play_time_sec_muted": {"type": "bigint", "index": 21, "name": "play_time_sec_muted", "comment": null}, "is_played": {"type": "boolean", "index": 22, "name": "is_played", "comment": null}, "is_valid_play": {"type": "boolean", "index": 23, "name": "is_valid_play", "comment": null}, "is_complete_play": {"type": "boolean", "index": 24, "name": "is_complete_play", "comment": null}, "avg_playback_rate": {"type": "double precision", "index": 25, "name": "avg_playback_rate", "comment": null}, "retention_rate": {"type": "double precision", "index": 26, "name": "retention_rate", "comment": null}, "seeks": {"type": "bigint", "index": 27, "name": "seeks", "comment": null}, "percent_progress_reached": {"type": "character varying(65535)", "index": 28, "name": "percent_progress_reached", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_media_player.snowplow_media_player_base"}, "model.snowplow_media_player.snowplow_media_player_media_stats": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_derived", "name": "snowplow_media_player_media_stats", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"media_id": {"type": "character varying(65535)", "index": 1, "name": "media_id", "comment": null}, "media_label": {"type": "character varying(4096)", "index": 2, "name": "media_label", "comment": null}, "duration": {"type": "double precision", "index": 3, "name": "duration", "comment": null}, "media_type": {"type": "character varying(5)", "index": 4, "name": "media_type", "comment": null}, "media_player_type": {"type": "character varying(257)", "index": 5, "name": "media_player_type", "comment": null}, "play_time_min": {"type": "double precision", "index": 6, "name": "play_time_min", "comment": null}, "avg_play_time_min": {"type": "double precision", "index": 7, "name": "avg_play_time_min", "comment": null}, "first_play": {"type": "timestamp without time zone", "index": 8, "name": "first_play", "comment": null}, "last_play": {"type": "timestamp without time zone", "index": 9, "name": "last_play", "comment": null}, "plays": {"type": "bigint", "index": 10, "name": "plays", "comment": null}, "valid_plays": {"type": "bigint", "index": 11, "name": "valid_plays", "comment": null}, "complete_plays": {"type": "bigint", "index": 12, "name": "complete_plays", "comment": null}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": null}, "avg_playback_rate": {"type": "double precision", "index": 14, "name": "avg_playback_rate", "comment": null}, "play_rate": {"type": "double precision", "index": 15, "name": "play_rate", "comment": null}, "completion_rate_by_plays": {"type": "double precision", "index": 16, "name": "completion_rate_by_plays", "comment": null}, "avg_percent_played": {"type": "double precision", "index": 17, "name": "avg_percent_played", "comment": null}, "avg_retention_rate": {"type": "double precision", "index": 18, "name": "avg_retention_rate", "comment": null}, "last_base_tstamp": {"type": "timestamp without time zone", "index": 19, "name": "last_base_tstamp", "comment": null}, "_10_percent_reached": {"type": "bigint", "index": 20, "name": "_10_percent_reached", "comment": null}, "_25_percent_reached": {"type": "bigint", "index": 21, "name": "_25_percent_reached", "comment": null}, "_50_percent_reached": {"type": "bigint", "index": 22, "name": "_50_percent_reached", "comment": null}, "_75_percent_reached": {"type": "bigint", "index": 23, "name": "_75_percent_reached", "comment": null}, "_100_percent_reached": {"type": "bigint", "index": 24, "name": "_100_percent_reached", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_media_player.snowplow_media_player_media_stats"}, "model.snowplow_web.snowplow_web_page_views_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_page_views_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"page_view_id": {"type": "character varying(4096)", "index": 1, "name": "page_view_id", "comment": null}, "event_id": {"type": "character(36)", "index": 2, "name": "event_id", "comment": null}, "app_id": {"type": "character varying(255)", "index": 3, "name": "app_id", "comment": null}, "user_id": {"type": "character varying(255)", "index": 4, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 5, "name": "domain_userid", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 6, "name": "network_userid", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 7, "name": "domain_sessionid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 8, "name": "domain_sessionidx", "comment": null}, "page_view_in_session_index": {"type": "bigint", "index": 9, "name": "page_view_in_session_index", "comment": null}, "page_views_in_session": {"type": "bigint", "index": 10, "name": "page_views_in_session", "comment": null}, "dvce_created_tstamp": {"type": "timestamp without time zone", "index": 11, "name": "dvce_created_tstamp", "comment": null}, "collector_tstamp": {"type": "timestamp without time zone", "index": 12, "name": "collector_tstamp", "comment": null}, "derived_tstamp": {"type": "timestamp without time zone", "index": 13, "name": "derived_tstamp", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 14, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 15, "name": "end_tstamp", "comment": null}, "model_tstamp": {"type": "timestamp without time zone", "index": 16, "name": "model_tstamp", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 17, "name": "engaged_time_in_s", "comment": null}, "absolute_time_in_s": {"type": "bigint", "index": 18, "name": "absolute_time_in_s", "comment": null}, "horizontal_pixels_scrolled": {"type": "integer", "index": 19, "name": "horizontal_pixels_scrolled", "comment": null}, "vertical_pixels_scrolled": {"type": "integer", "index": 20, "name": "vertical_pixels_scrolled", "comment": null}, "horizontal_percentage_scrolled": {"type": "double precision", "index": 21, "name": "horizontal_percentage_scrolled", "comment": null}, "vertical_percentage_scrolled": {"type": "double precision", "index": 22, "name": "vertical_percentage_scrolled", "comment": null}, "doc_width": {"type": "integer", "index": 23, "name": "doc_width", "comment": null}, "doc_height": {"type": "integer", "index": 24, "name": "doc_height", "comment": null}, "page_title": {"type": "character varying(2000)", "index": 25, "name": "page_title", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 26, "name": "page_url", "comment": null}, "page_urlscheme": {"type": "character varying(16)", "index": 27, "name": "page_urlscheme", "comment": null}, "page_urlhost": {"type": "character varying(255)", "index": 28, "name": "page_urlhost", "comment": null}, "page_urlpath": {"type": "character varying(3000)", "index": 29, "name": "page_urlpath", "comment": null}, "page_urlquery": {"type": "character varying(6000)", "index": 30, "name": "page_urlquery", "comment": null}, "page_urlfragment": {"type": "character varying(3000)", "index": 31, "name": "page_urlfragment", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 32, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 33, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 34, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 35, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 36, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 37, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 38, "name": "mkt_network", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 39, "name": "page_referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 40, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 41, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 42, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 43, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 44, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 45, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 46, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 47, "name": "refr_term", "comment": null}, "geo_country": {"type": "character(2)", "index": 48, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 49, "name": "geo_region", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 50, "name": "geo_region_name", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 51, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 52, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 53, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 54, "name": "geo_longitude", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 55, "name": "geo_timezone", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 56, "name": "user_ipaddress", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 57, "name": "useragent", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 58, "name": "br_lang", "comment": null}, "br_viewwidth": {"type": "integer", "index": 59, "name": "br_viewwidth", "comment": null}, "br_viewheight": {"type": "integer", "index": 60, "name": "br_viewheight", "comment": null}, "br_colordepth": {"type": "character varying(12)", "index": 61, "name": "br_colordepth", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 62, "name": "br_renderengine", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 63, "name": "os_timezone", "comment": null}, "category": {"type": "character varying(1)", "index": 64, "name": "category", "comment": null}, "primary_impact": {"type": "character varying(1)", "index": 65, "name": "primary_impact", "comment": null}, "reason": {"type": "character varying(1)", "index": 66, "name": "reason", "comment": null}, "spider_or_robot": {"type": "boolean", "index": 67, "name": "spider_or_robot", "comment": null}, "useragent_family": {"type": "character varying(1)", "index": 68, "name": "useragent_family", "comment": null}, "useragent_major": {"type": "character varying(1)", "index": 69, "name": "useragent_major", "comment": null}, "useragent_minor": {"type": "character varying(1)", "index": 70, "name": "useragent_minor", "comment": null}, "useragent_patch": {"type": "character varying(1)", "index": 71, "name": "useragent_patch", "comment": null}, "useragent_version": {"type": "character varying(1)", "index": 72, "name": "useragent_version", "comment": null}, "os_family": {"type": "character varying(1)", "index": 73, "name": "os_family", "comment": null}, "os_major": {"type": "character varying(1)", "index": 74, "name": "os_major", "comment": null}, "os_minor": {"type": "character varying(1)", "index": 75, "name": "os_minor", "comment": null}, "os_patch": {"type": "character varying(1)", "index": 76, "name": "os_patch", "comment": null}, "os_patch_minor": {"type": "character varying(1)", "index": 77, "name": "os_patch_minor", "comment": null}, "os_version": {"type": "character varying(1)", "index": 78, "name": "os_version", "comment": null}, "device_family": {"type": "character varying(1)", "index": 79, "name": "device_family", "comment": null}, "device_class": {"type": "character varying(1)", "index": 80, "name": "device_class", "comment": null}, "agent_class": {"type": "character varying(1)", "index": 81, "name": "agent_class", "comment": null}, "agent_name": {"type": "character varying(1)", "index": 82, "name": "agent_name", "comment": null}, "agent_name_version": {"type": "character varying(1)", "index": 83, "name": "agent_name_version", "comment": null}, "agent_name_version_major": {"type": "character varying(1)", "index": 84, "name": "agent_name_version_major", "comment": null}, "agent_version": {"type": "character varying(1)", "index": 85, "name": "agent_version", "comment": null}, "agent_version_major": {"type": "character varying(1)", "index": 86, "name": "agent_version_major", "comment": null}, "device_brand": {"type": "character varying(1)", "index": 87, "name": "device_brand", "comment": null}, "device_name": {"type": "character varying(1)", "index": 88, "name": "device_name", "comment": null}, "device_version": {"type": "character varying(1)", "index": 89, "name": "device_version", "comment": null}, "layout_engine_class": {"type": "character varying(1)", "index": 90, "name": "layout_engine_class", "comment": null}, "layout_engine_name": {"type": "character varying(1)", "index": 91, "name": "layout_engine_name", "comment": null}, "layout_engine_name_version": {"type": "character varying(1)", "index": 92, "name": "layout_engine_name_version", "comment": null}, "layout_engine_name_version_major": {"type": "character varying(1)", "index": 93, "name": "layout_engine_name_version_major", "comment": null}, "layout_engine_version": {"type": "character varying(1)", "index": 94, "name": "layout_engine_version", "comment": null}, "layout_engine_version_major": {"type": "character varying(1)", "index": 95, "name": "layout_engine_version_major", "comment": null}, "operating_system_class": {"type": "character varying(1)", "index": 96, "name": "operating_system_class", "comment": null}, "operating_system_name": {"type": "character varying(1)", "index": 97, "name": "operating_system_name", "comment": null}, "operating_system_name_version": {"type": "character varying(1)", "index": 98, "name": "operating_system_name_version", "comment": null}, "operating_system_version": {"type": "character varying(1)", "index": 99, "name": "operating_system_version", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_page_views_this_run"}, "model.snowplow_web.snowplow_web_sessions_aggs": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_sessions_aggs", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"domain_sessionid": {"type": "character(128)", "index": 1, "name": "domain_sessionid", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 2, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 3, "name": "end_tstamp", "comment": null}, "page_views": {"type": "bigint", "index": 4, "name": "page_views", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 5, "name": "engaged_time_in_s", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_sessions_aggs"}, "model.snowplow_web.snowplow_web_page_views": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_derived", "name": "snowplow_web_page_views", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"page_view_id": {"type": "character varying(4096)", "index": 1, "name": "page_view_id", "comment": null}, "event_id": {"type": "character(36)", "index": 2, "name": "event_id", "comment": null}, "app_id": {"type": "character varying(255)", "index": 3, "name": "app_id", "comment": null}, "user_id": {"type": "character varying(255)", "index": 4, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 5, "name": "domain_userid", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 6, "name": "network_userid", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 7, "name": "domain_sessionid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 8, "name": "domain_sessionidx", "comment": null}, "page_view_in_session_index": {"type": "bigint", "index": 9, "name": "page_view_in_session_index", "comment": null}, "page_views_in_session": {"type": "bigint", "index": 10, "name": "page_views_in_session", "comment": null}, "dvce_created_tstamp": {"type": "timestamp without time zone", "index": 11, "name": "dvce_created_tstamp", "comment": null}, "collector_tstamp": {"type": "timestamp without time zone", "index": 12, "name": "collector_tstamp", "comment": null}, "derived_tstamp": {"type": "timestamp without time zone", "index": 13, "name": "derived_tstamp", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 14, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 15, "name": "end_tstamp", "comment": null}, "model_tstamp": {"type": "timestamp without time zone", "index": 16, "name": "model_tstamp", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 17, "name": "engaged_time_in_s", "comment": null}, "absolute_time_in_s": {"type": "bigint", "index": 18, "name": "absolute_time_in_s", "comment": null}, "horizontal_pixels_scrolled": {"type": "integer", "index": 19, "name": "horizontal_pixels_scrolled", "comment": null}, "vertical_pixels_scrolled": {"type": "integer", "index": 20, "name": "vertical_pixels_scrolled", "comment": null}, "horizontal_percentage_scrolled": {"type": "double precision", "index": 21, "name": "horizontal_percentage_scrolled", "comment": null}, "vertical_percentage_scrolled": {"type": "double precision", "index": 22, "name": "vertical_percentage_scrolled", "comment": null}, "doc_width": {"type": "integer", "index": 23, "name": "doc_width", "comment": null}, "doc_height": {"type": "integer", "index": 24, "name": "doc_height", "comment": null}, "page_title": {"type": "character varying(2000)", "index": 25, "name": "page_title", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 26, "name": "page_url", "comment": null}, "page_urlscheme": {"type": "character varying(16)", "index": 27, "name": "page_urlscheme", "comment": null}, "page_urlhost": {"type": "character varying(255)", "index": 28, "name": "page_urlhost", "comment": null}, "page_urlpath": {"type": "character varying(3000)", "index": 29, "name": "page_urlpath", "comment": null}, "page_urlquery": {"type": "character varying(6000)", "index": 30, "name": "page_urlquery", "comment": null}, "page_urlfragment": {"type": "character varying(3000)", "index": 31, "name": "page_urlfragment", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 32, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 33, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 34, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 35, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 36, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 37, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 38, "name": "mkt_network", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 39, "name": "page_referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 40, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 41, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 42, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 43, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 44, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 45, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 46, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 47, "name": "refr_term", "comment": null}, "geo_country": {"type": "character(2)", "index": 48, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 49, "name": "geo_region", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 50, "name": "geo_region_name", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 51, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 52, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 53, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 54, "name": "geo_longitude", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 55, "name": "geo_timezone", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 56, "name": "user_ipaddress", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 57, "name": "useragent", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 58, "name": "br_lang", "comment": null}, "br_viewwidth": {"type": "integer", "index": 59, "name": "br_viewwidth", "comment": null}, "br_viewheight": {"type": "integer", "index": 60, "name": "br_viewheight", "comment": null}, "br_colordepth": {"type": "character varying(12)", "index": 61, "name": "br_colordepth", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 62, "name": "br_renderengine", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 63, "name": "os_timezone", "comment": null}, "category": {"type": "character varying(1)", "index": 64, "name": "category", "comment": null}, "primary_impact": {"type": "character varying(1)", "index": 65, "name": "primary_impact", "comment": null}, "reason": {"type": "character varying(1)", "index": 66, "name": "reason", "comment": null}, "spider_or_robot": {"type": "boolean", "index": 67, "name": "spider_or_robot", "comment": null}, "useragent_family": {"type": "character varying(1)", "index": 68, "name": "useragent_family", "comment": null}, "useragent_major": {"type": "character varying(1)", "index": 69, "name": "useragent_major", "comment": null}, "useragent_minor": {"type": "character varying(1)", "index": 70, "name": "useragent_minor", "comment": null}, "useragent_patch": {"type": "character varying(1)", "index": 71, "name": "useragent_patch", "comment": null}, "useragent_version": {"type": "character varying(1)", "index": 72, "name": "useragent_version", "comment": null}, "os_family": {"type": "character varying(1)", "index": 73, "name": "os_family", "comment": null}, "os_major": {"type": "character varying(1)", "index": 74, "name": "os_major", "comment": null}, "os_minor": {"type": "character varying(1)", "index": 75, "name": "os_minor", "comment": null}, "os_patch": {"type": "character varying(1)", "index": 76, "name": "os_patch", "comment": null}, "os_patch_minor": {"type": "character varying(1)", "index": 77, "name": "os_patch_minor", "comment": null}, "os_version": {"type": "character varying(1)", "index": 78, "name": "os_version", "comment": null}, "device_family": {"type": "character varying(1)", "index": 79, "name": "device_family", "comment": null}, "device_class": {"type": "character varying(1)", "index": 80, "name": "device_class", "comment": null}, "agent_class": {"type": "character varying(1)", "index": 81, "name": "agent_class", "comment": null}, "agent_name": {"type": "character varying(1)", "index": 82, "name": "agent_name", "comment": null}, "agent_name_version": {"type": "character varying(1)", "index": 83, "name": "agent_name_version", "comment": null}, "agent_name_version_major": {"type": "character varying(1)", "index": 84, "name": "agent_name_version_major", "comment": null}, "agent_version": {"type": "character varying(1)", "index": 85, "name": "agent_version", "comment": null}, "agent_version_major": {"type": "character varying(1)", "index": 86, "name": "agent_version_major", "comment": null}, "device_brand": {"type": "character varying(1)", "index": 87, "name": "device_brand", "comment": null}, "device_name": {"type": "character varying(1)", "index": 88, "name": "device_name", "comment": null}, "device_version": {"type": "character varying(1)", "index": 89, "name": "device_version", "comment": null}, "layout_engine_class": {"type": "character varying(1)", "index": 90, "name": "layout_engine_class", "comment": null}, "layout_engine_name": {"type": "character varying(1)", "index": 91, "name": "layout_engine_name", "comment": null}, "layout_engine_name_version": {"type": "character varying(1)", "index": 92, "name": "layout_engine_name_version", "comment": null}, "layout_engine_name_version_major": {"type": "character varying(1)", "index": 93, "name": "layout_engine_name_version_major", "comment": null}, "layout_engine_version": {"type": "character varying(1)", "index": 94, "name": "layout_engine_version", "comment": null}, "layout_engine_version_major": {"type": "character varying(1)", "index": 95, "name": "layout_engine_version_major", "comment": null}, "operating_system_class": {"type": "character varying(1)", "index": 96, "name": "operating_system_class", "comment": null}, "operating_system_name": {"type": "character varying(1)", "index": 97, "name": "operating_system_name", "comment": null}, "operating_system_name_version": {"type": "character varying(1)", "index": 98, "name": "operating_system_name_version", "comment": null}, "operating_system_version": {"type": "character varying(1)", "index": 99, "name": "operating_system_version", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_page_views"}, "model.snowplow_web.snowplow_web_sessions_lasts": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_sessions_lasts", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"domain_sessionid": {"type": "character(128)", "index": 1, "name": "domain_sessionid", "comment": null}, "last_page_title": {"type": "character varying(2000)", "index": 2, "name": "last_page_title", "comment": null}, "last_page_url": {"type": "character varying(4096)", "index": 3, "name": "last_page_url", "comment": null}, "last_page_urlscheme": {"type": "character varying(16)", "index": 4, "name": "last_page_urlscheme", "comment": null}, "last_page_urlhost": {"type": "character varying(255)", "index": 5, "name": "last_page_urlhost", "comment": null}, "last_page_urlpath": {"type": "character varying(3000)", "index": 6, "name": "last_page_urlpath", "comment": null}, "last_page_urlquery": {"type": "character varying(6000)", "index": 7, "name": "last_page_urlquery", "comment": null}, "last_page_urlfragment": {"type": "character varying(3000)", "index": 8, "name": "last_page_urlfragment", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_sessions_lasts"}, "model.snowplow_web.snowplow_web_sessions_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_sessions_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"app_id": {"type": "character varying(255)", "index": 1, "name": "app_id", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 2, "name": "domain_sessionid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 3, "name": "domain_sessionidx", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 5, "name": "end_tstamp", "comment": null}, "model_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "model_tstamp", "comment": null}, "user_id": {"type": "character varying(255)", "index": 7, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 8, "name": "domain_userid", "comment": null}, "stitched_user_id": {"type": "character varying(255)", "index": 9, "name": "stitched_user_id", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 10, "name": "network_userid", "comment": null}, "page_views": {"type": "bigint", "index": 11, "name": "page_views", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 12, "name": "engaged_time_in_s", "comment": null}, "absolute_time_in_s": {"type": "bigint", "index": 13, "name": "absolute_time_in_s", "comment": null}, "first_page_title": {"type": "character varying(2000)", "index": 14, "name": "first_page_title", "comment": null}, "first_page_url": {"type": "character varying(4096)", "index": 15, "name": "first_page_url", "comment": null}, "first_page_urlscheme": {"type": "character varying(16)", "index": 16, "name": "first_page_urlscheme", "comment": null}, "first_page_urlhost": {"type": "character varying(255)", "index": 17, "name": "first_page_urlhost", "comment": null}, "first_page_urlpath": {"type": "character varying(3000)", "index": 18, "name": "first_page_urlpath", "comment": null}, "first_page_urlquery": {"type": "character varying(6000)", "index": 19, "name": "first_page_urlquery", "comment": null}, "first_page_urlfragment": {"type": "character varying(3000)", "index": 20, "name": "first_page_urlfragment", "comment": null}, "last_page_title": {"type": "character varying(2000)", "index": 21, "name": "last_page_title", "comment": null}, "last_page_url": {"type": "character varying(4096)", "index": 22, "name": "last_page_url", "comment": null}, "last_page_urlscheme": {"type": "character varying(16)", "index": 23, "name": "last_page_urlscheme", "comment": null}, "last_page_urlhost": {"type": "character varying(255)", "index": 24, "name": "last_page_urlhost", "comment": null}, "last_page_urlpath": {"type": "character varying(3000)", "index": 25, "name": "last_page_urlpath", "comment": null}, "last_page_urlquery": {"type": "character varying(6000)", "index": 26, "name": "last_page_urlquery", "comment": null}, "last_page_urlfragment": {"type": "character varying(3000)", "index": 27, "name": "last_page_urlfragment", "comment": null}, "referrer": {"type": "character varying(4096)", "index": 28, "name": "referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 29, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 30, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 31, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 32, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 33, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 34, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 35, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 36, "name": "refr_term", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 37, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 38, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 39, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 40, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 41, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 42, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 43, "name": "mkt_network", "comment": null}, "geo_country": {"type": "character(2)", "index": 44, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 45, "name": "geo_region", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 46, "name": "geo_region_name", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 47, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 48, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 49, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 50, "name": "geo_longitude", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 51, "name": "geo_timezone", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 52, "name": "user_ipaddress", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 53, "name": "useragent", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 54, "name": "br_renderengine", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 55, "name": "br_lang", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 56, "name": "os_timezone", "comment": null}, "category": {"type": "character varying(1)", "index": 57, "name": "category", "comment": null}, "primary_impact": {"type": "character varying(1)", "index": 58, "name": "primary_impact", "comment": null}, "reason": {"type": "character varying(1)", "index": 59, "name": "reason", "comment": null}, "spider_or_robot": {"type": "boolean", "index": 60, "name": "spider_or_robot", "comment": null}, "useragent_family": {"type": "character varying(1)", "index": 61, "name": "useragent_family", "comment": null}, "useragent_major": {"type": "character varying(1)", "index": 62, "name": "useragent_major", "comment": null}, "useragent_minor": {"type": "character varying(1)", "index": 63, "name": "useragent_minor", "comment": null}, "useragent_patch": {"type": "character varying(1)", "index": 64, "name": "useragent_patch", "comment": null}, "useragent_version": {"type": "character varying(1)", "index": 65, "name": "useragent_version", "comment": null}, "os_family": {"type": "character varying(1)", "index": 66, "name": "os_family", "comment": null}, "os_major": {"type": "character varying(1)", "index": 67, "name": "os_major", "comment": null}, "os_minor": {"type": "character varying(1)", "index": 68, "name": "os_minor", "comment": null}, "os_patch": {"type": "character varying(1)", "index": 69, "name": "os_patch", "comment": null}, "os_patch_minor": {"type": "character varying(1)", "index": 70, "name": "os_patch_minor", "comment": null}, "os_version": {"type": "character varying(1)", "index": 71, "name": "os_version", "comment": null}, "device_family": {"type": "character varying(1)", "index": 72, "name": "device_family", "comment": null}, "device_class": {"type": "character varying(1)", "index": 73, "name": "device_class", "comment": null}, "agent_class": {"type": "character varying(1)", "index": 74, "name": "agent_class", "comment": null}, "agent_name": {"type": "character varying(1)", "index": 75, "name": "agent_name", "comment": null}, "agent_name_version": {"type": "character varying(1)", "index": 76, "name": "agent_name_version", "comment": null}, "agent_name_version_major": {"type": "character varying(1)", "index": 77, "name": "agent_name_version_major", "comment": null}, "agent_version": {"type": "character varying(1)", "index": 78, "name": "agent_version", "comment": null}, "agent_version_major": {"type": "character varying(1)", "index": 79, "name": "agent_version_major", "comment": null}, "device_brand": {"type": "character varying(1)", "index": 80, "name": "device_brand", "comment": null}, "device_name": {"type": "character varying(1)", "index": 81, "name": "device_name", "comment": null}, "device_version": {"type": "character varying(1)", "index": 82, "name": "device_version", "comment": null}, "layout_engine_class": {"type": "character varying(1)", "index": 83, "name": "layout_engine_class", "comment": null}, "layout_engine_name": {"type": "character varying(1)", "index": 84, "name": "layout_engine_name", "comment": null}, "layout_engine_name_version": {"type": "character varying(1)", "index": 85, "name": "layout_engine_name_version", "comment": null}, "layout_engine_name_version_major": {"type": "character varying(1)", "index": 86, "name": "layout_engine_name_version_major", "comment": null}, "layout_engine_version": {"type": "character varying(1)", "index": 87, "name": "layout_engine_version", "comment": null}, "layout_engine_version_major": {"type": "character varying(1)", "index": 88, "name": "layout_engine_version_major", "comment": null}, "operating_system_class": {"type": "character varying(1)", "index": 89, "name": "operating_system_class", "comment": null}, "operating_system_name": {"type": "character varying(1)", "index": 90, "name": "operating_system_name", "comment": null}, "operating_system_name_version": {"type": "character varying(1)", "index": 91, "name": "operating_system_name_version", "comment": null}, "operating_system_version": {"type": "character varying(1)", "index": 92, "name": "operating_system_version", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_sessions_this_run"}, "model.snowplow_web.snowplow_web_sessions": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_derived", "name": "snowplow_web_sessions", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"app_id": {"type": "character varying(255)", "index": 1, "name": "app_id", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 2, "name": "domain_sessionid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 3, "name": "domain_sessionidx", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 5, "name": "end_tstamp", "comment": null}, "model_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "model_tstamp", "comment": null}, "user_id": {"type": "character varying(255)", "index": 7, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 8, "name": "domain_userid", "comment": null}, "stitched_user_id": {"type": "character varying(255)", "index": 9, "name": "stitched_user_id", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 10, "name": "network_userid", "comment": null}, "page_views": {"type": "bigint", "index": 11, "name": "page_views", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 12, "name": "engaged_time_in_s", "comment": null}, "absolute_time_in_s": {"type": "bigint", "index": 13, "name": "absolute_time_in_s", "comment": null}, "first_page_title": {"type": "character varying(2000)", "index": 14, "name": "first_page_title", "comment": null}, "first_page_url": {"type": "character varying(4096)", "index": 15, "name": "first_page_url", "comment": null}, "first_page_urlscheme": {"type": "character varying(16)", "index": 16, "name": "first_page_urlscheme", "comment": null}, "first_page_urlhost": {"type": "character varying(255)", "index": 17, "name": "first_page_urlhost", "comment": null}, "first_page_urlpath": {"type": "character varying(3000)", "index": 18, "name": "first_page_urlpath", "comment": null}, "first_page_urlquery": {"type": "character varying(6000)", "index": 19, "name": "first_page_urlquery", "comment": null}, "first_page_urlfragment": {"type": "character varying(3000)", "index": 20, "name": "first_page_urlfragment", "comment": null}, "last_page_title": {"type": "character varying(2000)", "index": 21, "name": "last_page_title", "comment": null}, "last_page_url": {"type": "character varying(4096)", "index": 22, "name": "last_page_url", "comment": null}, "last_page_urlscheme": {"type": "character varying(16)", "index": 23, "name": "last_page_urlscheme", "comment": null}, "last_page_urlhost": {"type": "character varying(255)", "index": 24, "name": "last_page_urlhost", "comment": null}, "last_page_urlpath": {"type": "character varying(3000)", "index": 25, "name": "last_page_urlpath", "comment": null}, "last_page_urlquery": {"type": "character varying(6000)", "index": 26, "name": "last_page_urlquery", "comment": null}, "last_page_urlfragment": {"type": "character varying(3000)", "index": 27, "name": "last_page_urlfragment", "comment": null}, "referrer": {"type": "character varying(4096)", "index": 28, "name": "referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 29, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 30, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 31, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 32, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 33, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 34, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 35, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 36, "name": "refr_term", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 37, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 38, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 39, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 40, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 41, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 42, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 43, "name": "mkt_network", "comment": null}, "geo_country": {"type": "character(2)", "index": 44, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 45, "name": "geo_region", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 46, "name": "geo_region_name", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 47, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 48, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 49, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 50, "name": "geo_longitude", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 51, "name": "geo_timezone", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 52, "name": "user_ipaddress", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 53, "name": "useragent", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 54, "name": "br_renderengine", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 55, "name": "br_lang", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 56, "name": "os_timezone", "comment": null}, "category": {"type": "character varying(1)", "index": 57, "name": "category", "comment": null}, "primary_impact": {"type": "character varying(1)", "index": 58, "name": "primary_impact", "comment": null}, "reason": {"type": "character varying(1)", "index": 59, "name": "reason", "comment": null}, "spider_or_robot": {"type": "boolean", "index": 60, "name": "spider_or_robot", "comment": null}, "useragent_family": {"type": "character varying(1)", "index": 61, "name": "useragent_family", "comment": null}, "useragent_major": {"type": "character varying(1)", "index": 62, "name": "useragent_major", "comment": null}, "useragent_minor": {"type": "character varying(1)", "index": 63, "name": "useragent_minor", "comment": null}, "useragent_patch": {"type": "character varying(1)", "index": 64, "name": "useragent_patch", "comment": null}, "useragent_version": {"type": "character varying(1)", "index": 65, "name": "useragent_version", "comment": null}, "os_family": {"type": "character varying(1)", "index": 66, "name": "os_family", "comment": null}, "os_major": {"type": "character varying(1)", "index": 67, "name": "os_major", "comment": null}, "os_minor": {"type": "character varying(1)", "index": 68, "name": "os_minor", "comment": null}, "os_patch": {"type": "character varying(1)", "index": 69, "name": "os_patch", "comment": null}, "os_patch_minor": {"type": "character varying(1)", "index": 70, "name": "os_patch_minor", "comment": null}, "os_version": {"type": "character varying(1)", "index": 71, "name": "os_version", "comment": null}, "device_family": {"type": "character varying(1)", "index": 72, "name": "device_family", "comment": null}, "device_class": {"type": "character varying(1)", "index": 73, "name": "device_class", "comment": null}, "agent_class": {"type": "character varying(1)", "index": 74, "name": "agent_class", "comment": null}, "agent_name": {"type": "character varying(1)", "index": 75, "name": "agent_name", "comment": null}, "agent_name_version": {"type": "character varying(1)", "index": 76, "name": "agent_name_version", "comment": null}, "agent_name_version_major": {"type": "character varying(1)", "index": 77, "name": "agent_name_version_major", "comment": null}, "agent_version": {"type": "character varying(1)", "index": 78, "name": "agent_version", "comment": null}, "agent_version_major": {"type": "character varying(1)", "index": 79, "name": "agent_version_major", "comment": null}, "device_brand": {"type": "character varying(1)", "index": 80, "name": "device_brand", "comment": null}, "device_name": {"type": "character varying(1)", "index": 81, "name": "device_name", "comment": null}, "device_version": {"type": "character varying(1)", "index": 82, "name": "device_version", "comment": null}, "layout_engine_class": {"type": "character varying(1)", "index": 83, "name": "layout_engine_class", "comment": null}, "layout_engine_name": {"type": "character varying(1)", "index": 84, "name": "layout_engine_name", "comment": null}, "layout_engine_name_version": {"type": "character varying(1)", "index": 85, "name": "layout_engine_name_version", "comment": null}, "layout_engine_name_version_major": {"type": "character varying(1)", "index": 86, "name": "layout_engine_name_version_major", "comment": null}, "layout_engine_version": {"type": "character varying(1)", "index": 87, "name": "layout_engine_version", "comment": null}, "layout_engine_version_major": {"type": "character varying(1)", "index": 88, "name": "layout_engine_version_major", "comment": null}, "operating_system_class": {"type": "character varying(1)", "index": 89, "name": "operating_system_class", "comment": null}, "operating_system_name": {"type": "character varying(1)", "index": 90, "name": "operating_system_name", "comment": null}, "operating_system_name_version": {"type": "character varying(1)", "index": 91, "name": "operating_system_name_version", "comment": null}, "operating_system_version": {"type": "character varying(1)", "index": 92, "name": "operating_system_version", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_sessions"}, "model.snowplow_web.snowplow_web_users_sessions_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_users_sessions_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"app_id": {"type": "character varying(255)", "index": 1, "name": "app_id", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 2, "name": "domain_sessionid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 3, "name": "domain_sessionidx", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 5, "name": "end_tstamp", "comment": null}, "model_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "model_tstamp", "comment": null}, "user_id": {"type": "character varying(255)", "index": 7, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 8, "name": "domain_userid", "comment": null}, "stitched_user_id": {"type": "character varying(255)", "index": 9, "name": "stitched_user_id", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 10, "name": "network_userid", "comment": null}, "page_views": {"type": "bigint", "index": 11, "name": "page_views", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 12, "name": "engaged_time_in_s", "comment": null}, "absolute_time_in_s": {"type": "bigint", "index": 13, "name": "absolute_time_in_s", "comment": null}, "first_page_title": {"type": "character varying(2000)", "index": 14, "name": "first_page_title", "comment": null}, "first_page_url": {"type": "character varying(4096)", "index": 15, "name": "first_page_url", "comment": null}, "first_page_urlscheme": {"type": "character varying(16)", "index": 16, "name": "first_page_urlscheme", "comment": null}, "first_page_urlhost": {"type": "character varying(255)", "index": 17, "name": "first_page_urlhost", "comment": null}, "first_page_urlpath": {"type": "character varying(3000)", "index": 18, "name": "first_page_urlpath", "comment": null}, "first_page_urlquery": {"type": "character varying(6000)", "index": 19, "name": "first_page_urlquery", "comment": null}, "first_page_urlfragment": {"type": "character varying(3000)", "index": 20, "name": "first_page_urlfragment", "comment": null}, "last_page_title": {"type": "character varying(2000)", "index": 21, "name": "last_page_title", "comment": null}, "last_page_url": {"type": "character varying(4096)", "index": 22, "name": "last_page_url", "comment": null}, "last_page_urlscheme": {"type": "character varying(16)", "index": 23, "name": "last_page_urlscheme", "comment": null}, "last_page_urlhost": {"type": "character varying(255)", "index": 24, "name": "last_page_urlhost", "comment": null}, "last_page_urlpath": {"type": "character varying(3000)", "index": 25, "name": "last_page_urlpath", "comment": null}, "last_page_urlquery": {"type": "character varying(6000)", "index": 26, "name": "last_page_urlquery", "comment": null}, "last_page_urlfragment": {"type": "character varying(3000)", "index": 27, "name": "last_page_urlfragment", "comment": null}, "referrer": {"type": "character varying(4096)", "index": 28, "name": "referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 29, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 30, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 31, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 32, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 33, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 34, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 35, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 36, "name": "refr_term", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 37, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 38, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 39, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 40, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 41, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 42, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 43, "name": "mkt_network", "comment": null}, "geo_country": {"type": "character(2)", "index": 44, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 45, "name": "geo_region", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 46, "name": "geo_region_name", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 47, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 48, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 49, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 50, "name": "geo_longitude", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 51, "name": "geo_timezone", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 52, "name": "user_ipaddress", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 53, "name": "useragent", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 54, "name": "br_renderengine", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 55, "name": "br_lang", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 56, "name": "os_timezone", "comment": null}, "category": {"type": "character varying(1)", "index": 57, "name": "category", "comment": null}, "primary_impact": {"type": "character varying(1)", "index": 58, "name": "primary_impact", "comment": null}, "reason": {"type": "character varying(1)", "index": 59, "name": "reason", "comment": null}, "spider_or_robot": {"type": "boolean", "index": 60, "name": "spider_or_robot", "comment": null}, "useragent_family": {"type": "character varying(1)", "index": 61, "name": "useragent_family", "comment": null}, "useragent_major": {"type": "character varying(1)", "index": 62, "name": "useragent_major", "comment": null}, "useragent_minor": {"type": "character varying(1)", "index": 63, "name": "useragent_minor", "comment": null}, "useragent_patch": {"type": "character varying(1)", "index": 64, "name": "useragent_patch", "comment": null}, "useragent_version": {"type": "character varying(1)", "index": 65, "name": "useragent_version", "comment": null}, "os_family": {"type": "character varying(1)", "index": 66, "name": "os_family", "comment": null}, "os_major": {"type": "character varying(1)", "index": 67, "name": "os_major", "comment": null}, "os_minor": {"type": "character varying(1)", "index": 68, "name": "os_minor", "comment": null}, "os_patch": {"type": "character varying(1)", "index": 69, "name": "os_patch", "comment": null}, "os_patch_minor": {"type": "character varying(1)", "index": 70, "name": "os_patch_minor", "comment": null}, "os_version": {"type": "character varying(1)", "index": 71, "name": "os_version", "comment": null}, "device_family": {"type": "character varying(1)", "index": 72, "name": "device_family", "comment": null}, "device_class": {"type": "character varying(1)", "index": 73, "name": "device_class", "comment": null}, "agent_class": {"type": "character varying(1)", "index": 74, "name": "agent_class", "comment": null}, "agent_name": {"type": "character varying(1)", "index": 75, "name": "agent_name", "comment": null}, "agent_name_version": {"type": "character varying(1)", "index": 76, "name": "agent_name_version", "comment": null}, "agent_name_version_major": {"type": "character varying(1)", "index": 77, "name": "agent_name_version_major", "comment": null}, "agent_version": {"type": "character varying(1)", "index": 78, "name": "agent_version", "comment": null}, "agent_version_major": {"type": "character varying(1)", "index": 79, "name": "agent_version_major", "comment": null}, "device_brand": {"type": "character varying(1)", "index": 80, "name": "device_brand", "comment": null}, "device_name": {"type": "character varying(1)", "index": 81, "name": "device_name", "comment": null}, "device_version": {"type": "character varying(1)", "index": 82, "name": "device_version", "comment": null}, "layout_engine_class": {"type": "character varying(1)", "index": 83, "name": "layout_engine_class", "comment": null}, "layout_engine_name": {"type": "character varying(1)", "index": 84, "name": "layout_engine_name", "comment": null}, "layout_engine_name_version": {"type": "character varying(1)", "index": 85, "name": "layout_engine_name_version", "comment": null}, "layout_engine_name_version_major": {"type": "character varying(1)", "index": 86, "name": "layout_engine_name_version_major", "comment": null}, "layout_engine_version": {"type": "character varying(1)", "index": 87, "name": "layout_engine_version", "comment": null}, "layout_engine_version_major": {"type": "character varying(1)", "index": 88, "name": "layout_engine_version_major", "comment": null}, "operating_system_class": {"type": "character varying(1)", "index": 89, "name": "operating_system_class", "comment": null}, "operating_system_name": {"type": "character varying(1)", "index": 90, "name": "operating_system_name", "comment": null}, "operating_system_name_version": {"type": "character varying(1)", "index": 91, "name": "operating_system_name_version", "comment": null}, "operating_system_version": {"type": "character varying(1)", "index": 92, "name": "operating_system_version", "comment": null}, "user_start_tstamp": {"type": "timestamp without time zone", "index": 93, "name": "user_start_tstamp", "comment": null}, "user_end_tstamp": {"type": "timestamp without time zone", "index": 94, "name": "user_end_tstamp", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_users_sessions_this_run"}, "model.snowplow_web.snowplow_web_users_aggs": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_users_aggs", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"domain_userid": {"type": "character varying(128)", "index": 1, "name": "domain_userid", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 2, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 3, "name": "end_tstamp", "comment": null}, "first_domain_sessionid": {"type": "character varying(128)", "index": 4, "name": "first_domain_sessionid", "comment": null}, "last_domain_sessionid": {"type": "character varying(128)", "index": 5, "name": "last_domain_sessionid", "comment": null}, "page_views": {"type": "bigint", "index": 6, "name": "page_views", "comment": null}, "sessions": {"type": "bigint", "index": 7, "name": "sessions", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 8, "name": "engaged_time_in_s", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_users_aggs"}, "model.snowplow_web.snowplow_web_users_lasts": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_users_lasts", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"domain_userid": {"type": "character varying(128)", "index": 1, "name": "domain_userid", "comment": null}, "last_page_title": {"type": "character varying(2000)", "index": 2, "name": "last_page_title", "comment": null}, "last_page_url": {"type": "character varying(4096)", "index": 3, "name": "last_page_url", "comment": null}, "last_page_urlscheme": {"type": "character varying(16)", "index": 4, "name": "last_page_urlscheme", "comment": null}, "last_page_urlhost": {"type": "character varying(255)", "index": 5, "name": "last_page_urlhost", "comment": null}, "last_page_urlpath": {"type": "character varying(3000)", "index": 6, "name": "last_page_urlpath", "comment": null}, "last_page_urlquery": {"type": "character varying(6000)", "index": 7, "name": "last_page_urlquery", "comment": null}, "last_page_urlfragment": {"type": "character varying(3000)", "index": 8, "name": "last_page_urlfragment", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_users_lasts"}, "model.snowplow_web.snowplow_web_users_this_run": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_scratch", "name": "snowplow_web_users_this_run", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"user_id": {"type": "character varying(255)", "index": 1, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 2, "name": "domain_userid", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 3, "name": "network_userid", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 5, "name": "end_tstamp", "comment": null}, "model_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "model_tstamp", "comment": null}, "page_views": {"type": "bigint", "index": 7, "name": "page_views", "comment": null}, "sessions": {"type": "bigint", "index": 8, "name": "sessions", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 9, "name": "engaged_time_in_s", "comment": null}, "first_page_title": {"type": "character varying(2000)", "index": 10, "name": "first_page_title", "comment": null}, "first_page_url": {"type": "character varying(4096)", "index": 11, "name": "first_page_url", "comment": null}, "first_page_urlscheme": {"type": "character varying(16)", "index": 12, "name": "first_page_urlscheme", "comment": null}, "first_page_urlhost": {"type": "character varying(255)", "index": 13, "name": "first_page_urlhost", "comment": null}, "first_page_urlpath": {"type": "character varying(3000)", "index": 14, "name": "first_page_urlpath", "comment": null}, "first_page_urlquery": {"type": "character varying(6000)", "index": 15, "name": "first_page_urlquery", "comment": null}, "first_page_urlfragment": {"type": "character varying(3000)", "index": 16, "name": "first_page_urlfragment", "comment": null}, "last_page_title": {"type": "character varying(2000)", "index": 17, "name": "last_page_title", "comment": null}, "last_page_url": {"type": "character varying(4096)", "index": 18, "name": "last_page_url", "comment": null}, "last_page_urlscheme": {"type": "character varying(16)", "index": 19, "name": "last_page_urlscheme", "comment": null}, "last_page_urlhost": {"type": "character varying(255)", "index": 20, "name": "last_page_urlhost", "comment": null}, "last_page_urlpath": {"type": "character varying(3000)", "index": 21, "name": "last_page_urlpath", "comment": null}, "last_page_urlquery": {"type": "character varying(6000)", "index": 22, "name": "last_page_urlquery", "comment": null}, "last_page_urlfragment": {"type": "character varying(3000)", "index": 23, "name": "last_page_urlfragment", "comment": null}, "referrer": {"type": "character varying(4096)", "index": 24, "name": "referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 25, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 26, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 27, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 28, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 29, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 30, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 31, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 32, "name": "refr_term", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 33, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 34, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 35, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 36, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 37, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 38, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 39, "name": "mkt_network", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_users_this_run"}, "model.snowplow_web.snowplow_web_users": {"metadata": {"type": "BASE TABLE", "schema": "dbt_agnes_derived", "name": "snowplow_web_users", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"user_id": {"type": "character varying(255)", "index": 1, "name": "user_id", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 2, "name": "domain_userid", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 3, "name": "network_userid", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 5, "name": "end_tstamp", "comment": null}, "model_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "model_tstamp", "comment": null}, "page_views": {"type": "bigint", "index": 7, "name": "page_views", "comment": null}, "sessions": {"type": "bigint", "index": 8, "name": "sessions", "comment": null}, "engaged_time_in_s": {"type": "bigint", "index": 9, "name": "engaged_time_in_s", "comment": null}, "first_page_title": {"type": "character varying(2000)", "index": 10, "name": "first_page_title", "comment": null}, "first_page_url": {"type": "character varying(4096)", "index": 11, "name": "first_page_url", "comment": null}, "first_page_urlscheme": {"type": "character varying(16)", "index": 12, "name": "first_page_urlscheme", "comment": null}, "first_page_urlhost": {"type": "character varying(255)", "index": 13, "name": "first_page_urlhost", "comment": null}, "first_page_urlpath": {"type": "character varying(3000)", "index": 14, "name": "first_page_urlpath", "comment": null}, "first_page_urlquery": {"type": "character varying(6000)", "index": 15, "name": "first_page_urlquery", "comment": null}, "first_page_urlfragment": {"type": "character varying(3000)", "index": 16, "name": "first_page_urlfragment", "comment": null}, "last_page_title": {"type": "character varying(2000)", "index": 17, "name": "last_page_title", "comment": null}, "last_page_url": {"type": "character varying(4096)", "index": 18, "name": "last_page_url", "comment": null}, "last_page_urlscheme": {"type": "character varying(16)", "index": 19, "name": "last_page_urlscheme", "comment": null}, "last_page_urlhost": {"type": "character varying(255)", "index": 20, "name": "last_page_urlhost", "comment": null}, "last_page_urlpath": {"type": "character varying(3000)", "index": 21, "name": "last_page_urlpath", "comment": null}, "last_page_urlquery": {"type": "character varying(6000)", "index": 22, "name": "last_page_urlquery", "comment": null}, "last_page_urlfragment": {"type": "character varying(3000)", "index": 23, "name": "last_page_urlfragment", "comment": null}, "referrer": {"type": "character varying(4096)", "index": 24, "name": "referrer", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 25, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 26, "name": "refr_urlhost", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 27, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 28, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 29, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 30, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 31, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 32, "name": "refr_term", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 33, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 34, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 35, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 36, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 37, "name": "mkt_campaign", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 38, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 39, "name": "mkt_network", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_web.snowplow_web_users"}, "model.snowplow_media_player.snowplow_media_player_plays_by_pageview": {"metadata": {"type": "LATE BINDING VIEW", "schema": "dbt_agnes_derived", "name": "snowplow_media_player_plays_by_pageview", "database": "dev1", "comment": null, "owner": "agnes"}, "columns": {"play_id": {"type": "character varying(32)", "index": 1, "name": "play_id", "comment": null}, "page_view_id": {"type": "character varying(4096)", "index": 2, "name": "page_view_id", "comment": null}, "media_id": {"type": "character varying(65535)", "index": 3, "name": "media_id", "comment": null}, "media_label": {"type": "character varying(4096)", "index": 4, "name": "media_label", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 5, "name": "domain_sessionid", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 6, "name": "domain_userid", "comment": null}, "duration": {"type": "double precision", "index": 7, "name": "duration", "comment": null}, "media_type": {"type": "character varying(5)", "index": 8, "name": "media_type", "comment": null}, "media_player_type": {"type": "character varying(257)", "index": 9, "name": "media_player_type", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 10, "name": "page_referrer", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 11, "name": "page_url", "comment": null}, "source_url": {"type": "character varying(65535)", "index": 12, "name": "source_url", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 13, "name": "geo_region_name", "comment": null}, "br_name": {"type": "character varying(50)", "index": 14, "name": "br_name", "comment": null}, "dvce_type": {"type": "character varying(50)", "index": 15, "name": "dvce_type", "comment": null}, "os_name": {"type": "character varying(50)", "index": 16, "name": "os_name", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 17, "name": "os_timezone", "comment": null}, "start_tstamp": {"type": "timestamp without time zone", "index": 18, "name": "start_tstamp", "comment": null}, "end_tstamp": {"type": "timestamp without time zone", "index": 19, "name": "end_tstamp", "comment": null}, "play_time_sec": {"type": "bigint", "index": 20, "name": "play_time_sec", "comment": null}, "play_time_sec_muted": {"type": "bigint", "index": 21, "name": "play_time_sec_muted", "comment": null}, "is_played": {"type": "boolean", "index": 22, "name": "is_played", "comment": null}, "is_valid_play": {"type": "boolean", "index": 23, "name": "is_valid_play", "comment": null}, "is_complete_play": {"type": "boolean", "index": 24, "name": "is_complete_play", "comment": null}, "avg_playback_rate": {"type": "double precision", "index": 25, "name": "avg_playback_rate", "comment": null}, "retention_rate": {"type": "double precision", "index": 26, "name": "retention_rate", "comment": null}, "seeks": {"type": "bigint", "index": 27, "name": "seeks", "comment": null}, "percent_progress_reached": {"type": "character varying(65535)", "index": 28, "name": "percent_progress_reached", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snowplow_media_player.snowplow_media_player_plays_by_pageview"}}, "sources": {"source.snowplow_web.atomic.events": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "events", "database": "dev1", "comment": "0.11.0", "owner": "storageloader"}, "columns": {"app_id": {"type": "character varying(255)", "index": 1, "name": "app_id", "comment": null}, "platform": {"type": "character varying(255)", "index": 2, "name": "platform", "comment": null}, "etl_tstamp": {"type": "timestamp without time zone", "index": 3, "name": "etl_tstamp", "comment": null}, "collector_tstamp": {"type": "timestamp without time zone", "index": 4, "name": "collector_tstamp", "comment": null}, "dvce_created_tstamp": {"type": "timestamp without time zone", "index": 5, "name": "dvce_created_tstamp", "comment": null}, "event": {"type": "character varying(128)", "index": 6, "name": "event", "comment": null}, "event_id": {"type": "character(36)", "index": 7, "name": "event_id", "comment": null}, "txn_id": {"type": "integer", "index": 8, "name": "txn_id", "comment": null}, "name_tracker": {"type": "character varying(128)", "index": 9, "name": "name_tracker", "comment": null}, "v_tracker": {"type": "character varying(100)", "index": 10, "name": "v_tracker", "comment": null}, "v_collector": {"type": "character varying(100)", "index": 11, "name": "v_collector", "comment": null}, "v_etl": {"type": "character varying(100)", "index": 12, "name": "v_etl", "comment": null}, "user_id": {"type": "character varying(255)", "index": 13, "name": "user_id", "comment": null}, "user_ipaddress": {"type": "character varying(128)", "index": 14, "name": "user_ipaddress", "comment": null}, "user_fingerprint": {"type": "character varying(128)", "index": 15, "name": "user_fingerprint", "comment": null}, "domain_userid": {"type": "character varying(128)", "index": 16, "name": "domain_userid", "comment": null}, "domain_sessionidx": {"type": "integer", "index": 17, "name": "domain_sessionidx", "comment": null}, "network_userid": {"type": "character varying(128)", "index": 18, "name": "network_userid", "comment": null}, "geo_country": {"type": "character(2)", "index": 19, "name": "geo_country", "comment": null}, "geo_region": {"type": "character(3)", "index": 20, "name": "geo_region", "comment": null}, "geo_city": {"type": "character varying(75)", "index": 21, "name": "geo_city", "comment": null}, "geo_zipcode": {"type": "character varying(15)", "index": 22, "name": "geo_zipcode", "comment": null}, "geo_latitude": {"type": "double precision", "index": 23, "name": "geo_latitude", "comment": null}, "geo_longitude": {"type": "double precision", "index": 24, "name": "geo_longitude", "comment": null}, "geo_region_name": {"type": "character varying(100)", "index": 25, "name": "geo_region_name", "comment": null}, "ip_isp": {"type": "character varying(100)", "index": 26, "name": "ip_isp", "comment": null}, "ip_organization": {"type": "character varying(128)", "index": 27, "name": "ip_organization", "comment": null}, "ip_domain": {"type": "character varying(128)", "index": 28, "name": "ip_domain", "comment": null}, "ip_netspeed": {"type": "character varying(100)", "index": 29, "name": "ip_netspeed", "comment": null}, "page_url": {"type": "character varying(4096)", "index": 30, "name": "page_url", "comment": null}, "page_title": {"type": "character varying(2000)", "index": 31, "name": "page_title", "comment": null}, "page_referrer": {"type": "character varying(4096)", "index": 32, "name": "page_referrer", "comment": null}, "page_urlscheme": {"type": "character varying(16)", "index": 33, "name": "page_urlscheme", "comment": null}, "page_urlhost": {"type": "character varying(255)", "index": 34, "name": "page_urlhost", "comment": null}, "page_urlport": {"type": "integer", "index": 35, "name": "page_urlport", "comment": null}, "page_urlpath": {"type": "character varying(3000)", "index": 36, "name": "page_urlpath", "comment": null}, "page_urlquery": {"type": "character varying(6000)", "index": 37, "name": "page_urlquery", "comment": null}, "page_urlfragment": {"type": "character varying(3000)", "index": 38, "name": "page_urlfragment", "comment": null}, "refr_urlscheme": {"type": "character varying(16)", "index": 39, "name": "refr_urlscheme", "comment": null}, "refr_urlhost": {"type": "character varying(255)", "index": 40, "name": "refr_urlhost", "comment": null}, "refr_urlport": {"type": "integer", "index": 41, "name": "refr_urlport", "comment": null}, "refr_urlpath": {"type": "character varying(6000)", "index": 42, "name": "refr_urlpath", "comment": null}, "refr_urlquery": {"type": "character varying(6000)", "index": 43, "name": "refr_urlquery", "comment": null}, "refr_urlfragment": {"type": "character varying(3000)", "index": 44, "name": "refr_urlfragment", "comment": null}, "refr_medium": {"type": "character varying(25)", "index": 45, "name": "refr_medium", "comment": null}, "refr_source": {"type": "character varying(50)", "index": 46, "name": "refr_source", "comment": null}, "refr_term": {"type": "character varying(255)", "index": 47, "name": "refr_term", "comment": null}, "mkt_medium": {"type": "character varying(255)", "index": 48, "name": "mkt_medium", "comment": null}, "mkt_source": {"type": "character varying(255)", "index": 49, "name": "mkt_source", "comment": null}, "mkt_term": {"type": "character varying(255)", "index": 50, "name": "mkt_term", "comment": null}, "mkt_content": {"type": "character varying(500)", "index": 51, "name": "mkt_content", "comment": null}, "mkt_campaign": {"type": "character varying(255)", "index": 52, "name": "mkt_campaign", "comment": null}, "se_category": {"type": "character varying(1000)", "index": 53, "name": "se_category", "comment": null}, "se_action": {"type": "character varying(1000)", "index": 54, "name": "se_action", "comment": null}, "se_label": {"type": "character varying(4096)", "index": 55, "name": "se_label", "comment": null}, "se_property": {"type": "character varying(1000)", "index": 56, "name": "se_property", "comment": null}, "se_value": {"type": "double precision", "index": 57, "name": "se_value", "comment": null}, "tr_orderid": {"type": "character varying(255)", "index": 58, "name": "tr_orderid", "comment": null}, "tr_affiliation": {"type": "character varying(255)", "index": 59, "name": "tr_affiliation", "comment": null}, "tr_total": {"type": "numeric(18,2)", "index": 60, "name": "tr_total", "comment": null}, "tr_tax": {"type": "numeric(18,2)", "index": 61, "name": "tr_tax", "comment": null}, "tr_shipping": {"type": "numeric(18,2)", "index": 62, "name": "tr_shipping", "comment": null}, "tr_city": {"type": "character varying(255)", "index": 63, "name": "tr_city", "comment": null}, "tr_state": {"type": "character varying(255)", "index": 64, "name": "tr_state", "comment": null}, "tr_country": {"type": "character varying(255)", "index": 65, "name": "tr_country", "comment": null}, "ti_orderid": {"type": "character varying(255)", "index": 66, "name": "ti_orderid", "comment": null}, "ti_sku": {"type": "character varying(255)", "index": 67, "name": "ti_sku", "comment": null}, "ti_name": {"type": "character varying(255)", "index": 68, "name": "ti_name", "comment": null}, "ti_category": {"type": "character varying(255)", "index": 69, "name": "ti_category", "comment": null}, "ti_price": {"type": "numeric(18,2)", "index": 70, "name": "ti_price", "comment": null}, "ti_quantity": {"type": "integer", "index": 71, "name": "ti_quantity", "comment": null}, "pp_xoffset_min": {"type": "integer", "index": 72, "name": "pp_xoffset_min", "comment": null}, "pp_xoffset_max": {"type": "integer", "index": 73, "name": "pp_xoffset_max", "comment": null}, "pp_yoffset_min": {"type": "integer", "index": 74, "name": "pp_yoffset_min", "comment": null}, "pp_yoffset_max": {"type": "integer", "index": 75, "name": "pp_yoffset_max", "comment": null}, "useragent": {"type": "character varying(1000)", "index": 76, "name": "useragent", "comment": null}, "br_name": {"type": "character varying(50)", "index": 77, "name": "br_name", "comment": null}, "br_family": {"type": "character varying(50)", "index": 78, "name": "br_family", "comment": null}, "br_version": {"type": "character varying(50)", "index": 79, "name": "br_version", "comment": null}, "br_type": {"type": "character varying(50)", "index": 80, "name": "br_type", "comment": null}, "br_renderengine": {"type": "character varying(50)", "index": 81, "name": "br_renderengine", "comment": null}, "br_lang": {"type": "character varying(255)", "index": 82, "name": "br_lang", "comment": null}, "br_features_pdf": {"type": "boolean", "index": 83, "name": "br_features_pdf", "comment": null}, "br_features_flash": {"type": "boolean", "index": 84, "name": "br_features_flash", "comment": null}, "br_features_java": {"type": "boolean", "index": 85, "name": "br_features_java", "comment": null}, "br_features_director": {"type": "boolean", "index": 86, "name": "br_features_director", "comment": null}, "br_features_quicktime": {"type": "boolean", "index": 87, "name": "br_features_quicktime", "comment": null}, "br_features_realplayer": {"type": "boolean", "index": 88, "name": "br_features_realplayer", "comment": null}, "br_features_windowsmedia": {"type": "boolean", "index": 89, "name": "br_features_windowsmedia", "comment": null}, "br_features_gears": {"type": "boolean", "index": 90, "name": "br_features_gears", "comment": null}, "br_features_silverlight": {"type": "boolean", "index": 91, "name": "br_features_silverlight", "comment": null}, "br_cookies": {"type": "boolean", "index": 92, "name": "br_cookies", "comment": null}, "br_colordepth": {"type": "character varying(12)", "index": 93, "name": "br_colordepth", "comment": null}, "br_viewwidth": {"type": "integer", "index": 94, "name": "br_viewwidth", "comment": null}, "br_viewheight": {"type": "integer", "index": 95, "name": "br_viewheight", "comment": null}, "os_name": {"type": "character varying(50)", "index": 96, "name": "os_name", "comment": null}, "os_family": {"type": "character varying(50)", "index": 97, "name": "os_family", "comment": null}, "os_manufacturer": {"type": "character varying(50)", "index": 98, "name": "os_manufacturer", "comment": null}, "os_timezone": {"type": "character varying(255)", "index": 99, "name": "os_timezone", "comment": null}, "dvce_type": {"type": "character varying(50)", "index": 100, "name": "dvce_type", "comment": null}, "dvce_ismobile": {"type": "boolean", "index": 101, "name": "dvce_ismobile", "comment": null}, "dvce_screenwidth": {"type": "integer", "index": 102, "name": "dvce_screenwidth", "comment": null}, "dvce_screenheight": {"type": "integer", "index": 103, "name": "dvce_screenheight", "comment": null}, "doc_charset": {"type": "character varying(128)", "index": 104, "name": "doc_charset", "comment": null}, "doc_width": {"type": "integer", "index": 105, "name": "doc_width", "comment": null}, "doc_height": {"type": "integer", "index": 106, "name": "doc_height", "comment": null}, "tr_currency": {"type": "character(3)", "index": 107, "name": "tr_currency", "comment": null}, "tr_total_base": {"type": "numeric(18,2)", "index": 108, "name": "tr_total_base", "comment": null}, "tr_tax_base": {"type": "numeric(18,2)", "index": 109, "name": "tr_tax_base", "comment": null}, "tr_shipping_base": {"type": "numeric(18,2)", "index": 110, "name": "tr_shipping_base", "comment": null}, "ti_currency": {"type": "character(3)", "index": 111, "name": "ti_currency", "comment": null}, "ti_price_base": {"type": "numeric(18,2)", "index": 112, "name": "ti_price_base", "comment": null}, "base_currency": {"type": "character(3)", "index": 113, "name": "base_currency", "comment": null}, "geo_timezone": {"type": "character varying(64)", "index": 114, "name": "geo_timezone", "comment": null}, "mkt_clickid": {"type": "character varying(128)", "index": 115, "name": "mkt_clickid", "comment": null}, "mkt_network": {"type": "character varying(64)", "index": 116, "name": "mkt_network", "comment": null}, "etl_tags": {"type": "character varying(500)", "index": 117, "name": "etl_tags", "comment": null}, "dvce_sent_tstamp": {"type": "timestamp without time zone", "index": 118, "name": "dvce_sent_tstamp", "comment": null}, "refr_domain_userid": {"type": "character varying(128)", "index": 119, "name": "refr_domain_userid", "comment": null}, "refr_dvce_tstamp": {"type": "timestamp without time zone", "index": 120, "name": "refr_dvce_tstamp", "comment": null}, "domain_sessionid": {"type": "character(128)", "index": 121, "name": "domain_sessionid", "comment": null}, "derived_tstamp": {"type": "timestamp without time zone", "index": 122, "name": "derived_tstamp", "comment": null}, "event_vendor": {"type": "character varying(1000)", "index": 123, "name": "event_vendor", "comment": null}, "event_name": {"type": "character varying(1000)", "index": 124, "name": "event_name", "comment": null}, "event_format": {"type": "character varying(128)", "index": 125, "name": "event_format", "comment": null}, "event_version": {"type": "character varying(128)", "index": 126, "name": "event_version", "comment": null}, "event_fingerprint": {"type": "character varying(128)", "index": 127, "name": "event_fingerprint", "comment": null}, "true_tstamp": {"type": "timestamp without time zone", "index": 128, "name": "true_tstamp", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_web.atomic.events"}, "source.snowplow_web.atomic.nl_basjes_yauaa_context_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "nl_basjes_yauaa_context_1", "database": "dev1", "comment": "iglu:nl.basjes/yauaa_context/jsonschema/1-0-3", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "device_class": {"type": "character varying(21)", "index": 10, "name": "device_class", "comment": null}, "agent_build": {"type": "character varying(100)", "index": 11, "name": "agent_build", "comment": null}, "agent_class": {"type": "character varying(17)", "index": 12, "name": "agent_class", "comment": null}, "agent_information_email": {"type": "character varying(255)", "index": 13, "name": "agent_information_email", "comment": null}, "agent_information_url": {"type": "character varying(4096)", "index": 14, "name": "agent_information_url", "comment": null}, "agent_language": {"type": "character varying(50)", "index": 15, "name": "agent_language", "comment": null}, "agent_language_code": {"type": "character varying(20)", "index": 16, "name": "agent_language_code", "comment": null}, "agent_name": {"type": "character varying(100)", "index": 17, "name": "agent_name", "comment": null}, "agent_name_version": {"type": "character varying(200)", "index": 18, "name": "agent_name_version", "comment": null}, "agent_name_version_major": {"type": "character varying(120)", "index": 19, "name": "agent_name_version_major", "comment": null}, "agent_security": {"type": "character varying(15)", "index": 20, "name": "agent_security", "comment": null}, "agent_uuid": {"type": "character varying(4096)", "index": 21, "name": "agent_uuid", "comment": null}, "agent_version": {"type": "character varying(100)", "index": 22, "name": "agent_version", "comment": null}, "agent_version_major": {"type": "character varying(100)", "index": 23, "name": "agent_version_major", "comment": null}, "anonymized": {"type": "character varying(4096)", "index": 24, "name": "anonymized", "comment": null}, "carrier": {"type": "character varying(4096)", "index": 25, "name": "carrier", "comment": null}, "device_brand": {"type": "character varying(50)", "index": 26, "name": "device_brand", "comment": null}, "device_cpu": {"type": "character varying(50)", "index": 27, "name": "device_cpu", "comment": null}, "device_cpu_bits": {"type": "character varying(20)", "index": 28, "name": "device_cpu_bits", "comment": null}, "device_firmware_version": {"type": "character varying(100)", "index": 29, "name": "device_firmware_version", "comment": null}, "device_name": {"type": "character varying(100)", "index": 30, "name": "device_name", "comment": null}, "device_version": {"type": "character varying(100)", "index": 31, "name": "device_version", "comment": null}, "facebook_carrier": {"type": "character varying(4096)", "index": 32, "name": "facebook_carrier", "comment": null}, "facebook_device_class": {"type": "character varying(1024)", "index": 33, "name": "facebook_device_class", "comment": null}, "facebook_device_name": {"type": "character varying(1024)", "index": 34, "name": "facebook_device_name", "comment": null}, "facebook_device_version": {"type": "character varying(4096)", "index": 35, "name": "facebook_device_version", "comment": null}, "facebook_fbop": {"type": "character varying(4096)", "index": 36, "name": "facebook_fbop", "comment": null}, "facebook_fbss": {"type": "character varying(4096)", "index": 37, "name": "facebook_fbss", "comment": null}, "facebook_operating_system_name": {"type": "character varying(4096)", "index": 38, "name": "facebook_operating_system_name", "comment": null}, "facebook_operating_system_version": {"type": "character varying(4096)", "index": 39, "name": "facebook_operating_system_version", "comment": null}, "g_sa_installation_id": {"type": "character varying(4096)", "index": 40, "name": "g_sa_installation_id", "comment": null}, "hacker_attack_vector": {"type": "character varying(4096)", "index": 41, "name": "hacker_attack_vector", "comment": null}, "hacker_toolkit": {"type": "character varying(4096)", "index": 42, "name": "hacker_toolkit", "comment": null}, "i_e_compatibility_name_version": {"type": "character varying(50)", "index": 43, "name": "i_e_compatibility_name_version", "comment": null}, "i_e_compatibility_name_version_major": {"type": "character varying(70)", "index": 44, "name": "i_e_compatibility_name_version_major", "comment": null}, "i_e_compatibility_version": {"type": "character varying(100)", "index": 45, "name": "i_e_compatibility_version", "comment": null}, "i_e_compatibility_version_major": {"type": "character varying(50)", "index": 46, "name": "i_e_compatibility_version_major", "comment": null}, "kobo_affiliate": {"type": "character varying(4096)", "index": 47, "name": "kobo_affiliate", "comment": null}, "kobo_platform_id": {"type": "character varying(4096)", "index": 48, "name": "kobo_platform_id", "comment": null}, "layout_engine_build": {"type": "character varying(100)", "index": 49, "name": "layout_engine_build", "comment": null}, "layout_engine_class": {"type": "character varying(10)", "index": 50, "name": "layout_engine_class", "comment": null}, "layout_engine_name": {"type": "character varying(100)", "index": 51, "name": "layout_engine_name", "comment": null}, "layout_engine_name_version": {"type": "character varying(150)", "index": 52, "name": "layout_engine_name_version", "comment": null}, "layout_engine_name_version_major": {"type": "character varying(120)", "index": 53, "name": "layout_engine_name_version_major", "comment": null}, "layout_engine_version": {"type": "character varying(50)", "index": 54, "name": "layout_engine_version", "comment": null}, "layout_engine_version_major": {"type": "character varying(20)", "index": 55, "name": "layout_engine_version_major", "comment": null}, "network_type": {"type": "character varying(4096)", "index": 56, "name": "network_type", "comment": null}, "operating_system_class": {"type": "character varying(12)", "index": 57, "name": "operating_system_class", "comment": null}, "operating_system_name": {"type": "character varying(100)", "index": 58, "name": "operating_system_name", "comment": null}, "operating_system_name_version": {"type": "character varying(150)", "index": 59, "name": "operating_system_name_version", "comment": null}, "operating_system_version": {"type": "character varying(50)", "index": 60, "name": "operating_system_version", "comment": null}, "operating_system_version_build": {"type": "character varying(100)", "index": 61, "name": "operating_system_version_build", "comment": null}, "webview_app_name": {"type": "character varying(4096)", "index": 62, "name": "webview_app_name", "comment": null}, "webview_app_name_version_major": {"type": "character varying(50)", "index": 63, "name": "webview_app_name_version_major", "comment": null}, "webview_app_version": {"type": "character varying(4096)", "index": 64, "name": "webview_app_version", "comment": null}, "webview_app_version_major": {"type": "character varying(50)", "index": 65, "name": "webview_app_version_major", "comment": null}, "operating_system_name_version_major": {"type": "character varying(4096)", "index": 66, "name": "operating_system_name_version_major", "comment": null}, "operating_system_version_major": {"type": "character varying(4096)", "index": 67, "name": "operating_system_version_major", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_web.atomic.nl_basjes_yauaa_context_1"}, "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_web_page_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "com_snowplowanalytics_snowplow_web_page_1", "database": "dev1", "comment": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "id": {"type": "character varying(4096)", "index": 10, "name": "id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_web_page_1"}, "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "com_snowplowanalytics_snowplow_web_page_1", "database": "dev1", "comment": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "id": {"type": "character varying(4096)", "index": 10, "name": "id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1"}, "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_ua_parser_context_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "com_snowplowanalytics_snowplow_ua_parser_context_1", "database": "dev1", "comment": "iglu:com.snowplowanalytics.snowplow/ua_parser_context/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "device_family": {"type": "character varying(4096)", "index": 10, "name": "device_family", "comment": null}, "os_family": {"type": "character varying(4096)", "index": 11, "name": "os_family", "comment": null}, "useragent_family": {"type": "character varying(4096)", "index": 12, "name": "useragent_family", "comment": null}, "os_major": {"type": "character varying(4096)", "index": 13, "name": "os_major", "comment": null}, "os_minor": {"type": "character varying(4096)", "index": 14, "name": "os_minor", "comment": null}, "os_patch": {"type": "character varying(4096)", "index": 15, "name": "os_patch", "comment": null}, "os_patch_minor": {"type": "character varying(4096)", "index": 16, "name": "os_patch_minor", "comment": null}, "os_version": {"type": "character varying(4096)", "index": 17, "name": "os_version", "comment": null}, "useragent_major": {"type": "character varying(4096)", "index": 18, "name": "useragent_major", "comment": null}, "useragent_minor": {"type": "character varying(4096)", "index": 19, "name": "useragent_minor", "comment": null}, "useragent_patch": {"type": "character varying(4096)", "index": 20, "name": "useragent_patch", "comment": null}, "useragent_version": {"type": "character varying(4096)", "index": 21, "name": "useragent_version", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_ua_parser_context_1"}, "source.snowplow_web.atomic.com_iab_snowplow_spiders_and_robots_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "com_iab_snowplow_spiders_and_robots_1", "database": "dev1", "comment": "iglu:com.iab.snowplow/spiders_and_robots/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "category": {"type": "character varying(24)", "index": 10, "name": "category", "comment": null}, "primary_impact": {"type": "character varying(23)", "index": 11, "name": "primary_impact", "comment": null}, "reason": {"type": "character varying(17)", "index": 12, "name": "reason", "comment": null}, "spider_or_robot": {"type": "boolean", "index": 13, "name": "spider_or_robot", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_web.atomic.com_iab_snowplow_spiders_and_robots_1"}, "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "com_snowplowanalytics_snowplow_media_player_event_1", "database": "dev1", "comment": "iglu:com.snowplowanalytics.snowplow/media_player_event/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "type": {"type": "character varying(255)", "index": 10, "name": "type", "comment": null}, "label": {"type": "character varying(4096)", "index": 11, "name": "label", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1"}, "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "com_snowplowanalytics_snowplow_media_player_1", "database": "dev1", "comment": "iglu:com.snowplowanalytics.snowplow/media_player/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "current_time": {"type": "double precision", "index": 10, "name": "current_time", "comment": null}, "ended": {"type": "boolean", "index": 11, "name": "ended", "comment": null}, "loop": {"type": "boolean", "index": 12, "name": "loop", "comment": null}, "muted": {"type": "boolean", "index": 13, "name": "muted", "comment": null}, "paused": {"type": "boolean", "index": 14, "name": "paused", "comment": null}, "playback_rate": {"type": "double precision", "index": 15, "name": "playback_rate", "comment": null}, "volume": {"type": "smallint", "index": 16, "name": "volume", "comment": null}, "duration": {"type": "double precision", "index": 17, "name": "duration", "comment": null}, "is_live": {"type": "boolean", "index": 18, "name": "is_live", "comment": null}, "percent_progress": {"type": "smallint", "index": 19, "name": "percent_progress", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1"}, "source.snowplow_media_player.atomic.org_whatwg_video_element_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "org_whatwg_video_element_1", "database": "dev1", "comment": "iglu:org.whatwg/video_element/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "video_height": {"type": "integer", "index": 10, "name": "video_height", "comment": null}, "video_width": {"type": "integer", "index": 11, "name": "video_width", "comment": null}, "auto_picture_in_picture": {"type": "boolean", "index": 12, "name": "auto_picture_in_picture", "comment": null}, "disable_picture_in_picture": {"type": "boolean", "index": 13, "name": "disable_picture_in_picture", "comment": null}, "poster": {"type": "character varying(65535)", "index": 14, "name": "poster", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_media_player.atomic.org_whatwg_video_element_1"}, "source.snowplow_media_player.atomic.org_whatwg_media_element_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "org_whatwg_media_element_1", "database": "dev1", "comment": "iglu:org.whatwg/media_element/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "auto_play": {"type": "boolean", "index": 10, "name": "auto_play", "comment": null}, "buffered": {"type": "character varying(65535)", "index": 11, "name": "buffered", "comment": null}, "controls": {"type": "boolean", "index": 12, "name": "controls", "comment": null}, "current_src": {"type": "character varying(65535)", "index": 13, "name": "current_src", "comment": null}, "default_muted": {"type": "boolean", "index": 14, "name": "default_muted", "comment": null}, "default_playback_rate": {"type": "double precision", "index": 15, "name": "default_playback_rate", "comment": null}, "html_id": {"type": "character varying(65535)", "index": 16, "name": "html_id", "comment": null}, "media_type": {"type": "character varying(5)", "index": 17, "name": "media_type", "comment": null}, "network_state": {"type": "character varying(17)", "index": 18, "name": "network_state", "comment": null}, "preload": {"type": "character varying(65535)", "index": 19, "name": "preload", "comment": null}, "ready_state": {"type": "character varying(17)", "index": 20, "name": "ready_state", "comment": null}, "seekable": {"type": "character varying(65535)", "index": 21, "name": "seekable", "comment": null}, "seeking": {"type": "boolean", "index": 22, "name": "seeking", "comment": null}, "cross_origin": {"type": "character varying(255)", "index": 23, "name": "cross_origin", "comment": null}, "disable_remote_playback": {"type": "boolean", "index": 24, "name": "disable_remote_playback", "comment": null}, "error": {"type": "character varying(4096)", "index": 25, "name": "error", "comment": null}, "file_extension": {"type": "character varying(255)", "index": 26, "name": "file_extension", "comment": null}, "fullscreen": {"type": "boolean", "index": 27, "name": "fullscreen", "comment": null}, "picture_in_picture": {"type": "boolean", "index": 28, "name": "picture_in_picture", "comment": null}, "played": {"type": "character varying(65535)", "index": 29, "name": "played", "comment": null}, "src": {"type": "character varying(65535)", "index": 30, "name": "src", "comment": null}, "text_tracks": {"type": "character varying(65535)", "index": 31, "name": "text_tracks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_media_player.atomic.org_whatwg_media_element_1"}, "source.snowplow_media_player.atomic.com_youtube_youtube_1": {"metadata": {"type": "BASE TABLE", "schema": "atomic", "name": "com_youtube_youtube_1", "database": "dev1", "comment": "iglu:com.youtube/youtube/jsonschema/1-0-0", "owner": "storageloader"}, "columns": {"schema_vendor": {"type": "character varying(128)", "index": 1, "name": "schema_vendor", "comment": null}, "schema_name": {"type": "character varying(128)", "index": 2, "name": "schema_name", "comment": null}, "schema_format": {"type": "character varying(128)", "index": 3, "name": "schema_format", "comment": null}, "schema_version": {"type": "character varying(128)", "index": 4, "name": "schema_version", "comment": null}, "root_id": {"type": "character(36)", "index": 5, "name": "root_id", "comment": null}, "root_tstamp": {"type": "timestamp without time zone", "index": 6, "name": "root_tstamp", "comment": null}, "ref_root": {"type": "character varying(255)", "index": 7, "name": "ref_root", "comment": null}, "ref_tree": {"type": "character varying(1500)", "index": 8, "name": "ref_tree", "comment": null}, "ref_parent": {"type": "character varying(255)", "index": 9, "name": "ref_parent", "comment": null}, "auto_play": {"type": "boolean", "index": 10, "name": "auto_play", "comment": null}, "avaliable_playback_rates": {"type": "character varying(65535)", "index": 11, "name": "avaliable_playback_rates", "comment": null}, "buffering": {"type": "boolean", "index": 12, "name": "buffering", "comment": null}, "controls": {"type": "boolean", "index": 13, "name": "controls", "comment": null}, "cued": {"type": "boolean", "index": 14, "name": "cued", "comment": null}, "loaded": {"type": "smallint", "index": 15, "name": "loaded", "comment": null}, "playback_quality": {"type": "character varying(128)", "index": 16, "name": "playback_quality", "comment": null}, "player_id": {"type": "character varying(65535)", "index": 17, "name": "player_id", "comment": null}, "unstarted": {"type": "boolean", "index": 18, "name": "unstarted", "comment": null}, "url": {"type": "character varying(65535)", "index": 19, "name": "url", "comment": null}, "avaliable_quality_levels": {"type": "character varying(65535)", "index": 20, "name": "avaliable_quality_levels", "comment": null}, "error": {"type": "character varying(18)", "index": 21, "name": "error", "comment": null}, "fov": {"type": "double precision", "index": 22, "name": "fov", "comment": null}, "origin": {"type": "character varying(65535)", "index": 23, "name": "origin", "comment": null}, "pitch": {"type": "double precision", "index": 24, "name": "pitch", "comment": null}, "playlist": {"type": "character varying(65535)", "index": 25, "name": "playlist", "comment": null}, "playlist_index": {"type": "double precision", "index": 26, "name": "playlist_index", "comment": null}, "roll": {"type": "double precision", "index": 27, "name": "roll", "comment": null}, "yaw": {"type": "double precision", "index": 28, "name": "yaw", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snowplow_media_player.atomic.com_youtube_youtube_1"}}, "errors": null} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..fa8b08b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,102 @@ + + + + + + + dbt Docs + + + + + + + + + + + + + + + + + +
icons
+
+ + diff --git a/docs/manifest.json b/docs/manifest.json new file mode 100644 index 0000000..5b03da1 --- /dev/null +++ b/docs/manifest.json @@ -0,0 +1 @@ +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v4.json", "dbt_version": "1.0.0", "generated_at": "2022-05-12T15:44:09.185507Z", "invocation_id": "842c68f8-0b2e-4ace-8bfc-9f191c9508e0", "env": {}, "project_id": "dc69bd500b4b2706874fea3ef63787e1", "user_id": null, "send_anonymous_usage_stats": false, "adapter_type": "redshift"}, "nodes": {"model.snowplow_media_player.snowplow_media_player_base": {"raw_sql": "{{\n config(\n materialized= var(\"snowplow__incremental_materialization\", 'snowplow_incremental'),\n upsert_date_key='start_tstamp',\n unique_key = 'play_id',\n sort = 'start_tstamp',\n dist = 'play_id',\n tags=[\"derived\"]\n )\n}}\n\nselect *\n\nfrom {{ ref('snowplow_media_player_base_this_run') }}\n\nwhere {{ snowplow_utils.is_run_with_new_events('snowplow_web') }} --returns false if run doesn't contain new events.", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.is_run_with_new_events"], "nodes": ["model.snowplow_media_player.snowplow_media_player_base_this_run", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "derived", "database": null, "tags": ["snowplow_web_incremental", "derived"], "meta": {}, "materialized": "snowplow_incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "play_id", "sort": "start_tstamp", "upsert_date_key": "start_tstamp", "unique_key": "play_id", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_derived", "fqn": ["snowplow_media_player", "web", "snowplow_media_player_base"], "unique_id": "model.snowplow_media_player.snowplow_media_player_base", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "web/snowplow_media_player_base.sql", "original_file_path": "models/web/snowplow_media_player_base.sql", "name": "snowplow_media_player_base", "alias": "snowplow_media_player_base", "checksum": {"name": "sha256", "checksum": "b69261fa8fca5fb7716894710f7ce3da2c6856b5442a511d5c4e4740be6c64ae"}, "tags": ["snowplow_web_incremental", "derived"], "refs": [["snowplow_media_player_base_this_run"], ["snowplow_web_base_new_event_limits"], ["snowplow_web_incremental_manifest"]], "sources": [], "description": "This derived table aggregates media player interactions to a pageview level incrementally.", "columns": {"play_id": {"name": "play_id", "description": "The surrogate key generated from `page_view_id` and `media_id `to create a unique play event identifier.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_id": {"name": "media_id", "description": "The unique identifier of a specific media element. It is the `player_id` in case of YouTube and `html_id` in case of HTML5.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_label": {"name": "media_label", "description": "The optional, human readable name given to tracked media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "duration": {"name": "duration", "description": "Total length of media in seconds e.g. it's a 5:32 youtube video so the duration is 332 seconds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_type": {"name": "media_type", "description": "The type of media content: video or audio.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_player_type": {"name": "media_player_type", "description": "The combination of schema_name and schema_vendor coming from the specific media player context e.g. com.youtube-youtube, org.whatwg-media_element.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_url": {"name": "source_url", "description": "The url which shows the source of the media content. For YouTube it is the `url` context field, for HTML5 it is the `source_url` field.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_name": {"name": "br_name", "description": "Browser name e.g. `Firefox 12`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_type": {"name": "dvce_type", "description": "Type of device e.g. `Computer`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_name": {"name": "os_name", "description": "Name of operating system e.g. `Android`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "The `derived_tstamp` denoting the time when the event started.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "The `derived_tstamp` denoting the time when the last media player event belonging to the specific level of aggregation (e.g.: page_view by media) started.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec": {"name": "play_time_sec", "description": "Estimated duration of play in seconds. It is calculated using the percent_progress events that are fired during play. In case such an event is fired, it is assumed that the total section of the media in between the previous and current percent_progress is played through, even if the user seeks to another point in time within the audio / video. The more often these events are tracked (e.g. every 5% of the media's length) the more accurate the calculation becomes.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec_muted": {"name": "play_time_sec_muted", "description": "Calculated duration of muted play in seconds. It is based on the percent_progress event and whether the user played it on mute during this event or not.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_played": {"name": "is_played", "description": "Pageviews with at least one play event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_valid_play": {"name": "is_valid_play", "description": "A boolean value to show whether the duration of the play (`play_time_sec`) is bigger than or equal to the variable given in `snowplow__valid_play_sec` (defaulted to 30).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_complete_play": {"name": "is_complete_play", "description": "A boolean value to show whether the total percentage played is bigger than or equal to the `snowplow__complete_play_rate` (defaulted to 0.99).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "avg_playback_rate": {"name": "avg_playback_rate", "description": "Average playback rate (1 is normal speed).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "retention_rate": {"name": "retention_rate", "description": "The maximum percent progress reached before any seek event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "seeks": {"name": "seeks", "description": "The count of seek events within a certain aggregation level. The seek event occurs when a user moves/skips to a new position in the media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "percent_progress_reached": {"name": "percent_progress_reached", "description": "An array of percent progresses reached by the user while playing the media. In case the same percentprogress event was fired during the same page_view (e.g. due to seeks to rewatch part of the video) the % is added to the array again. e.g. in case of percent_progress_reached = [10, 25, 25, 50, 75] the user replayed part of the media so that the percentprogress event fired twice at the 25% mark.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_media_player://models/web/snowplow_media_player.yml", "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player_base.sql", "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "snowplow_incremental", "schema": "derived", "tags": ["derived"], "enabled": true, "upsert_date_key": "start_tstamp", "unique_key": "play_id", "sort": "start_tstamp", "dist": "play_id"}, "created_at": 1652369620.529238, "compiled_sql": "\n\nselect *\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_base_this_run\"\n\nwhere cast(1 as boolean) --returns false if run doesn't contain new events.", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_base\""}, "model.snowplow_media_player.snowplow_media_player_media_stats": {"raw_sql": "{{\n config(\n materialized= 'incremental',\n unique_key = 'media_id',\n sort = 'last_play',\n dist = 'media_id',\n tags=[\"derived\"]\n )\n}}\n\n{% if is_incremental() %}\n\nwith new_data as (\n\n select\n p.media_id,\n p.media_label,\n max(p.duration) as duration,\n p.media_type,\n p.media_player_type,\n min(case when is_played then p.start_tstamp end) as first_play,\n max(case when is_played then p.start_tstamp end) as last_play,\n sum(p.play_time_sec) as play_time_sec,\n sum(case when is_played then 1 else 0 end) as plays,\n sum(case when is_valid_play then 1 else 0 end) as valid_plays,\n sum(case when p.is_complete_play then 1 else 0 end) as complete_plays,\n count(distinct p.page_view_id) as impressions,\n avg(case when is_played then coalesce(p.play_time_sec, 0) / nullif(p.duration, 0) end) as avg_percent_played,\n avg(case when is_played then p.retention_rate end) as avg_retention_rate,\n avg(case when is_played then p.avg_playback_rate end) as avg_playback_rate,\n max(start_tstamp) as last_base_tstamp\n\nfrom {{ ref(\"snowplow_media_player_base\") }} p\n\nwhere -- enough time has passed since the page_view's start_tstamp to be able to process it as a whole (please bear in mind the late arriving data)\np.start_tstamp < {{ dbt_utils.dateadd('hour', var(\"snowplow__max_media_pv_window\", 10), dbt_utils.current_timestamp_in_utc() ) }}\n-- and it has not been processed yet\nand p.start_tstamp > ( select max(last_base_tstamp) from {{ this }} )\n\ngroup by 1,2,4,5\n\n)\n\n, prep as (\n\n select\n n.media_id,\n n.media_label,\n greatest(n.duration, coalesce(t.duration, 0)) as duration,\n n.media_type,\n n.media_player_type,\n n.last_base_tstamp,\n least(n.first_play, coalesce(t.first_play, '2999-01-01 00:00:00')) as first_play,\n greatest(n.last_play, coalesce(t.last_play, '2000-01-01 00:00:00')) as last_play,\n n.play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) + coalesce(t.play_time_min, 0) as play_time_min,\n (n.play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) + coalesce(t.play_time_min, 0)) / (n.plays + coalesce(t.plays, 0)) as avg_play_time_min,\n n.plays + coalesce(t.plays, 0) as plays,\n n.valid_plays + coalesce(t.valid_plays, 0) as valid_plays,\n n.complete_plays + coalesce(t.complete_plays, 0) as complete_plays,\n n.impressions + coalesce(t.impressions, 0) as impressions,\n -- weighted average calculations\n (n.avg_percent_played * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_percent_played, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_percent_played,\n (n.avg_retention_rate * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_retention_rate, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_retention_rate,\n (n.avg_playback_rate * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_playback_rate, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_playback_rate\n\n from new_data n\n\n left join {{ this }} t\n on n.media_id = t.media_id\n\n)\n\n, percent_progress_reached as (\n\n select\n media_id,\n\n {%- if target.type == 'redshift' %}\n split_to_array(p.percent_progress_reached) as percent_progress_reached\n\n {%- elif target.type == 'postgres' %}\n string_to_array(p.percent_progress_reached, ',') as percent_progress_reached\n\n {%- else -%}\n {{ exceptions.raise_compiler_error(\"Currently Redshift and Postgres targets are supported by the model. Got: \" ~ target.type) }}\n\n {%- endif %}\n\n\n from {{ ref(\"snowplow_media_player_base\") }} p\n\n where -- enough time has passed since the page_view`s start_tstamp to be able to process it a a whole (please bear in mind the late arriving data)\n\n p.start_tstamp < {{ dbt_utils.dateadd('hour', var(\"snowplow__max_media_pv_window\", 10), dbt_utils.current_timestamp_in_utc() ) }}\n\n -- and it has not been processed yet\n and p.start_tstamp > ( select max(last_base_tstamp) from {{ this }} )\n\n)\n\n{%- if target.type == 'redshift' %}\n\n, unnesting as (\n\nselect media_id, value_reached\n\nfrom percent_progress_reached p, p.percent_progress_reached as value_reached\n\n)\n\n{%- elif target.type == 'postgres' %}\n\n, unnesting as (\n\nselect media_id, cast(trim(unnest(percent_progress_reached)) as {{ dbt_utils.type_int() }}) as value_reached\n\nfrom percent_progress_reached\n\n)\n\n{%- else -%}\n{{ exceptions.raise_compiler_error(\"Currently Redshift and Postgres targets are supported by the model. Got: \" ~ target.type) }}\n\n{% endif %}\n\n, pivoting as (\n\n select\n u.media_id,\n {{ dbt_utils.pivot(\n column='u.value_reached',\n values=dbt_utils.get_column_values( table=ref('snowplow_media_player_pivot_base'), column='percent_progress', default=[]) | sort,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='_',\n suffix='_percent_reached',\n quote_identifiers=FALSE\n ) }}\n\n from unnesting u\n\n group by 1\n\n)\n\n, addition as (\n\n select\n coalesce(p.media_id, t.media_id) as media_id,\n\n {% for element in get_percentage_boundaries(var(\"snowplow__percent_progress_boundaries\")) %}\n\n {% set element_string = element | string() %}\n\n {% set alias = '_' + element_string + '_percent_reached' %}\n\n coalesce(p._{{ element_string }}_percent_reached, 0)\n + coalesce(t._{{ element_string }}_percent_reached, 0)\n as {{ alias }}\n\n {% if not loop.last %}\n\n ,\n\n {% endif %}\n\n {% endfor %}\n\n from pivoting p\n\n full outer join {{ this }} t\n on t.media_id = p.media_id\n\n)\n\n{% else %}\n\nwith prep as (\n\n select\n p.media_id,\n p.media_label,\n max(p.duration) as duration,\n p.media_type,\n p.media_player_type,\n max(start_tstamp) as last_base_tstamp,\n min(case when is_played then p.start_tstamp end) as first_play,\n max(case when is_played then p.start_tstamp end) as last_play,\n sum(p.play_time_sec) / cast(60 as {{ dbt_utils.type_float() }}) as play_time_min,\n avg(case when is_played then p.play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) end) as avg_play_time_min,\n sum(case when is_played then 1 else 0 end) as plays,\n sum(case when is_valid_play then 1 else 0 end) as valid_plays,\n sum(case when p.is_complete_play then 1 else 0 end) as complete_plays,\n count(distinct p.page_view_id) as impressions,\n avg(case when is_played then coalesce(p.play_time_sec / nullif(p.duration, 0), 0) end) as avg_percent_played,\n avg(case when is_played then p.retention_rate end) as avg_retention_rate,\n avg(case when is_played then p.avg_playback_rate end) as avg_playback_rate\n\n\nfrom {{ ref(\"snowplow_media_player_base\") }} p\n\ngroup by 1,2,4,5\n\n)\n\n, percent_progress_reached as (\n\n select\n media_id,\n\n {%- if target.type == 'redshift' %}\n split_to_array(p.percent_progress_reached) as percent_progress_reached\n\n {%- elif target.type == 'postgres' %}\n string_to_array(p.percent_progress_reached, ',') as percent_progress_reached\n\n {%- else -%}\n {{ exceptions.raise_compiler_error(\"Currently Redshift and Postgres targets are supported by the model. Got: \" ~ target.type) }}\n\n {%- endif %}\n\n\n from {{ ref(\"snowplow_media_player_base\") }} p\n\n)\n\n{%- if target.type == 'redshift' %}\n\n, unnesting as (\n\nselect media_id, value_reached\n\nfrom percent_progress_reached p, p.percent_progress_reached as value_reached\n\n)\n\n{%- elif target.type == 'postgres' %}\n\n, unnesting as (\n\nselect media_id, cast(trim(unnest(percent_progress_reached)) as {{ dbt_utils.type_int() }}) as value_reached\n\nfrom percent_progress_reached\n\n)\n\n{%- else -%}\n{{ exceptions.raise_compiler_error(\"Currently Redshift and Postgres targets are supported by the model. Got: \" ~ target.type) }}\n\n{% endif %}\n\n{% endif %}\n\n\nselect\n p.media_id,\n p.media_label,\n p.duration,\n p.media_type,\n p.media_player_type,\n p.play_time_min,\n p.avg_play_time_min,\n p.first_play,\n p.last_play,\n p.plays,\n p.valid_plays,\n p.complete_plays,\n p.impressions,\n p.avg_playback_rate,\n p.plays / cast(p.impressions as {{ dbt_utils.type_float() }}) as play_rate,\n p.complete_plays / cast(nullif(p.plays, 0) as {{ dbt_utils.type_float() }}) as completion_rate_by_plays,\n p.avg_percent_played,\n p.avg_retention_rate,\n l.last_base_tstamp,\n\n{% if is_incremental() %}\n\n {% for element in get_percentage_boundaries(var(\"snowplow__percent_progress_boundaries\")) %}\n coalesce(cast(a._{{ element }}_percent_reached as {{ dbt_utils.type_int() }}), 0) as _{{ element }}_percent_reached\n {% if not loop.last %}\n ,\n {% endif %}\n {% endfor %}\n\n{% else %}\n\n {{ dbt_utils.pivot(\n column='un.value_reached',\n values=dbt_utils.get_column_values( table=ref('snowplow_media_player_pivot_base'), column='percent_progress', default=[]) | sort,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='_',\n suffix='_percent_reached',\n quote_identifiers=FALSE\n ) }}\n\n{% endif %}\n\nfrom prep p\n\nleft join (select max(last_base_tstamp) as last_base_tstamp from prep ) l\non 1 = 1\n\n{% if is_incremental() %}\n\nleft join addition a\non a.media_id = p.media_id\n\n{% else %}\n\nleft join unnesting un\non un.media_id = p.media_id\n\ngroup by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n\n{% endif %}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.type_float", "macro.dbt_utils.get_column_values", "macro.dbt_utils.pivot", "macro.dbt_utils.current_timestamp_in_utc", "macro.dbt_utils.dateadd", "macro.snowplow_media_player.get_percentage_boundaries", "macro.dbt_utils.type_int"], "nodes": ["model.snowplow_media_player.snowplow_media_player_base", "model.snowplow_media_player.snowplow_media_player_base", "model.snowplow_media_player.snowplow_media_player_pivot_base"]}, "config": {"enabled": true, "alias": null, "schema": "derived", "database": null, "tags": ["snowplow_web_incremental", "derived"], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "media_id", "sort": "last_play", "unique_key": "media_id", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_derived", "fqn": ["snowplow_media_player", "web", "snowplow_media_player_media_stats"], "unique_id": "model.snowplow_media_player.snowplow_media_player_media_stats", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "web/snowplow_media_player_media_stats.sql", "original_file_path": "models/web/snowplow_media_player_media_stats.sql", "name": "snowplow_media_player_media_stats", "alias": "snowplow_media_player_media_stats", "checksum": {"name": "sha256", "checksum": "7dac5d5addcc5c80f93524cf187707d8b832afeaa3ae34cd3158197c74b51e06"}, "tags": ["snowplow_web_incremental", "derived"], "refs": [["snowplow_media_player_base"], ["snowplow_media_player_base"], ["snowplow_media_player_pivot_base"]], "sources": [], "description": "This derived table aggregates the pageview level interactions to show overall media stats.", "columns": {"media_id": {"name": "media_id", "description": "The primary key of this table", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "media_label": {"name": "media_label", "description": "The optional, human readable name given to tracked media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "duration": {"name": "duration", "description": "Total length of media in seconds e.g. it's a 5:32 youtube video so the duration is 332 seconds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_type": {"name": "media_type", "description": "The type of media content: video or audio.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_player_type": {"name": "media_player_type", "description": "The combination of schema_name and schema_vendor coming from the specific media player context e.g. com.youtube-youtube, org.whatwg-media_element.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_min": {"name": "play_time_min", "description": "Calculated duration of play in minutes.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "avg_play_time_min": {"name": "avg_play_time_min", "description": "Estimated average duration of plays in minutes.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_play": {"name": "first_play", "description": "The `derived_tstamp` of the beginning of the first play of a media element.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_play": {"name": "last_play", "description": "The `derived_tstamp` of the beginning of the last play of a media element.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "plays": {"name": "plays", "description": "The number of pageviews with plays of any duration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "valid_plays": {"name": "valid_plays", "description": "The sum of all media plays that exceeds the minimum media length set within the variable `snowplow__valid_play_sec`, it is defaulted to 30 (seconds).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "complete_plays": {"name": "complete_plays", "description": "The number of plays where the total percentage played is bigger than or equal to the `snowplow__complete_play_rate`. Default is 0.99, meaning that 99% of the video being watched constitutes a complete play.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of pageviews where a media content was rendered regardless of whether the media was actually played or not.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "avg_playback_rate": {"name": "avg_playback_rate", "description": "Average playback rate (1 is normal speed).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_rate": {"name": "play_rate", "description": "Total plays divided by impressions. Please note that as the base for media plays is pageview / media_id, in case the same video is played multiple times within the same pageview, it will still count as one play.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "completion_rate_by_plays": {"name": "completion_rate_by_plays", "description": "The number of complete plays divided by the number of pageviews with plays of any duration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "avg_percent_played": {"name": "avg_percent_played", "description": "Average of total play_time divided by the media duration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "avg_retention_rate": {"name": "avg_retention_rate", "description": "The maximum percent progress reached before any seek event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_base_tstamp": {"name": "last_base_tstamp", "description": "The start_tstamp of the last processed page_view across all media_ids to be used as a lower limit for subsequent incremental runs.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_media_player://models/web/snowplow_media_player.yml", "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player_media_stats.sql", "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "incremental", "schema": "derived", "tags": ["derived"], "enabled": true, "unique_key": "media_id", "sort": "last_play", "dist": "media_id"}, "created_at": 1652369620.5376692, "compiled_sql": "\n\n\n\nwith new_data as (\n\n select\n p.media_id,\n p.media_label,\n max(p.duration) as duration,\n p.media_type,\n p.media_player_type,\n min(case when is_played then p.start_tstamp end) as first_play,\n max(case when is_played then p.start_tstamp end) as last_play,\n sum(p.play_time_sec) as play_time_sec,\n sum(case when is_played then 1 else 0 end) as plays,\n sum(case when is_valid_play then 1 else 0 end) as valid_plays,\n sum(case when p.is_complete_play then 1 else 0 end) as complete_plays,\n count(distinct p.page_view_id) as impressions,\n avg(case when is_played then coalesce(p.play_time_sec, 0) / nullif(p.duration, 0) end) as avg_percent_played,\n avg(case when is_played then p.retention_rate end) as avg_retention_rate,\n avg(case when is_played then p.avg_playback_rate end) as avg_playback_rate,\n max(start_tstamp) as last_base_tstamp\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_base\" p\n\nwhere -- enough time has passed since the page_view's start_tstamp to be able to process it as a whole (please bear in mind the late arriving data)\np.start_tstamp < \n\n dateadd(\n hour,\n 10,\n \n \n getdate()\n\n\n )\n\n\n-- and it has not been processed yet\nand p.start_tstamp > ( select max(last_base_tstamp) from \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_media_stats\" )\n\ngroup by 1,2,4,5\n\n)\n\n, prep as (\n\n select\n n.media_id,\n n.media_label,\n greatest(n.duration, coalesce(t.duration, 0)) as duration,\n n.media_type,\n n.media_player_type,\n n.last_base_tstamp,\n least(n.first_play, coalesce(t.first_play, '2999-01-01 00:00:00')) as first_play,\n greatest(n.last_play, coalesce(t.last_play, '2000-01-01 00:00:00')) as last_play,\n n.play_time_sec / cast(60 as \n float\n) + coalesce(t.play_time_min, 0) as play_time_min,\n (n.play_time_sec / cast(60 as \n float\n) + coalesce(t.play_time_min, 0)) / (n.plays + coalesce(t.plays, 0)) as avg_play_time_min,\n n.plays + coalesce(t.plays, 0) as plays,\n n.valid_plays + coalesce(t.valid_plays, 0) as valid_plays,\n n.complete_plays + coalesce(t.complete_plays, 0) as complete_plays,\n n.impressions + coalesce(t.impressions, 0) as impressions,\n -- weighted average calculations\n (n.avg_percent_played * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_percent_played, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_percent_played,\n (n.avg_retention_rate * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_retention_rate, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_retention_rate,\n (n.avg_playback_rate * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_playback_rate, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_playback_rate\n\n from new_data n\n\n left join \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_media_stats\" t\n on n.media_id = t.media_id\n\n)\n\n, percent_progress_reached as (\n\n select\n media_id,\n split_to_array(p.percent_progress_reached) as percent_progress_reached\n\n\n from \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_base\" p\n\n where -- enough time has passed since the page_view`s start_tstamp to be able to process it a a whole (please bear in mind the late arriving data)\n\n p.start_tstamp < \n\n dateadd(\n hour,\n 10,\n \n \n getdate()\n\n\n )\n\n\n\n -- and it has not been processed yet\n and p.start_tstamp > ( select max(last_base_tstamp) from \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_media_stats\" )\n\n)\n\n, unnesting as (\n\nselect media_id, value_reached\n\nfrom percent_progress_reached p, p.percent_progress_reached as value_reached\n\n)\n\n, pivoting as (\n\n select\n u.media_id,\n \n \n sum(\n \n case\n when u.value_reached = '10'\n then 1\n else 0\n end\n )\n \n \n as _10_percent_reached\n \n \n ,\n \n sum(\n \n case\n when u.value_reached = '25'\n then 1\n else 0\n end\n )\n \n \n as _25_percent_reached\n \n \n ,\n \n sum(\n \n case\n when u.value_reached = '50'\n then 1\n else 0\n end\n )\n \n \n as _50_percent_reached\n \n \n ,\n \n sum(\n \n case\n when u.value_reached = '75'\n then 1\n else 0\n end\n )\n \n \n as _75_percent_reached\n \n \n ,\n \n sum(\n \n case\n when u.value_reached = '100'\n then 1\n else 0\n end\n )\n \n \n as _100_percent_reached\n \n \n \n \n\n\n from unnesting u\n\n group by 1\n\n)\n\n, addition as (\n\n select\n coalesce(p.media_id, t.media_id) as media_id,\n\n \n\n \n\n \n\n coalesce(p._10_percent_reached, 0)\n + coalesce(t._10_percent_reached, 0)\n as _10_percent_reached\n\n \n\n ,\n\n \n\n \n\n \n\n \n\n coalesce(p._25_percent_reached, 0)\n + coalesce(t._25_percent_reached, 0)\n as _25_percent_reached\n\n \n\n ,\n\n \n\n \n\n \n\n \n\n coalesce(p._50_percent_reached, 0)\n + coalesce(t._50_percent_reached, 0)\n as _50_percent_reached\n\n \n\n ,\n\n \n\n \n\n \n\n \n\n coalesce(p._75_percent_reached, 0)\n + coalesce(t._75_percent_reached, 0)\n as _75_percent_reached\n\n \n\n ,\n\n \n\n \n\n \n\n \n\n coalesce(p._100_percent_reached, 0)\n + coalesce(t._100_percent_reached, 0)\n as _100_percent_reached\n\n \n\n \n\n from pivoting p\n\n full outer join \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_media_stats\" t\n on t.media_id = p.media_id\n\n)\n\n\n\n\nselect\n p.media_id,\n p.media_label,\n p.duration,\n p.media_type,\n p.media_player_type,\n p.play_time_min,\n p.avg_play_time_min,\n p.first_play,\n p.last_play,\n p.plays,\n p.valid_plays,\n p.complete_plays,\n p.impressions,\n p.avg_playback_rate,\n p.plays / cast(p.impressions as \n float\n) as play_rate,\n p.complete_plays / cast(nullif(p.plays, 0) as \n float\n) as completion_rate_by_plays,\n p.avg_percent_played,\n p.avg_retention_rate,\n l.last_base_tstamp,\n\n\n\n \n coalesce(cast(a._10_percent_reached as \n int\n), 0) as _10_percent_reached\n \n ,\n \n \n coalesce(cast(a._25_percent_reached as \n int\n), 0) as _25_percent_reached\n \n ,\n \n \n coalesce(cast(a._50_percent_reached as \n int\n), 0) as _50_percent_reached\n \n ,\n \n \n coalesce(cast(a._75_percent_reached as \n int\n), 0) as _75_percent_reached\n \n ,\n \n \n coalesce(cast(a._100_percent_reached as \n int\n), 0) as _100_percent_reached\n \n \n\n\n\nfrom prep p\n\nleft join (select max(last_base_tstamp) as last_base_tstamp from prep ) l\non 1 = 1\n\n\n\nleft join addition a\non a.media_id = p.media_id\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_media_stats\""}, "model.snowplow_media_player.snowplow_media_player_plays_by_pageview": {"raw_sql": "{{\n config(\n materialized='view',\n tags=[\"derived\"]\n )\n}}\n\nselect *\n\nfrom {{ ref(\"snowplow_media_player_base\") }}\n\nwhere is_played", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.snowplow_media_player.snowplow_media_player_base"]}, "config": {"enabled": true, "alias": null, "schema": "derived", "database": null, "tags": ["snowplow_web_incremental", "derived"], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_derived", "fqn": ["snowplow_media_player", "web", "snowplow_media_player_plays_by_pageview"], "unique_id": "model.snowplow_media_player.snowplow_media_player_plays_by_pageview", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "web/snowplow_media_player_plays_by_pageview.sql", "original_file_path": "models/web/snowplow_media_player_plays_by_pageview.sql", "name": "snowplow_media_player_plays_by_pageview", "alias": "snowplow_media_player_plays_by_pageview", "checksum": {"name": "sha256", "checksum": "2c87e6d46c6fddfc9e28d52c25fca2b185afddd20c63dba102c61b6d7257e8b9"}, "tags": ["snowplow_web_incremental", "derived"], "refs": [["snowplow_media_player_base"]], "sources": [], "description": "This view removes impressions from the derived snowplow_media_base table for showing pageview level media play events.", "columns": {"play_id": {"name": "play_id", "description": "The surrogate key generated from `page_view_id` and `media_id `to create a unique play event identifier.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_id": {"name": "media_id", "description": "The unique identifier of a specific media element. It is the `player_id` in case of YouTube and `html_id` in case of HTML5.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_label": {"name": "media_label", "description": "The optional, human readable name given to tracked media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "duration": {"name": "duration", "description": "Total length of media in seconds e.g. it's a 5:32 youtube video so the duration is 332 seconds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_type": {"name": "media_type", "description": "The type of media content: video or audio.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_player_type": {"name": "media_player_type", "description": "The combination of schema_name and schema_vendor coming from the specific media player context e.g. com.youtube-youtube, org.whatwg-media_element.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_url": {"name": "source_url", "description": "The url which shows the source of the media content. For YouTube it is the `url` context field, for HTML5 it is the `source_url` field.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_name": {"name": "br_name", "description": "Browser name e.g. `Firefox 12`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_type": {"name": "dvce_type", "description": "Type of device e.g. `Computer`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_name": {"name": "os_name", "description": "Name of operating system e.g. `Android`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "The `derived_tstamp` denoting the time when the event started.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "The `derived_tstamp` denoting the time when the last media player event belonging to the specific level of aggregation (e.g.: page_view by media) started.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec": {"name": "play_time_sec", "description": "Estimated duration of play in seconds. It is calculated using the percent_progress events that are fired during play. In case such an event is fired, it is assumed that the total section of the media in between the previous and current percent_progress is played through, even if the user seeks to another point in time within the audio / video. The more often these events are tracked (e.g. every 5% of the media's length) the more accurate the calculation becomes.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec_muted": {"name": "play_time_sec_muted", "description": "Calculated duration of muted play in seconds. It is based on the percent_progress event and whether the user played it on mute during this event or not.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_played": {"name": "is_played", "description": "Pageviews with at least one play event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_valid_play": {"name": "is_valid_play", "description": "A boolean value to show whether the duration of the play (`play_time_sec`) is bigger than or equal to the variable given in `snowplow__valid_play_sec` (defaulted to 30).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_complete_play": {"name": "is_complete_play", "description": "A boolean value to show whether the total percentage played is bigger than or equal to the `snowplow__complete_play_rate` (defaulted to 0.99).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "avg_playback_rate": {"name": "avg_playback_rate", "description": "Average playback rate (1 is normal speed).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "retention_rate": {"name": "retention_rate", "description": "The maximum percent progress reached before any seek event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "seeks": {"name": "seeks", "description": "The count of seek events within a certain aggregation level. The seek event occurs when a user moves/skips to a new position in the media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "percent_progress_reached": {"name": "percent_progress_reached", "description": "An array of percent progresses reached by the user while playing the media. In case the same percentprogress event was fired during the same page_view (e.g. due to seeks to rewatch part of the video) the % is added to the array again. e.g. in case of percent_progress_reached = [10, 25, 25, 50, 75] the user replayed part of the media so that the percentprogress event fired twice at the 25% mark.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_media_player://models/web/snowplow_media_player.yml", "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player_plays_by_pageview.sql", "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "view", "schema": "derived", "tags": ["derived"], "enabled": true}, "created_at": 1652369620.534428, "compiled_sql": "\n\nselect *\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_base\"\n\nwhere is_played", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_plays_by_pageview\""}, "model.snowplow_media_player.snowplow_media_player_base_this_run": {"raw_sql": "{{\n config(\n materialized='table',\n tags=[\"this_run\"],\n sort = 'start_tstamp',\n dist = 'play_id'\n )\n}}\n\nwith prep as (\n\n select\n i.play_id,\n i.page_view_id,\n i.media_id,\n i.media_label,\n i.domain_sessionid,\n i.domain_userid,\n max(i.duration) as duration,\n i.media_type,\n i.media_player_type,\n i.page_referrer,\n i.page_url,\n max(i.source_url) as source_url,\n i.geo_region_name,\n i.br_name,\n i.dvce_type,\n i.os_name,\n i.os_timezone,\n min(start_tstamp) as start_tstamp,\n max(start_tstamp) as end_tstamp,\n sum(case when i.event_type = 'play' then 1 else 0 end) as plays,\n sum(case when i.event_type in ('seek', 'seeked') then 1 else 0 end) as seeks,\n sum(i.play_time_sec) as play_time_sec,\n sum(i.play_time_sec_muted) as play_time_sec_muted,\n coalesce(sum(i.playback_rate * i.play_time_sec) / nullif(sum(i.play_time_sec), 0), max(i.playback_rate)) as avg_playback_rate,\n\n {%- if target.type == 'redshift' -%}\n listagg(percent_progress, ',') within group (order by percent_progress) as percent_progress_reached,\n\n {%- elif target.type == 'postgres' -%}\n string_agg(i.percent_progress::varchar(10), ',' order by i.percent_progress) as percent_progress_reached,\n\n {%- else -%}\n {{ exceptions.raise_compiler_error(\"Currently Redshift and Postgres targets are supported by the model. Got: \" ~ target.type) }}\n\n {%- endif -%}\n\n min(case when i.event_type in ('seek', 'seeked') then start_tstamp end) as first_seek_time,\n max(i.percent_progress) as max_percent_progress\n\n from {{ ref('snowplow_media_player_interactions_this_run') }} as i\n\n group by 1,2,3,4,5,6,8,9,10,11,13,14,15,16,17\n\n)\n\n, dedupe as (\n\n select\n *,\n row_number() over (partition by play_id order by start_tstamp) as duplicate_count\n\n from prep\n\n)\n\n, retention_rate as (\n\n select\n d.play_id,\n max(i.percent_progress) as retention_rate\n\n from dedupe d\n\n inner join {{ ref(\"snowplow_media_player_interactions_this_run\") }} i\n on i.play_id = d.play_id\n\n where i.percent_progress is not null and (i.start_tstamp <= d.first_seek_time or d.first_seek_time is null)\n\n group by 1\n\n order by 2\n\n)\n\n-- for correcting NULLs in case of 'ready' events only where the metadata showing the duration is usually missing as the event fires before it has time to load\n, duration_fix as (\n\n select\n f.media_id,\n max(f.duration) as duration\n\n from {{ ref('snowplow_media_player_interactions_this_run') }} as f\n\n group by 1\n\n)\n\nselect\n d.play_id,\n d.page_view_id,\n d.media_id,\n d.media_label,\n d.domain_sessionid,\n d.domain_userid,\n f.duration,\n d.media_type,\n d.media_player_type,\n d.page_referrer,\n d.page_url,\n d.source_url,\n d.geo_region_name,\n d.br_name,\n d.dvce_type,\n d.os_name,\n d.os_timezone,\n d.start_tstamp,\n d.end_tstamp,\n d.play_time_sec,\n d.play_time_sec_muted,\n d.plays > 0 as is_played,\n case when d.play_time_sec > {{ var(\"snowplow__valid_play_sec\") }} then true else false end is_valid_play,\n case when play_time_sec / f.duration >= {{ var(\"snowplow__complete_play_rate\") }} then true else false end as is_complete_play,\n d.avg_playback_rate,\n coalesce(case when r.retention_rate > d.max_percent_progress\n then d.max_percent_progress / cast(100 as {{ dbt_utils.type_float() }})\n else r.retention_rate / cast(100 as {{ dbt_utils.type_float() }})\n end, 0) as retention_rate, -- to correct incorrect result due to duplicate session_id (one removed)\n d.seeks,\n d.percent_progress_reached\n\nfrom dedupe d\n\nleft join retention_rate r\non r.play_id = d.play_id\n\nleft join duration_fix f\non f.media_id = d.media_id\n\nwhere d.duplicate_count = 1", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.type_float"], "nodes": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run", "model.snowplow_media_player.snowplow_media_player_interactions_this_run", "model.snowplow_media_player.snowplow_media_player_interactions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "play_id", "sort": "start_tstamp", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_media_player", "web", "scratch", "snowplow_media_player_base_this_run"], "unique_id": "model.snowplow_media_player.snowplow_media_player_base_this_run", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "web/scratch/snowplow_media_player_base_this_run.sql", "original_file_path": "models/web/scratch/snowplow_media_player_base_this_run.sql", "name": "snowplow_media_player_base_this_run", "alias": "snowplow_media_player_base_this_run", "checksum": {"name": "sha256", "checksum": "021ba1503356241caee5ef7300adfedbe3007b96ac0ca07bd15960b5d39e3832"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_media_player_interactions_this_run"], ["snowplow_media_player_interactions_this_run"], ["snowplow_media_player_interactions_this_run"]], "sources": [], "description": "This staging table aggregates media player interactions within the current run to a pageview level that is considered a base level for media plays.", "columns": {"play_id": {"name": "play_id", "description": "The surrogate key generated from `page_view_id` and `media_id `to create a unique play event identifier.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_id": {"name": "media_id", "description": "The unique identifier of a specific media element. It is the `player_id` in case of YouTube and `html_id` in case of HTML5.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_label": {"name": "media_label", "description": "The optional, human readable name given to tracked media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "duration": {"name": "duration", "description": "Total length of media in seconds e.g. it's a 5:32 youtube video so the duration is 332 seconds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_type": {"name": "media_type", "description": "The type of media content: video or audio.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_player_type": {"name": "media_player_type", "description": "The combination of schema_name and schema_vendor coming from the specific media player context e.g. com.youtube-youtube, org.whatwg-media_element.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_url": {"name": "source_url", "description": "The url which shows the source of the media content. For YouTube it is the `url` context field, for HTML5 it is the `source_url` field.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_name": {"name": "br_name", "description": "Browser name e.g. `Firefox 12`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_type": {"name": "dvce_type", "description": "Type of device e.g. `Computer`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_name": {"name": "os_name", "description": "Name of operating system e.g. `Android`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "The `derived_tstamp` denoting the time when the event started.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "The `derived_tstamp` denoting the time when the last media player event belonging to the specific level of aggregation (e.g.: page_view by media) started.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec": {"name": "play_time_sec", "description": "Estimated duration of play in seconds. It is calculated using the percent_progress events that are fired during play. In case such an event is fired, it is assumed that the total section of the media in between the previous and current percent_progress is played through, even if the user seeks to another point in time within the audio / video. The more often these events are tracked (e.g. every 5% of the media's length) the more accurate the calculation becomes.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec_muted": {"name": "play_time_sec_muted", "description": "Calculated duration of muted play in seconds. It is based on the percent_progress event and whether the user played it on mute during this event or not.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_played": {"name": "is_played", "description": "Pageviews with at least one play event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_valid_play": {"name": "is_valid_play", "description": "A boolean value to show whether the duration of the play (`play_time_sec`) is bigger than or equal to the variable given in `snowplow__valid_play_sec` (defaulted to 30).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_complete_play": {"name": "is_complete_play", "description": "A boolean value to show whether the total percentage played is bigger than or equal to the `snowplow__complete_play_rate` (defaulted to 0.99).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "avg_playback_rate": {"name": "avg_playback_rate", "description": "Average playback rate (1 is normal speed).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "retention_rate": {"name": "retention_rate", "description": "The maximum percent progress reached before any seek event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "seeks": {"name": "seeks", "description": "The count of seek events within a certain aggregation level. The seek event occurs when a user moves/skips to a new position in the media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "percent_progress_reached": {"name": "percent_progress_reached", "description": "An array of percent progresses reached by the user while playing the media. In case the same percentprogress event was fired during the same page_view (e.g. due to seeks to rewatch part of the video) the % is added to the array again. e.g. in case of percent_progress_reached = [10, 25, 25, 50, 75] the user replayed part of the media so that the percentprogress event fired twice at the 25% mark.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_media_player://models/web/scratch/snowplow_media_player_scratch.yml", "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_base_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "table", "schema": "scratch", "tags": ["this_run"], "enabled": true, "sort": "start_tstamp", "dist": "play_id"}, "created_at": 1652369620.56208, "compiled_sql": "\n\nwith prep as (\n\n select\n i.play_id,\n i.page_view_id,\n i.media_id,\n i.media_label,\n i.domain_sessionid,\n i.domain_userid,\n max(i.duration) as duration,\n i.media_type,\n i.media_player_type,\n i.page_referrer,\n i.page_url,\n max(i.source_url) as source_url,\n i.geo_region_name,\n i.br_name,\n i.dvce_type,\n i.os_name,\n i.os_timezone,\n min(start_tstamp) as start_tstamp,\n max(start_tstamp) as end_tstamp,\n sum(case when i.event_type = 'play' then 1 else 0 end) as plays,\n sum(case when i.event_type in ('seek', 'seeked') then 1 else 0 end) as seeks,\n sum(i.play_time_sec) as play_time_sec,\n sum(i.play_time_sec_muted) as play_time_sec_muted,\n coalesce(sum(i.playback_rate * i.play_time_sec) / nullif(sum(i.play_time_sec), 0), max(i.playback_rate)) as avg_playback_rate,listagg(percent_progress, ',') within group (order by percent_progress) as percent_progress_reached,min(case when i.event_type in ('seek', 'seeked') then start_tstamp end) as first_seek_time,\n max(i.percent_progress) as max_percent_progress\n\n from \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_interactions_this_run\" as i\n\n group by 1,2,3,4,5,6,8,9,10,11,13,14,15,16,17\n\n)\n\n, dedupe as (\n\n select\n *,\n row_number() over (partition by play_id order by start_tstamp) as duplicate_count\n\n from prep\n\n)\n\n, retention_rate as (\n\n select\n d.play_id,\n max(i.percent_progress) as retention_rate\n\n from dedupe d\n\n inner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_interactions_this_run\" i\n on i.play_id = d.play_id\n\n where i.percent_progress is not null and (i.start_tstamp <= d.first_seek_time or d.first_seek_time is null)\n\n group by 1\n\n order by 2\n\n)\n\n-- for correcting NULLs in case of 'ready' events only where the metadata showing the duration is usually missing as the event fires before it has time to load\n, duration_fix as (\n\n select\n f.media_id,\n max(f.duration) as duration\n\n from \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_interactions_this_run\" as f\n\n group by 1\n\n)\n\nselect\n d.play_id,\n d.page_view_id,\n d.media_id,\n d.media_label,\n d.domain_sessionid,\n d.domain_userid,\n f.duration,\n d.media_type,\n d.media_player_type,\n d.page_referrer,\n d.page_url,\n d.source_url,\n d.geo_region_name,\n d.br_name,\n d.dvce_type,\n d.os_name,\n d.os_timezone,\n d.start_tstamp,\n d.end_tstamp,\n d.play_time_sec,\n d.play_time_sec_muted,\n d.plays > 0 as is_played,\n case when d.play_time_sec > 30 then true else false end is_valid_play,\n case when play_time_sec / f.duration >= 0.99 then true else false end as is_complete_play,\n d.avg_playback_rate,\n coalesce(case when r.retention_rate > d.max_percent_progress\n then d.max_percent_progress / cast(100 as \n float\n)\n else r.retention_rate / cast(100 as \n float\n)\n end, 0) as retention_rate, -- to correct incorrect result due to duplicate session_id (one removed)\n d.seeks,\n d.percent_progress_reached\n\nfrom dedupe d\n\nleft join retention_rate r\non r.play_id = d.play_id\n\nleft join duration_fix f\non f.media_id = d.media_id\n\nwhere d.duplicate_count = 1", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_base_this_run\""}, "model.snowplow_media_player.snowplow_media_player_pivot_base": {"raw_sql": "{{\n config(\n materialized='table'\n )\n}}\n\nwith prep as (\n\n {% for element in get_percentage_boundaries(var(\"snowplow__percent_progress_boundaries\")) %}\n\n select\n\n {{ element }} as percent_progress\n\n {% if not loop.last %}\n\n union all\n\n {% endif %}\n\n {% endfor %}\n\n)\n\n, weight_calc as (\n\n select\n percent_progress,\n percent_progress - lag(percent_progress, 1) over(order by percent_progress) as weight_rate,\n first_value(percent_progress) over(order by percent_progress rows between unbounded preceding and unbounded following) as first_item\n\n from prep\n\n order by percent_progress\n\n)\n\nselect\n percent_progress,\n coalesce(weight_rate, first_item) as weight_rate\n\nfrom weight_calc", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_media_player.get_percentage_boundaries"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_media_player", "web", "scratch", "snowplow_media_player_pivot_base"], "unique_id": "model.snowplow_media_player.snowplow_media_player_pivot_base", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "web/scratch/snowplow_media_player_pivot_base.sql", "original_file_path": "models/web/scratch/snowplow_media_player_pivot_base.sql", "name": "snowplow_media_player_pivot_base", "alias": "snowplow_media_player_pivot_base", "checksum": {"name": "sha256", "checksum": "a9857c0d6148f4902922ce00a62b18574f51e2dc7721daf244e97ef3f8a94a0e"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [], "sources": [], "description": "This helper table serves as a base to calculate percent_progress based fields as well as the play_time metrics (by calculating the weight attributed to a percent progress being reached).", "columns": {"percent_progress": {"name": "percent_progress", "description": "The percent of the way through the media. It is based on either the percentprogress event that is fired at specific intervalls as defined during the tracker setup or the 'ended' event, which is equivalent to reaching 100% of the media's total duration (length). e.g. 25, meaning the user passed the 25% mark during play. It does not mean the user watched all the content in between two percentprogress marks, unless there is no seek events happening within the same page_view (`snowplow_media_player_base`).", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "weight_rate": {"name": "weight_rate", "description": "The weight given for each percent progress reached used for the calculation of the play_time_sec_estimated field. It is based on the difference of the current and preciding percent_progress rate.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_media_player://models/web/scratch/snowplow_media_player_scratch.yml", "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_pivot_base.sql", "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "table", "schema": "scratch", "tags": "scratch", "enabled": true}, "created_at": 1652369620.562793, "compiled_sql": "\n\nwith prep as (\n\n \n\n select\n\n 10 as percent_progress\n\n \n\n union all\n\n \n\n \n\n select\n\n 25 as percent_progress\n\n \n\n union all\n\n \n\n \n\n select\n\n 50 as percent_progress\n\n \n\n union all\n\n \n\n \n\n select\n\n 75 as percent_progress\n\n \n\n union all\n\n \n\n \n\n select\n\n 100 as percent_progress\n\n \n\n \n\n)\n\n, weight_calc as (\n\n select\n percent_progress,\n percent_progress - lag(percent_progress, 1) over(order by percent_progress) as weight_rate,\n first_value(percent_progress) over(order by percent_progress rows between unbounded preceding and unbounded following) as first_item\n\n from prep\n\n order by percent_progress\n\n)\n\nselect\n percent_progress,\n coalesce(weight_rate, first_item) as weight_rate\n\nfrom weight_calc", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_pivot_base\""}, "model.snowplow_media_player.snowplow_media_player_interactions_this_run": {"raw_sql": "{{\n config(\n materialized='table',\n tags=[\"this_run\"],\n sort = 'start_tstamp',\n dist = 'event_id'\n )\n}}\n\nwith prep as (\n\n select\n e.event_id,\n e.page_view_id,\n e.domain_sessionid,\n e.domain_userid,\n coalesce(y.player_id, me.html_id) as media_id,\n mpe.label as media_label,\n {{ dbt_utils.surrogate_key(['e.page_view_id', 'coalesce(y.player_id, me.html_id)' ]) }} play_id,\n round(mp.duration) as duration,\n case when me.media_type = 'audio' then 'audio' else 'video' end as media_type,\n coalesce(y.schema_vendor||'-'||y.schema_name, me.schema_vendor||'-'||me.schema_name) as media_player_type,\n e.page_referrer,\n e.page_url,\n coalesce(y.url, me.current_src) as source_url,\n e.geo_region_name,\n e.br_name,\n e.dvce_type,\n e.os_name,\n e.os_timezone,\n mpe.type as event_type,\n e.derived_tstamp as start_tstamp,\n mp.current_time as player_current_time,\n coalesce(mp.playback_rate, 1) as playback_rate,\n coalesce(y.playback_quality, ve.video_height||'x'||ve.video_width) as playback_quality,\n case when mpe.type = 'ended' then 100 else mp.percent_progress end percent_progress,\n mp.muted as is_muted,\n mp.is_live,\n mp.loop,\n mp.volume\n\n from {{ ref(\"snowplow_web_base_events_this_run\") }} as e\n\n inner join {{ source('atomic', 'com_snowplowanalytics_snowplow_media_player_event_1') }} as mpe\n on mpe.root_id = e.event_id and mpe.root_tstamp = e.collector_tstamp\n\n left join {{ source('atomic', 'com_snowplowanalytics_snowplow_media_player_1') }} as mp\n on mp.root_id = e.event_id and mp.root_tstamp = e.collector_tstamp\n\n left join {{ source('atomic', 'com_youtube_youtube_1') }} as y\n on y.root_id = e.event_id and y.root_tstamp = e.collector_tstamp\n\n left join {{ source('atomic', 'org_whatwg_media_element_1') }} as me\n on me.root_id = e.event_id and me.root_tstamp = e.collector_tstamp\n\n left join {{ source('atomic', 'org_whatwg_video_element_1') }} as ve\n on ve.root_id = e.event_id and ve.root_tstamp = e.collector_tstamp\n\n)\n\n select\n p.*,\n coalesce(cast(piv.weight_rate * p.duration / 100 as {{ dbt_utils.type_int() }}), 0) as play_time_sec,\n coalesce(cast(case when p.is_muted then piv.weight_rate * p.duration / 100 end as {{ dbt_utils.type_int() }}), 0) as play_time_sec_muted\n\n from prep p\n\n left join {{ ref(\"snowplow_media_player_pivot_base\") }} piv\n on p.percent_progress = piv.percent_progress", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.surrogate_key", "macro.dbt_utils.type_int"], "nodes": ["source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1", "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1", "source.snowplow_media_player.atomic.com_youtube_youtube_1", "source.snowplow_media_player.atomic.org_whatwg_media_element_1", "source.snowplow_media_player.atomic.org_whatwg_video_element_1", "model.snowplow_web.snowplow_web_base_events_this_run", "model.snowplow_media_player.snowplow_media_player_pivot_base"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "event_id", "sort": "start_tstamp", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_media_player", "web", "scratch", "snowplow_media_player_interactions_this_run"], "unique_id": "model.snowplow_media_player.snowplow_media_player_interactions_this_run", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "web/scratch/snowplow_media_player_interactions_this_run.sql", "original_file_path": "models/web/scratch/snowplow_media_player_interactions_this_run.sql", "name": "snowplow_media_player_interactions_this_run", "alias": "snowplow_media_player_interactions_this_run", "checksum": {"name": "sha256", "checksum": "eedcdffc980a9841208f68f0da8f9e80bb0e9b6af7884d90af42d32d4d1686ab"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_web_base_events_this_run"], ["snowplow_media_player_pivot_base"]], "sources": [["atomic", "com_snowplowanalytics_snowplow_media_player_event_1"], ["atomic", "com_snowplowanalytics_snowplow_media_player_1"], ["atomic", "com_youtube_youtube_1"], ["atomic", "org_whatwg_media_element_1"], ["atomic", "org_whatwg_video_element_1"]], "description": "This staging table shows all media player events within the current incremental run and calculates play_time. It could be used in custom models for more in-depth time based calculations.", "columns": {"event_id": {"name": "event_id", "description": "A UUID for each event e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_id": {"name": "media_id", "description": "The unique identifier of a specific media element. It is the `player_id` in case of YouTube and `html_id` in case of HTML5.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_label": {"name": "media_label", "description": "The optional, human readable name given to tracked media content.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_id": {"name": "play_id", "description": "The surrogate key generated from `page_view_id` and `media_id `to create a unique play event identifier.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "duration": {"name": "duration", "description": "Total length of media in seconds e.g. it's a 5:32 youtube video so the duration is 332 seconds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_type": {"name": "media_type", "description": "The type of media content: video or audio.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "media_player_type": {"name": "media_player_type", "description": "The combination of schema_name and schema_vendor coming from the specific media player context e.g. com.youtube-youtube, org.whatwg-media_element.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_url": {"name": "source_url", "description": "The url which shows the source of the media content. For YouTube it is the `url` context field, for HTML5 it is the `source_url` field.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_name": {"name": "br_name", "description": "Browser name e.g. `Firefox 12`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_type": {"name": "dvce_type", "description": "Type of device e.g. `Computer`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_name": {"name": "os_name", "description": "Name of operating system e.g. `Android`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of event generated by the media player. e.g. 'ended', 'paused', 'playing'.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "The `derived_tstamp` denoting the time when the event started.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "player_current_time": {"name": "player_current_time", "description": "The playback position of a specific media in seconds whenever a media player event is fired. Could be used in custom models for more detailed analytics or play time calculations.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "playback_rate": {"name": "playback_rate", "description": "Playback rate (1 is normal speed).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "playback_quality": {"name": "playback_quality", "description": "Depending on the player it is either the playback quality field or the resolution.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "percent_progress": {"name": "percent_progress", "description": "The percent of the way through the media. It is based on either the percentprogress event that is fired at specific intervalls as defined during the tracker setup or the 'ended' event, which is equivalent to reaching 100% of the media's total duration (length). e.g. 25, meaning the user passed the 25% mark during play. It does not mean the user watched all the content in between two percentprogress marks, unless there is no seek events happening within the same page_view (`snowplow_media_player_base`).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_muted": {"name": "is_muted", "description": "If the media is muted during the event that is fired.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec": {"name": "play_time_sec", "description": "Estimated duration of play in seconds. It is calculated using the percent_progress events that are fired during play. In case such an event is fired, it is assumed that the total section of the media in between the previous and current percent_progress is played through, even if the user seeks to another point in time within the audio / video. The more often these events are tracked (e.g. every 5% of the media's length) the more accurate the calculation becomes.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "play_time_sec_muted": {"name": "play_time_sec_muted", "description": "Calculated duration of muted play in seconds. It is based on the percent_progress event and whether the user played it on mute during this event or not.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_live": {"name": "is_live", "description": "If the media is live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "loop": {"name": "loop", "description": "If the video should restart after ending.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "volume": {"name": "volume", "description": "Volume percent.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_media_player://models/web/scratch/snowplow_media_player_scratch.yml", "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_interactions_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "table", "schema": "scratch", "tags": ["this_run"], "enabled": true, "sort": "start_tstamp", "dist": "event_id"}, "created_at": 1652369620.557466, "compiled_sql": "\n\nwith prep as (\n\n select\n e.event_id,\n e.page_view_id,\n e.domain_sessionid,\n e.domain_userid,\n coalesce(y.player_id, me.html_id) as media_id,\n mpe.label as media_label,\n md5(cast(coalesce(cast(e.page_view_id as varchar), '') || '-' || coalesce(cast(coalesce(y.player_id, me.html_id) as varchar), '') as varchar)) play_id,\n round(mp.duration) as duration,\n case when me.media_type = 'audio' then 'audio' else 'video' end as media_type,\n coalesce(y.schema_vendor||'-'||y.schema_name, me.schema_vendor||'-'||me.schema_name) as media_player_type,\n e.page_referrer,\n e.page_url,\n coalesce(y.url, me.current_src) as source_url,\n e.geo_region_name,\n e.br_name,\n e.dvce_type,\n e.os_name,\n e.os_timezone,\n mpe.type as event_type,\n e.derived_tstamp as start_tstamp,\n mp.current_time as player_current_time,\n coalesce(mp.playback_rate, 1) as playback_rate,\n coalesce(y.playback_quality, ve.video_height||'x'||ve.video_width) as playback_quality,\n case when mpe.type = 'ended' then 100 else mp.percent_progress end percent_progress,\n mp.muted as is_muted,\n mp.is_live,\n mp.loop,\n mp.volume\n\n from \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\" as e\n\n inner join \"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_media_player_event_1\" as mpe\n on mpe.root_id = e.event_id and mpe.root_tstamp = e.collector_tstamp\n\n left join \"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_media_player_1\" as mp\n on mp.root_id = e.event_id and mp.root_tstamp = e.collector_tstamp\n\n left join \"dev1\".\"atomic\".\"com_youtube_youtube_1\" as y\n on y.root_id = e.event_id and y.root_tstamp = e.collector_tstamp\n\n left join \"dev1\".\"atomic\".\"org_whatwg_media_element_1\" as me\n on me.root_id = e.event_id and me.root_tstamp = e.collector_tstamp\n\n left join \"dev1\".\"atomic\".\"org_whatwg_video_element_1\" as ve\n on ve.root_id = e.event_id and ve.root_tstamp = e.collector_tstamp\n\n)\n\n select\n p.*,\n coalesce(cast(piv.weight_rate * p.duration / 100 as \n int\n), 0) as play_time_sec,\n coalesce(cast(case when p.is_muted then piv.weight_rate * p.duration / 100 end as \n int\n), 0) as play_time_sec_muted\n\n from prep p\n\n left join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_pivot_base\" piv\n on p.percent_progress = piv.percent_progress", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_interactions_this_run\""}, "model.snowplow_web.snowplow_web_page_views": {"raw_sql": "{{ \n config(\n materialized=var(\"snowplow__incremental_materialization\"),\n unique_key='page_view_id',\n upsert_date_key='start_tstamp',\n sort='start_tstamp',\n dist='page_view_id',\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_web.web_cluster_by_fields_page_views(),\n tags=[\"derived\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n )\n}}\n\n\nselect * \nfrom {{ ref('snowplow_web_page_views_this_run') }}\nwhere {{ snowplow_utils.is_run_with_new_events('snowplow_web') }} --returns false if run doesn't contain new events.", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_web.web_cluster_by_fields_page_views", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.is_run_with_new_events"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "derived", "database": null, "tags": ["snowplow_web_incremental", "derived"], "meta": {}, "materialized": "snowplow_incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "start_tstamp", "unique_key": "page_view_id", "upsert_date_key": "start_tstamp", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_derived", "fqn": ["snowplow_web", "page_views", "snowplow_web_page_views"], "unique_id": "model.snowplow_web.snowplow_web_page_views", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/snowplow_web_page_views.sql", "original_file_path": "models/page_views/snowplow_web_page_views.sql", "name": "snowplow_web_page_views", "alias": "snowplow_web_page_views", "checksum": {"name": "sha256", "checksum": "27c7b4316cc72924ae6886adc7f122539f914f772025e33bc051dc1a5d044140"}, "tags": ["snowplow_web_incremental", "derived"], "refs": [["snowplow_web_page_views_this_run"], ["snowplow_web_base_new_event_limits"], ["snowplow_web_incremental_manifest"]], "sources": [], "description": "This derived incremental table contains all historic page views and should be the end point for any analysis or BI tools.", "columns": {"page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "event_id": {"name": "event_id", "description": "A UUID for each event e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "Application ID e.g. \u2018angry-birds\u2019 is used to distinguish different applications that are being tracked by the same Snowplow stack, e.g. production versus dev.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionidx": {"name": "domain_sessionidx", "description": "A visit / session index e.g. 3", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_view_in_session_index": {"name": "page_view_in_session_index", "description": "A page view index within a single session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_views_in_session": {"name": "page_views_in_session", "description": "Distinct count of `page_view_id` within a session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_created_tstamp": {"name": "dvce_created_tstamp", "description": "Timestamp event was recorded on the client device e.g. \u20182013-11-26 00:03:57.885\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "collector_tstamp": {"name": "collector_tstamp", "description": "Time stamp for the event recorded by the collector e.g. `2013-11-26 00:02:05`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "derived_tstamp": {"name": "derived_tstamp", "description": "Timestamp making allowance for inaccurate device clock e.g. `2013-11-26 00:02:04`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "Timestamp for the start of the page view, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "Timestamp for the end of the page view, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "model_tstamp": {"name": "model_tstamp", "description": "The current timestamp when the model processed this row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "engaged_time_in_s": {"name": "engaged_time_in_s", "description": "Time spent by the user on the page calculated using page pings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "absolute_time_in_s": {"name": "absolute_time_in_s", "description": "The time in seconds between the `start_tstamp` and `end_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "horizontal_pixels_scrolled": {"name": "horizontal_pixels_scrolled", "description": "Distance the user scrolled horizontally in pixels", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vertical_pixels_scrolled": {"name": "vertical_pixels_scrolled", "description": "Distance the user scrolled vertically in pixels", "meta": {}, "data_type": null, "quote": null, "tags": []}, "horizontal_percentage_scrolled": {"name": "horizontal_percentage_scrolled", "description": "Percentage of page scrolled horizontally", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vertical_percentage_scrolled": {"name": "vertical_percentage_scrolled", "description": "Percentage of page scrolled vertically", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_width": {"name": "doc_width", "description": "The page\u2019s width in pixels e.g. 1024", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_height": {"name": "doc_height", "description": "The page\u2019s height in pixels e.g. 3000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_title": {"name": "page_title", "description": "Web page title e.g. \u2018Snowplow Docs \u2013 Understanding the structure of Snowplow data\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlscheme": {"name": "page_urlscheme", "description": "Scheme aka protocol e.g. \u2018https\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlhost": {"name": "page_urlhost", "description": "Host aka domain e.g. \u2018\u201cwww.snowplowanalytics.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlpath": {"name": "page_urlpath", "description": "Path to page e.g. \u2018/product/index.html\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlquery": {"name": "page_urlquery", "description": "Querystring e.g. \u2018id=GTM-DLRG\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlfragment": {"name": "page_urlfragment", "description": "Fragment aka anchor e.g. \u20184-conclusion\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_country": {"name": "geo_country", "description": "ISO 3166-1 code for the country the visitor is located in e.g. \u2018GB\u2019, \u2018US\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region": {"name": "geo_region", "description": "ISO-3166-2 code for country region the visitor is in e.g. \u2018I9\u2019, \u2018TX\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_city": {"name": "geo_city", "description": "City the visitor is in e.g. \u2018New York\u2019, \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_zipcode": {"name": "geo_zipcode", "description": "Postcode the visitor is in e.g. \u201894109\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_latitude": {"name": "geo_latitude", "description": "Visitor location latitude e.g. 37.443604", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_longitude": {"name": "geo_longitude", "description": "Visitor location longitude e.g. -122.4124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_timezone": {"name": "geo_timezone", "description": "Visitor timezone name e.g. \u2018Europe/London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_ipaddress": {"name": "user_ipaddress", "description": "User IP address e.g. \u201892.231.54.234\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent": {"name": "useragent", "description": "Raw useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_lang": {"name": "br_lang", "description": "Language the browser is set to e.g. \u2018en-GB\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewwidth": {"name": "br_viewwidth", "description": "Viewport width e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewheight": {"name": "br_viewheight", "description": "Viewport height e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_colordepth": {"name": "br_colordepth", "description": "Bit depth of the browser color palette e.g. 24", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_renderengine": {"name": "br_renderengine", "description": "Browser rendering engine e.g. \u2018GECKO\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "category": {"name": "category", "description": "Category based on activity if the IP/UA is a spider or robot, BROWSER otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "primary_impact": {"name": "primary_impact", "description": "Whether the spider or robot would affect page impression measurement, ad impression measurement, both or none", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "Type of failed check if the IP/UA is a spider or robot, PASSED_ALL otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spider_or_robot": {"name": "spider_or_robot", "description": "True if the IP address or user agent checked against the list is a spider or robot, false otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_family": {"name": "useragent_family", "description": "Useragent family (browser) name", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_major": {"name": "useragent_major", "description": "Useragent major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_minor": {"name": "useragent_minor", "description": "Useragent minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_patch": {"name": "useragent_patch", "description": "Useragent patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_version": {"name": "useragent_version", "description": "Full version of the useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_family": {"name": "os_family", "description": "Operating system family e.g. \u2018Linux\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_major": {"name": "os_major", "description": "Operation system major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_minor": {"name": "os_minor", "description": "Operation system minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch": {"name": "os_patch", "description": "Operation system patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch_minor": {"name": "os_patch_minor", "description": "Operation system patch minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_version": {"name": "os_version", "description": "Operation system full version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_family": {"name": "device_family", "description": "Device type", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_class": {"name": "device_class", "description": "Class of device e.g. phone", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_class": {"name": "agent_class", "description": "Class of agent e.g. browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name": {"name": "agent_name", "description": "Name of agent e.g. Chrome", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version": {"name": "agent_name_version", "description": "Name and version of agent e.g. Chrome 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version_major": {"name": "agent_name_version_major", "description": "Name and major version of agent e.g. Chrome 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version": {"name": "agent_version", "description": "Version of agent e.g. 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version_major": {"name": "agent_version_major", "description": "Major version of agent e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_brand": {"name": "device_brand", "description": "Brand of device e.g. Google", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_name": {"name": "device_name", "description": "Name of device e.g. Google Nexus 6", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_version": {"name": "device_version", "description": "Version of device e.g. 6.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_class": {"name": "layout_engine_class", "description": "Class of layout engine e.g. Browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name": {"name": "layout_engine_name", "description": "Name of layout engine e.g. Blink", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version": {"name": "layout_engine_name_version", "description": "Name and version of layout engine e.g. Blink 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version_major": {"name": "layout_engine_name_version_major", "description": "Name and major version of layout engine e.g. Blink 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version": {"name": "layout_engine_version", "description": "Version of layout engine e.g. 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version_major": {"name": "layout_engine_version_major", "description": "Major version of layout engine e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_class": {"name": "operating_system_class", "description": "Class of the OS e.g. Mobile", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name": {"name": "operating_system_name", "description": "Name of the OS e.g. Android", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name_version": {"name": "operating_system_name_version", "description": "Name and version of the OS e.g. Android 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_version": {"name": "operating_system_version", "description": "Version of the OS e.g. 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/page_views.yml", "compiled_path": "target/compiled/snowplow_web/models/page_views/snowplow_web_page_views.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "snowplow_incremental", "bind": false, "schema": "derived", "tags": ["derived"], "unique_key": "page_view_id", "upsert_date_key": "start_tstamp", "sort": "start_tstamp", "dist": "page_view_id", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n"}, "created_at": 1652369620.5985699, "compiled_sql": "\n\n\nselect * \nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere cast(1 as boolean) --returns false if run doesn't contain new events.", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\""}, "model.snowplow_web.snowplow_web_pv_scroll_depth": {"raw_sql": "{{ \n config(\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"page_view_id\"]),\n sort='page_view_id',\n dist='page_view_id',\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nwith prep as (\n select\n ev.page_view_id,\n\n max(ev.doc_width) as doc_width,\n max(ev.doc_height) as doc_height,\n\n max(ev.br_viewwidth) as br_viewwidth,\n max(ev.br_viewheight) as br_viewheight,\n\n -- coalesce replaces null with 0 (because the page view event does send an offset)\n -- greatest prevents outliers (negative offsets)\n -- least also prevents outliers (offsets greater than the docwidth or docheight)\n\n least(greatest(min(coalesce(ev.pp_xoffset_min, 0)), 0), max(ev.doc_width)) as hmin, -- should be zero\n least(greatest(max(coalesce(ev.pp_xoffset_max, 0)), 0), max(ev.doc_width)) as hmax,\n\n least(greatest(min(coalesce(ev.pp_yoffset_min, 0)), 0), max(ev.doc_height)) as vmin, -- should be zero (edge case: not zero because the pv event is missing)\n least(greatest(max(coalesce(ev.pp_yoffset_max, 0)), 0), max(ev.doc_height)) as vmax\n\n from {{ ref('snowplow_web_base_events_this_run') }} as ev\n\n where ev.event_name in ('page_view', 'page_ping')\n and ev.page_view_id is not null\n and ev.doc_height > 0 -- exclude problematic (but rare) edge case\n and ev.doc_width > 0 -- exclude problematic (but rare) edge case\n\n group by 1\n)\n\nselect\n page_view_id,\n\n doc_width,\n doc_height,\n\n br_viewwidth,\n br_viewheight,\n\n hmin,\n hmax,\n vmin,\n vmax,\n\n cast(round(100*(greatest(hmin, 0)/cast(doc_width as {{ dbt_utils.type_float() }}))) as {{ dbt_utils.type_float() }}) as relative_hmin, -- brackets matter: because hmin is of type int, we need to divide before we multiply by 100 or we risk an overflow\n cast(round(100*(least(hmax + br_viewwidth, doc_width)/cast(doc_width as {{ dbt_utils.type_float() }}))) as {{ dbt_utils.type_float() }}) as relative_hmax,\n cast(round(100*(greatest(vmin, 0)/cast(doc_height as {{ dbt_utils.type_float() }}))) as {{ dbt_utils.type_float() }}) as relative_vmin,\n cast(round(100*(least(vmax + br_viewheight, doc_height)/cast(doc_height as {{ dbt_utils.type_float() }}))) as {{ dbt_utils.type_float() }}) as relative_vmax -- not zero when a user hasn't scrolled because it includes the non-zero viewheight\n\nfrom prep", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag", "macro.dbt_utils.type_float"], "nodes": ["model.snowplow_web.snowplow_web_base_events_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "page_view_id", "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "snowplow_web_pv_scroll_depth"], "unique_id": "model.snowplow_web.snowplow_web_pv_scroll_depth", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/snowplow_web_pv_scroll_depth.sql", "original_file_path": "models/page_views/scratch/snowplow_web_pv_scroll_depth.sql", "name": "snowplow_web_pv_scroll_depth", "alias": "snowplow_web_pv_scroll_depth", "checksum": {"name": "sha256", "checksum": "17bba4ae2a92ddedb99e70c4d3bfe68c16a67876fb5ae070d412a9e8ae126f5a"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_base_events_this_run"]], "sources": [], "description": "This model calculates the horizontal and vertical scroll depth of the vistor on a given page view. Such metrics are useful when assessing engagement on a page view.", "columns": {"page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/snowplow_web_pv_scroll_depth.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "cluster_by": "\n\n \n \n", "sort": "page_view_id", "dist": "page_view_id", "sql_header": "\n \n"}, "created_at": 1652369620.636547, "compiled_sql": "\n\nwith prep as (\n select\n ev.page_view_id,\n\n max(ev.doc_width) as doc_width,\n max(ev.doc_height) as doc_height,\n\n max(ev.br_viewwidth) as br_viewwidth,\n max(ev.br_viewheight) as br_viewheight,\n\n -- coalesce replaces null with 0 (because the page view event does send an offset)\n -- greatest prevents outliers (negative offsets)\n -- least also prevents outliers (offsets greater than the docwidth or docheight)\n\n least(greatest(min(coalesce(ev.pp_xoffset_min, 0)), 0), max(ev.doc_width)) as hmin, -- should be zero\n least(greatest(max(coalesce(ev.pp_xoffset_max, 0)), 0), max(ev.doc_width)) as hmax,\n\n least(greatest(min(coalesce(ev.pp_yoffset_min, 0)), 0), max(ev.doc_height)) as vmin, -- should be zero (edge case: not zero because the pv event is missing)\n least(greatest(max(coalesce(ev.pp_yoffset_max, 0)), 0), max(ev.doc_height)) as vmax\n\n from \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\" as ev\n\n where ev.event_name in ('page_view', 'page_ping')\n and ev.page_view_id is not null\n and ev.doc_height > 0 -- exclude problematic (but rare) edge case\n and ev.doc_width > 0 -- exclude problematic (but rare) edge case\n\n group by 1\n)\n\nselect\n page_view_id,\n\n doc_width,\n doc_height,\n\n br_viewwidth,\n br_viewheight,\n\n hmin,\n hmax,\n vmin,\n vmax,\n\n cast(round(100*(greatest(hmin, 0)/cast(doc_width as \n float\n))) as \n float\n) as relative_hmin, -- brackets matter: because hmin is of type int, we need to divide before we multiply by 100 or we risk an overflow\n cast(round(100*(least(hmax + br_viewwidth, doc_width)/cast(doc_width as \n float\n))) as \n float\n) as relative_hmax,\n cast(round(100*(greatest(vmin, 0)/cast(doc_height as \n float\n))) as \n float\n) as relative_vmin,\n cast(round(100*(least(vmax + br_viewheight, doc_height)/cast(doc_height as \n float\n))) as \n float\n) as relative_vmax -- not zero when a user hasn't scrolled because it includes the non-zero viewheight\n\nfrom prep", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_scroll_depth\""}, "model.snowplow_web.snowplow_web_pv_engaged_time": {"raw_sql": "{{ \n config(\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"page_view_id\"]),\n sort='page_view_id',\n dist='page_view_id',\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nselect\n ev.page_view_id,\n max(ev.derived_tstamp) as end_tstamp,\n\n -- aggregate pings:\n -- divides epoch tstamps by snowplow__heartbeat to get distinct intervals\n -- floor rounds to nearest integer - duplicates all evaluate to the same number\n -- count(distinct) counts duplicates only once\n -- adding snowplow__min_visit_length accounts for the page view event itself.\n\n {{ var(\"snowplow__heartbeat\", 10) }} * (count(distinct(floor({{ snowplow_utils.to_unixtstamp('ev.derived_tstamp') }}/{{ var(\"snowplow__heartbeat\", 10) }}))) - 1) + {{ var(\"snowplow__min_visit_length\", 5) }} as engaged_time_in_s\n\nfrom {{ ref('snowplow_web_base_events_this_run') }} as ev\n\nwhere ev.event_name = 'page_ping'\nand ev.page_view_id is not null\n\ngroup by 1", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.to_unixtstamp"], "nodes": ["model.snowplow_web.snowplow_web_base_events_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "page_view_id", "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "snowplow_web_pv_engaged_time"], "unique_id": "model.snowplow_web.snowplow_web_pv_engaged_time", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/snowplow_web_pv_engaged_time.sql", "original_file_path": "models/page_views/scratch/snowplow_web_pv_engaged_time.sql", "name": "snowplow_web_pv_engaged_time", "alias": "snowplow_web_pv_engaged_time", "checksum": {"name": "sha256", "checksum": "205172d1846e199d51b30791b780cf0a02ddaec3f1c032b820b8a28242adf47d"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_base_events_this_run"]], "sources": [], "description": "This model calculates the time a visitor spent engaged on a given page view. This is calculated using the number of page ping events received for that page view.", "columns": {"page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/snowplow_web_pv_engaged_time.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "cluster_by": "\n\n \n \n", "sort": "page_view_id", "dist": "page_view_id", "sql_header": "\n \n"}, "created_at": 1652369620.635801, "compiled_sql": "\n\nselect\n ev.page_view_id,\n max(ev.derived_tstamp) as end_tstamp,\n\n -- aggregate pings:\n -- divides epoch tstamps by snowplow__heartbeat to get distinct intervals\n -- floor rounds to nearest integer - duplicates all evaluate to the same number\n -- count(distinct) counts duplicates only once\n -- adding snowplow__min_visit_length accounts for the page view event itself.\n\n 10 * (count(distinct(floor(date_part('epoch', ev.derived_tstamp)/10))) - 1) + 5 as engaged_time_in_s\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\" as ev\n\nwhere ev.event_name = 'page_ping'\nand ev.page_view_id is not null\n\ngroup by 1", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_engaged_time\""}, "model.snowplow_web.snowplow_web_page_views_this_run": {"raw_sql": "{{ \n config(\n sort='start_tstamp',\n dist='page_view_id',\n tags=[\"this_run\"]\n ) \n}}\n\n\nselect\n ev.page_view_id,\n ev.event_id,\n\n ev.app_id,\n\n -- user fields\n ev.user_id,\n ev.domain_userid,\n ev.network_userid,\n\n -- session fields\n ev.domain_sessionid,\n ev.domain_sessionidx,\n\n ev.page_view_in_session_index,\n max(ev.page_view_in_session_index) over (partition by ev.domain_sessionid) as page_views_in_session,\n\n -- timestamp fields\n ev.dvce_created_tstamp,\n ev.collector_tstamp,\n ev.derived_tstamp,\n ev.start_tstamp,\n coalesce(t.end_tstamp, ev.derived_tstamp) as end_tstamp, -- only page views with pings will have a row in table t\n {{ dbt_utils.current_timestamp_in_utc() }} as model_tstamp,\n\n coalesce(t.engaged_time_in_s, 0) as engaged_time_in_s, -- where there are no pings, engaged time is 0.\n {{ dbt_utils.datediff('ev.derived_tstamp', 'coalesce(t.end_tstamp, ev.derived_tstamp)', 'second') }} as absolute_time_in_s,\n\n sd.hmax as horizontal_pixels_scrolled,\n sd.vmax as vertical_pixels_scrolled,\n\n sd.relative_hmax as horizontal_percentage_scrolled,\n sd.relative_vmax as vertical_percentage_scrolled,\n\n ev.doc_width,\n ev.doc_height,\n\n ev.page_title,\n ev.page_url,\n ev.page_urlscheme,\n ev.page_urlhost,\n ev.page_urlpath,\n ev.page_urlquery,\n ev.page_urlfragment,\n\n ev.mkt_medium,\n ev.mkt_source,\n ev.mkt_term,\n ev.mkt_content,\n ev.mkt_campaign,\n ev.mkt_clickid,\n ev.mkt_network,\n\n ev.page_referrer,\n ev.refr_urlscheme,\n ev.refr_urlhost,\n ev.refr_urlpath,\n ev.refr_urlquery,\n ev.refr_urlfragment,\n ev.refr_medium,\n ev.refr_source,\n ev.refr_term,\n\n ev.geo_country,\n ev.geo_region,\n ev.geo_region_name,\n ev.geo_city,\n ev.geo_zipcode,\n ev.geo_latitude,\n ev.geo_longitude,\n ev.geo_timezone,\n\n ev.user_ipaddress,\n\n ev.useragent,\n\n ev.br_lang,\n ev.br_viewwidth,\n ev.br_viewheight,\n ev.br_colordepth,\n ev.br_renderengine,\n\n ev.os_timezone,\n\n -- optional fields, only populated if enabled.\n\n -- iab enrichment fields: set iab variable to true to enable\n {% if var('snowplow__enable_iab', false) %}\n iab.category,\n iab.primary_impact,\n iab.reason,\n iab.spider_or_robot,\n {% else %}\n cast(null as varchar) as category,\n cast(null as varchar) as primary_impact,\n cast(null as varchar) as reason,\n cast(null as boolean) as spider_or_robot,\n {% endif %}\n\n -- ua parser enrichment fields: set ua_parser variable to true to enable\n {% if var('snowplow__enable_ua', false) %}\n ua.useragent_family,\n ua.useragent_major,\n ua.useragent_minor,\n ua.useragent_patch,\n ua.useragent_version,\n ua.os_family,\n ua.os_major,\n ua.os_minor,\n ua.os_patch,\n ua.os_patch_minor,\n ua.os_version,\n ua.device_family,\n {% else %}\n cast(null as varchar) as useragent_family,\n cast(null as varchar) as useragent_major,\n cast(null as varchar) as useragent_minor,\n cast(null as varchar) as useragent_patch,\n cast(null as varchar) as useragent_version,\n cast(null as varchar) as os_family,\n cast(null as varchar) as os_major,\n cast(null as varchar) as os_minor,\n cast(null as varchar) as os_patch,\n cast(null as varchar) as os_patch_minor,\n cast(null as varchar) as os_version,\n cast(null as varchar) as device_family,\n {% endif %}\n\n -- yauaa enrichment fields: set yauaa variable to true to enable\n {% if var('snowplow__enable_yauaa', false) %}\n ya.device_class,\n ya.agent_class,\n ya.agent_name,\n ya.agent_name_version,\n ya.agent_name_version_major,\n ya.agent_version,\n ya.agent_version_major,\n ya.device_brand,\n ya.device_name,\n ya.device_version,\n ya.layout_engine_class,\n ya.layout_engine_name,\n ya.layout_engine_name_version,\n ya.layout_engine_name_version_major,\n ya.layout_engine_version,\n ya.layout_engine_version_major,\n ya.operating_system_class,\n ya.operating_system_name,\n ya.operating_system_name_version,\n ya.operating_system_version\n {% else %}\n cast(null as varchar) as device_class,\n cast(null as varchar) as agent_class,\n cast(null as varchar) as agent_name,\n cast(null as varchar) as agent_name_version,\n cast(null as varchar) as agent_name_version_major,\n cast(null as varchar) as agent_version,\n cast(null as varchar) as agent_version_major,\n cast(null as varchar) as device_brand,\n cast(null as varchar) as device_name,\n cast(null as varchar) as device_version,\n cast(null as varchar) as layout_engine_class,\n cast(null as varchar) as layout_engine_name,\n cast(null as varchar) as layout_engine_name_version,\n cast(null as varchar) as layout_engine_name_version_major,\n cast(null as varchar) as layout_engine_version,\n cast(null as varchar) as layout_engine_version_major,\n cast(null as varchar) as operating_system_class,\n cast(null as varchar) as operating_system_name,\n cast(null as varchar) as operating_system_name_version,\n cast(null as varchar) as operating_system_version\n {% endif %}\n\nfrom {{ ref('snowplow_web_page_view_events') }} ev\n\nleft join {{ ref('snowplow_web_pv_engaged_time') }} t\non ev.page_view_id = t.page_view_id\n\nleft join {{ ref('snowplow_web_pv_scroll_depth') }} sd\non ev.page_view_id = sd.page_view_id\n\n{% if var('snowplow__enable_iab', false) -%}\n\n left join {{ ref('snowplow_web_pv_iab') }} iab\n on ev.page_view_id = iab.page_view_id\n\n{% endif -%}\n\n{% if var('snowplow__enable_ua', false) -%}\n\n left join {{ ref('snowplow_web_pv_ua_parser') }} ua\n on ev.page_view_id = ua.page_view_id\n\n{% endif -%}\n\n{% if var('snowplow__enable_yauaa', false) -%}\n\n left join {{ ref('snowplow_web_pv_yauaa') }} ya\n on ev.page_view_id = ya.page_view_id\n\n{%- endif -%}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.current_timestamp_in_utc", "macro.dbt_utils.datediff"], "nodes": ["model.snowplow_web.snowplow_web_page_view_events", "model.snowplow_web.snowplow_web_pv_engaged_time", "model.snowplow_web.snowplow_web_pv_scroll_depth"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "start_tstamp", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "default", "snowplow_web_page_views_this_run"], "unique_id": "model.snowplow_web.snowplow_web_page_views_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/default/snowplow_web_page_views_this_run.sql", "original_file_path": "models/page_views/scratch/default/snowplow_web_page_views_this_run.sql", "name": "snowplow_web_page_views_this_run", "alias": "snowplow_web_page_views_this_run", "checksum": {"name": "sha256", "checksum": "d7e7f017c39b60903eb22bf0845029afa85183db451023f1f08991207f6a4d6e"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_web_page_view_events"], ["snowplow_web_pv_engaged_time"], ["snowplow_web_pv_scroll_depth"]], "sources": [], "description": "This staging table contains all the page views for the given run of the Web model. It possess all the same columns as `snowplow_web_page_views`. If building a custom module that requires page view events, this is the table you should reference.", "columns": {"page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "event_id": {"name": "event_id", "description": "A UUID for each event e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "Application ID e.g. \u2018angry-birds\u2019 is used to distinguish different applications that are being tracked by the same Snowplow stack, e.g. production versus dev.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionidx": {"name": "domain_sessionidx", "description": "A visit / session index e.g. 3", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_view_in_session_index": {"name": "page_view_in_session_index", "description": "A page view index within a single session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_views_in_session": {"name": "page_views_in_session", "description": "Distinct count of `page_view_id` within a session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_created_tstamp": {"name": "dvce_created_tstamp", "description": "Timestamp event was recorded on the client device e.g. \u20182013-11-26 00:03:57.885\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "collector_tstamp": {"name": "collector_tstamp", "description": "Time stamp for the event recorded by the collector e.g. `2013-11-26 00:02:05`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "derived_tstamp": {"name": "derived_tstamp", "description": "Timestamp making allowance for inaccurate device clock e.g. `2013-11-26 00:02:04`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "Timestamp for the start of the page view, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "Timestamp for the end of the page view, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "model_tstamp": {"name": "model_tstamp", "description": "The current timestamp when the model processed this row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "engaged_time_in_s": {"name": "engaged_time_in_s", "description": "Time spent by the user on the page calculated using page pings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "absolute_time_in_s": {"name": "absolute_time_in_s", "description": "The time in seconds between the `start_tstamp` and `end_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "horizontal_pixels_scrolled": {"name": "horizontal_pixels_scrolled", "description": "Distance the user scrolled horizontally in pixels", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vertical_pixels_scrolled": {"name": "vertical_pixels_scrolled", "description": "Distance the user scrolled vertically in pixels", "meta": {}, "data_type": null, "quote": null, "tags": []}, "horizontal_percentage_scrolled": {"name": "horizontal_percentage_scrolled", "description": "Percentage of page scrolled horizontally", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vertical_percentage_scrolled": {"name": "vertical_percentage_scrolled", "description": "Percentage of page scrolled vertically", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_width": {"name": "doc_width", "description": "The page\u2019s width in pixels e.g. 1024", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_height": {"name": "doc_height", "description": "The page\u2019s height in pixels e.g. 3000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_title": {"name": "page_title", "description": "Web page title e.g. \u2018Snowplow Docs \u2013 Understanding the structure of Snowplow data\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlscheme": {"name": "page_urlscheme", "description": "Scheme aka protocol e.g. \u2018https\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlhost": {"name": "page_urlhost", "description": "Host aka domain e.g. \u2018\u201cwww.snowplowanalytics.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlpath": {"name": "page_urlpath", "description": "Path to page e.g. \u2018/product/index.html\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlquery": {"name": "page_urlquery", "description": "Querystring e.g. \u2018id=GTM-DLRG\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlfragment": {"name": "page_urlfragment", "description": "Fragment aka anchor e.g. \u20184-conclusion\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_country": {"name": "geo_country", "description": "ISO 3166-1 code for the country the visitor is located in e.g. \u2018GB\u2019, \u2018US\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region": {"name": "geo_region", "description": "ISO-3166-2 code for country region the visitor is in e.g. \u2018I9\u2019, \u2018TX\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_city": {"name": "geo_city", "description": "City the visitor is in e.g. \u2018New York\u2019, \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_zipcode": {"name": "geo_zipcode", "description": "Postcode the visitor is in e.g. \u201894109\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_latitude": {"name": "geo_latitude", "description": "Visitor location latitude e.g. 37.443604", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_longitude": {"name": "geo_longitude", "description": "Visitor location longitude e.g. -122.4124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_timezone": {"name": "geo_timezone", "description": "Visitor timezone name e.g. \u2018Europe/London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_ipaddress": {"name": "user_ipaddress", "description": "User IP address e.g. \u201892.231.54.234\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent": {"name": "useragent", "description": "Raw useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_lang": {"name": "br_lang", "description": "Language the browser is set to e.g. \u2018en-GB\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewwidth": {"name": "br_viewwidth", "description": "Viewport width e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewheight": {"name": "br_viewheight", "description": "Viewport height e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_colordepth": {"name": "br_colordepth", "description": "Bit depth of the browser color palette e.g. 24", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_renderengine": {"name": "br_renderengine", "description": "Browser rendering engine e.g. \u2018GECKO\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "category": {"name": "category", "description": "Category based on activity if the IP/UA is a spider or robot, BROWSER otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "primary_impact": {"name": "primary_impact", "description": "Whether the spider or robot would affect page impression measurement, ad impression measurement, both or none", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "Type of failed check if the IP/UA is a spider or robot, PASSED_ALL otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spider_or_robot": {"name": "spider_or_robot", "description": "True if the IP address or user agent checked against the list is a spider or robot, false otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_family": {"name": "useragent_family", "description": "Useragent family (browser) name", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_major": {"name": "useragent_major", "description": "Useragent major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_minor": {"name": "useragent_minor", "description": "Useragent minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_patch": {"name": "useragent_patch", "description": "Useragent patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_version": {"name": "useragent_version", "description": "Full version of the useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_family": {"name": "os_family", "description": "Operating system family e.g. \u2018Linux\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_major": {"name": "os_major", "description": "Operation system major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_minor": {"name": "os_minor", "description": "Operation system minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch": {"name": "os_patch", "description": "Operation system patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch_minor": {"name": "os_patch_minor", "description": "Operation system patch minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_version": {"name": "os_version", "description": "Operation system full version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_family": {"name": "device_family", "description": "Device type", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_class": {"name": "device_class", "description": "Class of device e.g. phone", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_class": {"name": "agent_class", "description": "Class of agent e.g. browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name": {"name": "agent_name", "description": "Name of agent e.g. Chrome", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version": {"name": "agent_name_version", "description": "Name and version of agent e.g. Chrome 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version_major": {"name": "agent_name_version_major", "description": "Name and major version of agent e.g. Chrome 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version": {"name": "agent_version", "description": "Version of agent e.g. 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version_major": {"name": "agent_version_major", "description": "Major version of agent e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_brand": {"name": "device_brand", "description": "Brand of device e.g. Google", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_name": {"name": "device_name", "description": "Name of device e.g. Google Nexus 6", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_version": {"name": "device_version", "description": "Version of device e.g. 6.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_class": {"name": "layout_engine_class", "description": "Class of layout engine e.g. Browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name": {"name": "layout_engine_name", "description": "Name of layout engine e.g. Blink", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version": {"name": "layout_engine_name_version", "description": "Name and version of layout engine e.g. Blink 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version_major": {"name": "layout_engine_name_version_major", "description": "Name and major version of layout engine e.g. Blink 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version": {"name": "layout_engine_version", "description": "Version of layout engine e.g. 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version_major": {"name": "layout_engine_version_major", "description": "Major version of layout engine e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_class": {"name": "operating_system_class", "description": "Class of the OS e.g. Mobile", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name": {"name": "operating_system_name", "description": "Name of the OS e.g. Android", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name_version": {"name": "operating_system_name_version", "description": "Name and version of the OS e.g. Android 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_version": {"name": "operating_system_version", "description": "Version of the OS e.g. 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/default/snowplow_web_page_views_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "enabled": "{{ target.type in ['redshift', 'postgres'] | as_bool() }}", "sort": "start_tstamp", "dist": "page_view_id"}, "created_at": 1652369620.632834, "compiled_sql": "\n\n\nselect\n ev.page_view_id,\n ev.event_id,\n\n ev.app_id,\n\n -- user fields\n ev.user_id,\n ev.domain_userid,\n ev.network_userid,\n\n -- session fields\n ev.domain_sessionid,\n ev.domain_sessionidx,\n\n ev.page_view_in_session_index,\n max(ev.page_view_in_session_index) over (partition by ev.domain_sessionid) as page_views_in_session,\n\n -- timestamp fields\n ev.dvce_created_tstamp,\n ev.collector_tstamp,\n ev.derived_tstamp,\n ev.start_tstamp,\n coalesce(t.end_tstamp, ev.derived_tstamp) as end_tstamp, -- only page views with pings will have a row in table t\n \n \n getdate()\n\n as model_tstamp,\n\n coalesce(t.engaged_time_in_s, 0) as engaged_time_in_s, -- where there are no pings, engaged time is 0.\n datediff(\n second,\n ev.derived_tstamp,\n coalesce(t.end_tstamp, ev.derived_tstamp)\n ) as absolute_time_in_s,\n\n sd.hmax as horizontal_pixels_scrolled,\n sd.vmax as vertical_pixels_scrolled,\n\n sd.relative_hmax as horizontal_percentage_scrolled,\n sd.relative_vmax as vertical_percentage_scrolled,\n\n ev.doc_width,\n ev.doc_height,\n\n ev.page_title,\n ev.page_url,\n ev.page_urlscheme,\n ev.page_urlhost,\n ev.page_urlpath,\n ev.page_urlquery,\n ev.page_urlfragment,\n\n ev.mkt_medium,\n ev.mkt_source,\n ev.mkt_term,\n ev.mkt_content,\n ev.mkt_campaign,\n ev.mkt_clickid,\n ev.mkt_network,\n\n ev.page_referrer,\n ev.refr_urlscheme,\n ev.refr_urlhost,\n ev.refr_urlpath,\n ev.refr_urlquery,\n ev.refr_urlfragment,\n ev.refr_medium,\n ev.refr_source,\n ev.refr_term,\n\n ev.geo_country,\n ev.geo_region,\n ev.geo_region_name,\n ev.geo_city,\n ev.geo_zipcode,\n ev.geo_latitude,\n ev.geo_longitude,\n ev.geo_timezone,\n\n ev.user_ipaddress,\n\n ev.useragent,\n\n ev.br_lang,\n ev.br_viewwidth,\n ev.br_viewheight,\n ev.br_colordepth,\n ev.br_renderengine,\n\n ev.os_timezone,\n\n -- optional fields, only populated if enabled.\n\n -- iab enrichment fields: set iab variable to true to enable\n \n cast(null as varchar) as category,\n cast(null as varchar) as primary_impact,\n cast(null as varchar) as reason,\n cast(null as boolean) as spider_or_robot,\n \n\n -- ua parser enrichment fields: set ua_parser variable to true to enable\n \n cast(null as varchar) as useragent_family,\n cast(null as varchar) as useragent_major,\n cast(null as varchar) as useragent_minor,\n cast(null as varchar) as useragent_patch,\n cast(null as varchar) as useragent_version,\n cast(null as varchar) as os_family,\n cast(null as varchar) as os_major,\n cast(null as varchar) as os_minor,\n cast(null as varchar) as os_patch,\n cast(null as varchar) as os_patch_minor,\n cast(null as varchar) as os_version,\n cast(null as varchar) as device_family,\n \n\n -- yauaa enrichment fields: set yauaa variable to true to enable\n \n cast(null as varchar) as device_class,\n cast(null as varchar) as agent_class,\n cast(null as varchar) as agent_name,\n cast(null as varchar) as agent_name_version,\n cast(null as varchar) as agent_name_version_major,\n cast(null as varchar) as agent_version,\n cast(null as varchar) as agent_version_major,\n cast(null as varchar) as device_brand,\n cast(null as varchar) as device_name,\n cast(null as varchar) as device_version,\n cast(null as varchar) as layout_engine_class,\n cast(null as varchar) as layout_engine_name,\n cast(null as varchar) as layout_engine_name_version,\n cast(null as varchar) as layout_engine_name_version_major,\n cast(null as varchar) as layout_engine_version,\n cast(null as varchar) as layout_engine_version_major,\n cast(null as varchar) as operating_system_class,\n cast(null as varchar) as operating_system_name,\n cast(null as varchar) as operating_system_name_version,\n cast(null as varchar) as operating_system_version\n \n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_view_events\" ev\n\nleft join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_engaged_time\" t\non ev.page_view_id = t.page_view_id\n\nleft join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_scroll_depth\" sd\non ev.page_view_id = sd.page_view_id\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\""}, "model.snowplow_web.snowplow_web_pv_limits": {"raw_sql": "select\n min(collector_tstamp) as lower_limit,\n max(collector_tstamp) as upper_limit\n\nfrom {{ ref('snowplow_web_base_events_this_run') }}\n\nwhere page_view_id is not null", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.snowplow_web.snowplow_web_base_events_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "default", "snowplow_web_pv_limits"], "unique_id": "model.snowplow_web.snowplow_web_pv_limits", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/default/snowplow_web_pv_limits.sql", "original_file_path": "models/page_views/scratch/default/snowplow_web_pv_limits.sql", "name": "snowplow_web_pv_limits", "alias": "snowplow_web_pv_limits", "checksum": {"name": "sha256", "checksum": "bab5e4153452cd95f5891971d25d9ea117ad0049249c8af1c04c32b39baccc9d"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_base_events_this_run"]], "sources": [], "description": "This model calculates the lower and upper limit for the page views events in the given run. This is based taking the min and max `collector_tstamp` across all page views. It is used to improve performance when selected rows from the various context tables such as the UA parser table.", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/default/snowplow_web_pv_limits.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "enabled": "{{ target.type in ['redshift', 'postgres'] | as_bool() }}"}, "created_at": 1652369620.6360059, "compiled_sql": "select\n min(collector_tstamp) as lower_limit,\n max(collector_tstamp) as upper_limit\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\"\n\nwhere page_view_id is not null", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_limits\""}, "model.snowplow_web.snowplow_web_page_view_events": {"raw_sql": "{{ \n config(\n sort='start_tstamp',\n dist='page_view_id'\n ) \n}}\n\nwith page_view_events as (\n select\n ev.page_view_id,\n ev.event_id,\n\n ev.app_id,\n\n -- user fields\n ev.user_id,\n ev.domain_userid,\n ev.network_userid,\n\n -- session fields\n ev.domain_sessionid,\n ev.domain_sessionidx,\n\n -- timestamp fields\n ev.dvce_created_tstamp,\n ev.collector_tstamp,\n ev.derived_tstamp,\n ev.derived_tstamp as start_tstamp,\n\n ev.doc_width,\n ev.doc_height,\n\n ev.page_title,\n ev.page_url,\n ev.page_urlscheme,\n ev.page_urlhost,\n ev.page_urlpath,\n ev.page_urlquery,\n ev.page_urlfragment,\n\n ev.mkt_medium,\n ev.mkt_source,\n ev.mkt_term,\n ev.mkt_content,\n ev.mkt_campaign,\n ev.mkt_clickid,\n ev.mkt_network,\n\n ev.page_referrer,\n ev.refr_urlscheme ,\n ev.refr_urlhost,\n ev.refr_urlpath,\n ev.refr_urlquery,\n ev.refr_urlfragment,\n ev.refr_medium,\n ev.refr_source,\n ev.refr_term,\n\n ev.geo_country,\n ev.geo_region,\n ev.geo_region_name,\n ev.geo_city,\n ev.geo_zipcode,\n ev.geo_latitude,\n ev.geo_longitude,\n ev.geo_timezone ,\n\n ev.user_ipaddress,\n\n ev.useragent,\n\n ev.br_lang,\n ev.br_viewwidth,\n ev.br_viewheight,\n ev.br_colordepth,\n ev.br_renderengine,\n ev.os_timezone,\n\n dense_rank() over (partition by ev.page_view_id order by ev.derived_tstamp) as page_view_id_dedupe_index\n\n from {{ ref('snowplow_web_base_events_this_run') }} as ev\n\n where ev.event_name = 'page_view'\n and ev.page_view_id is not null\n\n {% if var(\"snowplow__ua_bot_filter\", true) %}\n and ev.useragent not similar to '%(bot|crawl|slurp|spider|archiv|spinn|sniff|seo|audit|survey|pingdom|worm|capture|(browser|screen)shots|analyz|index|thumb|check|facebook|PingdomBot|PhantomJS|YandexBot|Twitterbot|a_archiver|facebookexternalhit|Bingbot|BingPreview|Googlebot|Baiduspider|360(Spider|User-agent)|semalt)%'\n {% endif %}\n)\n\n-- Dedupe: Take first row of duplicate page view, unless derived_tstamp also duplicated. \n-- Remove pv entirely if both fields are dupes. Avoids 1:many join with context tables.\n, dedupe as (\n select\n *,\n count(*) over(partition by page_view_id) as row_count\n\n from page_view_events\n where page_view_id_dedupe_index = 1 -- Keep row(s) with earliest derived_tstamp per dupe pv\n)\n\nselect\n pv.page_view_id,\n pv.event_id,\n\n pv.app_id,\n\n -- user fields\n pv.user_id,\n pv.domain_userid,\n pv.network_userid,\n\n -- session fields\n pv.domain_sessionid,\n pv.domain_sessionidx,\n\n -- timestamp fields\n pv.dvce_created_tstamp,\n pv.collector_tstamp,\n pv.derived_tstamp,\n pv.start_tstamp,\n\n pv.doc_width,\n pv.doc_height,\n\n pv.page_title,\n pv.page_url,\n pv.page_urlscheme,\n pv.page_urlhost,\n pv.page_urlpath,\n pv.page_urlquery,\n pv.page_urlfragment,\n\n pv.mkt_medium,\n pv.mkt_source,\n pv.mkt_term,\n pv.mkt_content,\n pv.mkt_campaign,\n pv.mkt_clickid,\n pv.mkt_network,\n\n pv.page_referrer,\n pv.refr_urlscheme ,\n pv.refr_urlhost,\n pv.refr_urlpath,\n pv.refr_urlquery,\n pv.refr_urlfragment,\n pv.refr_medium,\n pv.refr_source,\n pv.refr_term,\n\n pv.geo_country,\n pv.geo_region,\n pv.geo_region_name,\n pv.geo_city,\n pv.geo_zipcode,\n pv.geo_latitude,\n pv.geo_longitude,\n pv.geo_timezone ,\n\n pv.user_ipaddress,\n\n pv.useragent,\n\n pv.br_lang,\n pv.br_viewwidth,\n pv.br_viewheight,\n pv.br_colordepth,\n pv.br_renderengine,\n pv.os_timezone,\n\n row_number() over (partition by pv.domain_sessionid order by pv.derived_tstamp) as page_view_in_session_index --Moved to post dedupe, unlike V1 web model.\n\nfrom dedupe as pv\n\nwhere row_count = 1 -- Remove dupe page views with more than 1 row", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.snowplow_web.snowplow_web_base_events_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "start_tstamp", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "default", "snowplow_web_page_view_events"], "unique_id": "model.snowplow_web.snowplow_web_page_view_events", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/default/snowplow_web_page_view_events.sql", "original_file_path": "models/page_views/scratch/default/snowplow_web_page_view_events.sql", "name": "snowplow_web_page_view_events", "alias": "snowplow_web_page_view_events", "checksum": {"name": "sha256", "checksum": "ef36718d001f47cfcdef4cb6b4fd84a57815e50e100785962f6fe682e293eae0"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_base_events_this_run"]], "sources": [], "description": "This is a staging table containing all the page view events for a given run of the Web model. It is the first step in the page views module and therefore does not contain metrics such as engaged time and scroll depth which are calculated in subsequent models. It is also where the de-duping of `page_view_id`'s occurs", "columns": {"page_view_id": {"name": "page_view_id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/default/snowplow_web_page_view_events.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "enabled": "{{ target.type in ['redshift', 'postgres'] | as_bool() }}", "sort": "start_tstamp", "dist": "page_view_id"}, "created_at": 1652369620.633472, "compiled_sql": "\n\nwith page_view_events as (\n select\n ev.page_view_id,\n ev.event_id,\n\n ev.app_id,\n\n -- user fields\n ev.user_id,\n ev.domain_userid,\n ev.network_userid,\n\n -- session fields\n ev.domain_sessionid,\n ev.domain_sessionidx,\n\n -- timestamp fields\n ev.dvce_created_tstamp,\n ev.collector_tstamp,\n ev.derived_tstamp,\n ev.derived_tstamp as start_tstamp,\n\n ev.doc_width,\n ev.doc_height,\n\n ev.page_title,\n ev.page_url,\n ev.page_urlscheme,\n ev.page_urlhost,\n ev.page_urlpath,\n ev.page_urlquery,\n ev.page_urlfragment,\n\n ev.mkt_medium,\n ev.mkt_source,\n ev.mkt_term,\n ev.mkt_content,\n ev.mkt_campaign,\n ev.mkt_clickid,\n ev.mkt_network,\n\n ev.page_referrer,\n ev.refr_urlscheme ,\n ev.refr_urlhost,\n ev.refr_urlpath,\n ev.refr_urlquery,\n ev.refr_urlfragment,\n ev.refr_medium,\n ev.refr_source,\n ev.refr_term,\n\n ev.geo_country,\n ev.geo_region,\n ev.geo_region_name,\n ev.geo_city,\n ev.geo_zipcode,\n ev.geo_latitude,\n ev.geo_longitude,\n ev.geo_timezone ,\n\n ev.user_ipaddress,\n\n ev.useragent,\n\n ev.br_lang,\n ev.br_viewwidth,\n ev.br_viewheight,\n ev.br_colordepth,\n ev.br_renderengine,\n ev.os_timezone,\n\n dense_rank() over (partition by ev.page_view_id order by ev.derived_tstamp) as page_view_id_dedupe_index\n\n from \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\" as ev\n\n where ev.event_name = 'page_view'\n and ev.page_view_id is not null\n\n \n and ev.useragent not similar to '%(bot|crawl|slurp|spider|archiv|spinn|sniff|seo|audit|survey|pingdom|worm|capture|(browser|screen)shots|analyz|index|thumb|check|facebook|PingdomBot|PhantomJS|YandexBot|Twitterbot|a_archiver|facebookexternalhit|Bingbot|BingPreview|Googlebot|Baiduspider|360(Spider|User-agent)|semalt)%'\n \n)\n\n-- Dedupe: Take first row of duplicate page view, unless derived_tstamp also duplicated. \n-- Remove pv entirely if both fields are dupes. Avoids 1:many join with context tables.\n, dedupe as (\n select\n *,\n count(*) over(partition by page_view_id) as row_count\n\n from page_view_events\n where page_view_id_dedupe_index = 1 -- Keep row(s) with earliest derived_tstamp per dupe pv\n)\n\nselect\n pv.page_view_id,\n pv.event_id,\n\n pv.app_id,\n\n -- user fields\n pv.user_id,\n pv.domain_userid,\n pv.network_userid,\n\n -- session fields\n pv.domain_sessionid,\n pv.domain_sessionidx,\n\n -- timestamp fields\n pv.dvce_created_tstamp,\n pv.collector_tstamp,\n pv.derived_tstamp,\n pv.start_tstamp,\n\n pv.doc_width,\n pv.doc_height,\n\n pv.page_title,\n pv.page_url,\n pv.page_urlscheme,\n pv.page_urlhost,\n pv.page_urlpath,\n pv.page_urlquery,\n pv.page_urlfragment,\n\n pv.mkt_medium,\n pv.mkt_source,\n pv.mkt_term,\n pv.mkt_content,\n pv.mkt_campaign,\n pv.mkt_clickid,\n pv.mkt_network,\n\n pv.page_referrer,\n pv.refr_urlscheme ,\n pv.refr_urlhost,\n pv.refr_urlpath,\n pv.refr_urlquery,\n pv.refr_urlfragment,\n pv.refr_medium,\n pv.refr_source,\n pv.refr_term,\n\n pv.geo_country,\n pv.geo_region,\n pv.geo_region_name,\n pv.geo_city,\n pv.geo_zipcode,\n pv.geo_latitude,\n pv.geo_longitude,\n pv.geo_timezone ,\n\n pv.user_ipaddress,\n\n pv.useragent,\n\n pv.br_lang,\n pv.br_viewwidth,\n pv.br_viewheight,\n pv.br_colordepth,\n pv.br_renderengine,\n pv.os_timezone,\n\n row_number() over (partition by pv.domain_sessionid order by pv.derived_tstamp) as page_view_in_session_index --Moved to post dedupe, unlike V1 web model.\n\nfrom dedupe as pv\n\nwhere row_count = 1 -- Remove dupe page views with more than 1 row", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_view_events\""}, "model.snowplow_web.snowplow_web_user_mapping": {"raw_sql": "{{ \n config(\n materialized='incremental',\n unique_key='domain_userid',\n sort='end_tstamp',\n dist='domain_userid',\n partition_by = {\n \"field\": \"end_tstamp\",\n \"data_type\": \"timestamp\"},\n tags=[\"derived\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n\nselect distinct\n domain_userid,\n last_value(user_id) over(\n partition by domain_userid \n order by collector_tstamp \n rows between unbounded preceding and unbounded following\n ) as user_id,\n max(collector_tstamp) over (partition by domain_userid) as end_tstamp\n\nfrom {{ ref('snowplow_web_base_events_this_run') }}\n\nwhere {{ snowplow_utils.is_run_with_new_events('snowplow_web') }} --returns false if run doesn't contain new events.\nand user_id is not null\nand domain_userid is not null", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.is_run_with_new_events"], "nodes": ["model.snowplow_web.snowplow_web_base_events_this_run", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "derived", "database": null, "tags": ["snowplow_web_incremental", "derived"], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_userid", "sort": "end_tstamp", "unique_key": "domain_userid", "partition_by": {"field": "end_tstamp", "data_type": "timestamp"}, "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_derived", "fqn": ["snowplow_web", "user_mapping", "snowplow_web_user_mapping"], "unique_id": "model.snowplow_web.snowplow_web_user_mapping", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "user_mapping/snowplow_web_user_mapping.sql", "original_file_path": "models/user_mapping/snowplow_web_user_mapping.sql", "name": "snowplow_web_user_mapping", "alias": "snowplow_web_user_mapping", "checksum": {"name": "sha256", "checksum": "ed8b2e40d61e92949ef162d40d22b0afb32585536a1bd343c3cfca52902f54f1"}, "tags": ["snowplow_web_incremental", "derived"], "refs": [["snowplow_web_base_events_this_run"], ["snowplow_web_base_new_event_limits"], ["snowplow_web_incremental_manifest"]], "sources": [], "description": "A mapping table between `domain_userid` and `user_id`.", "columns": {"domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "The `collector_tstamp` when the user was last active", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/user_mapping/user_mapping.yml", "compiled_path": "target/compiled/snowplow_web/models/user_mapping/snowplow_web_user_mapping.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "bind": false, "schema": "derived", "tags": ["derived"], "unique_key": "domain_userid", "sort": "end_tstamp", "dist": "domain_userid", "partition_by": {"field": "end_tstamp", "data_type": "timestamp"}, "sql_header": "\n \n"}, "created_at": 1652369620.670034, "compiled_sql": "\n\n\nselect distinct\n domain_userid,\n last_value(user_id) over(\n partition by domain_userid \n order by collector_tstamp \n rows between unbounded preceding and unbounded following\n ) as user_id,\n max(collector_tstamp) over (partition by domain_userid) as end_tstamp\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\"\n\nwhere cast(1 as boolean) --returns false if run doesn't contain new events.\nand user_id is not null\nand domain_userid is not null", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_derived\".\"snowplow_web_user_mapping\""}, "model.snowplow_web.snowplow_web_sessions": {"raw_sql": "{{ \n config(\n materialized=var(\"snowplow__incremental_materialization\"),\n unique_key='domain_sessionid',\n upsert_date_key='start_tstamp',\n sort='start_tstamp',\n dist='domain_sessionid',\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_web.web_cluster_by_fields_sessions(),\n tags=[\"derived\"],\n post_hook=\"{{ snowplow_web.stitch_user_identifiers(\n enabled=var('snowplow__session_stitching')\n ) }}\",\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n\nselect * \nfrom {{ ref('snowplow_web_sessions_this_run') }}\nwhere {{ snowplow_utils.is_run_with_new_events('snowplow_web') }} --returns false if run doesn't contain new events.", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_web.web_cluster_by_fields_sessions", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.is_run_with_new_events", "macro.snowplow_web.stitch_user_identifiers"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest", "model.snowplow_web.snowplow_web_user_mapping"]}, "config": {"enabled": true, "alias": null, "schema": "derived", "database": null, "tags": ["snowplow_web_incremental", "derived"], "meta": {}, "materialized": "snowplow_incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_sessionid", "sort": "start_tstamp", "unique_key": "domain_sessionid", "upsert_date_key": "start_tstamp", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [{"sql": "{{ snowplow_web.stitch_user_identifiers(\n enabled=var('snowplow__session_stitching')\n ) }}", "transaction": true, "index": null}], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_derived", "fqn": ["snowplow_web", "sessions", "snowplow_web_sessions"], "unique_id": "model.snowplow_web.snowplow_web_sessions", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "sessions/snowplow_web_sessions.sql", "original_file_path": "models/sessions/snowplow_web_sessions.sql", "name": "snowplow_web_sessions", "alias": "snowplow_web_sessions", "checksum": {"name": "sha256", "checksum": "f1dda7c9c8d1e76d7d0a5d8e56b607a2a8e3bebcf89d7b1c36276c7c2bfb0020"}, "tags": ["snowplow_web_incremental", "derived"], "refs": [["snowplow_web_sessions_this_run"], ["snowplow_web_base_new_event_limits"], ["snowplow_web_incremental_manifest"], ["snowplow_web_user_mapping"]], "sources": [], "description": "This derived incremental table contains all historic sessions and should be the end point for any analysis or BI tools.", "columns": {"app_id": {"name": "app_id", "description": "Application ID e.g. \u2018angry-birds\u2019 is used to distinguish different applications that are being tracked by the same Snowplow stack, e.g. production versus dev.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "domain_sessionidx": {"name": "domain_sessionidx", "description": "A visit / session index e.g. 3", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "Timestamp for the start of the session, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "Timestamp for the end of the session, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "model_tstamp": {"name": "model_tstamp", "description": "The current timestamp when the model processed this row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_views": {"name": "page_views", "description": "The number of distinct page views within a session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "engaged_time_in_s": {"name": "engaged_time_in_s", "description": "The total time engaged by a user within a session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "absolute_time_in_s": {"name": "absolute_time_in_s", "description": "The time in seconds between the `start_tstamp` and `end_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_title": {"name": "first_page_title", "description": "The title of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_url": {"name": "first_page_url", "description": "The url of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlscheme": {"name": "first_page_urlscheme", "description": "The urlscheme of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlhost": {"name": "first_page_urlhost", "description": "The urlhost of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlpath": {"name": "first_page_urlpath", "description": "The urlpath of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlquery": {"name": "first_page_urlquery", "description": "The urlquery of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlfragment": {"name": "first_page_urlfragment", "description": "The urlfragment of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_title": {"name": "last_page_title", "description": "The title of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_url": {"name": "last_page_url", "description": "The url of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlscheme": {"name": "last_page_urlscheme", "description": "The urlscheme of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlhost": {"name": "last_page_urlhost", "description": "The urlhost of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlpath": {"name": "last_page_urlpath", "description": "The urlpath of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlquery": {"name": "last_page_urlquery", "description": "The urlquery of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlfragment": {"name": "last_page_urlfragment", "description": "The urlfragment of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referrer": {"name": "referrer", "description": "The referrer associated with the first page view of the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_country": {"name": "geo_country", "description": "ISO 3166-1 code for the country the visitor is located in e.g. \u2018GB\u2019, \u2018US\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region": {"name": "geo_region", "description": "ISO-3166-2 code for country region the visitor is in e.g. \u2018I9\u2019, \u2018TX\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_city": {"name": "geo_city", "description": "City the visitor is in e.g. \u2018New York\u2019, \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_zipcode": {"name": "geo_zipcode", "description": "Postcode the visitor is in e.g. \u201894109\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_latitude": {"name": "geo_latitude", "description": "Visitor location latitude e.g. 37.443604", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_longitude": {"name": "geo_longitude", "description": "Visitor location longitude e.g. -122.4124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_timezone": {"name": "geo_timezone", "description": "Visitor timezone name e.g. \u2018Europe/London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_ipaddress": {"name": "user_ipaddress", "description": "User IP address e.g. \u201892.231.54.234\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent": {"name": "useragent", "description": "Raw useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_renderengine": {"name": "br_renderengine", "description": "Browser rendering engine e.g. \u2018GECKO\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_lang": {"name": "br_lang", "description": "Language the browser is set to e.g. \u2018en-GB\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "category": {"name": "category", "description": "Category based on activity if the IP/UA is a spider or robot, BROWSER otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "primary_impact": {"name": "primary_impact", "description": "Whether the spider or robot would affect page impression measurement, ad impression measurement, both or none", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "Type of failed check if the IP/UA is a spider or robot, PASSED_ALL otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spider_or_robot": {"name": "spider_or_robot", "description": "True if the IP address or user agent checked against the list is a spider or robot, false otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_family": {"name": "useragent_family", "description": "Useragent family (browser) name", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_major": {"name": "useragent_major", "description": "Useragent major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_minor": {"name": "useragent_minor", "description": "Useragent minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_patch": {"name": "useragent_patch", "description": "Useragent patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_version": {"name": "useragent_version", "description": "Full version of the useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_family": {"name": "os_family", "description": "Operating system family e.g. \u2018Linux\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_major": {"name": "os_major", "description": "Operation system major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_minor": {"name": "os_minor", "description": "Operation system minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch": {"name": "os_patch", "description": "Operation system patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch_minor": {"name": "os_patch_minor", "description": "Operation system patch minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_version": {"name": "os_version", "description": "Operation system full version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_family": {"name": "device_family", "description": "Device type", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_class": {"name": "device_class", "description": "Class of device e.g. phone", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_class": {"name": "agent_class", "description": "Class of agent e.g. browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name": {"name": "agent_name", "description": "Name of agent e.g. Chrome", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version": {"name": "agent_name_version", "description": "Name and version of agent e.g. Chrome 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version_major": {"name": "agent_name_version_major", "description": "Name and major version of agent e.g. Chrome 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version": {"name": "agent_version", "description": "Version of agent e.g. 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version_major": {"name": "agent_version_major", "description": "Major version of agent e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_brand": {"name": "device_brand", "description": "Brand of device e.g. Google", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_name": {"name": "device_name", "description": "Name of device e.g. Google Nexus 6", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_version": {"name": "device_version", "description": "Version of device e.g. 6.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_class": {"name": "layout_engine_class", "description": "Class of layout engine e.g. Browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name": {"name": "layout_engine_name", "description": "Name of layout engine e.g. Blink", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version": {"name": "layout_engine_name_version", "description": "Name and version of layout engine e.g. Blink 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version_major": {"name": "layout_engine_name_version_major", "description": "Name and major version of layout engine e.g. Blink 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version": {"name": "layout_engine_version", "description": "Version of layout engine e.g. 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version_major": {"name": "layout_engine_version_major", "description": "Major version of layout engine e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_class": {"name": "operating_system_class", "description": "Class of the OS e.g. Mobile", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name": {"name": "operating_system_name", "description": "Name of the OS e.g. Android", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name_version": {"name": "operating_system_name_version", "description": "Name and version of the OS e.g. Android 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_version": {"name": "operating_system_version", "description": "Version of the OS e.g. 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/sessions/sessions.yml", "compiled_path": "target/compiled/snowplow_web/models/sessions/snowplow_web_sessions.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "snowplow_incremental", "bind": false, "schema": "derived", "tags": ["derived"], "unique_key": "domain_sessionid", "upsert_date_key": "start_tstamp", "sort": "start_tstamp", "dist": "domain_sessionid", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": ["{{ snowplow_web.stitch_user_identifiers(\n enabled=var('snowplow__session_stitching')\n ) }}"]}, "created_at": 1652369620.688156, "compiled_sql": "\n\n\nselect * \nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere cast(1 as boolean) --returns false if run doesn't contain new events.", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\""}, "model.snowplow_web.snowplow_web_sessions_lasts": {"raw_sql": "{{ \n config(\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"domain_sessionid\"]),\n sort='domain_sessionid',\n dist='domain_sessionid',\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nselect\n a.domain_sessionid,\n a.page_title as last_page_title,\n\n a.page_url as last_page_url,\n\n a.page_urlscheme as last_page_urlscheme,\n a.page_urlhost as last_page_urlhost,\n a.page_urlpath as last_page_urlpath,\n a.page_urlquery as last_page_urlquery,\n a.page_urlfragment as last_page_urlfragment\n\nfrom {{ ref('snowplow_web_page_views_this_run') }} a\n\ninner join {{ ref('snowplow_web_sessions_aggs') }} b\non a.domain_sessionid = b.domain_sessionid\n-- don't join on timestamp because people can return to a page after previous page view is complete.\nand a.page_view_in_session_index = b.page_views", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run", "model.snowplow_web.snowplow_web_sessions_aggs"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_sessionid", "sort": "domain_sessionid", "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "sessions", "scratch", "snowplow_web_sessions_lasts"], "unique_id": "model.snowplow_web.snowplow_web_sessions_lasts", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "sessions/scratch/snowplow_web_sessions_lasts.sql", "original_file_path": "models/sessions/scratch/snowplow_web_sessions_lasts.sql", "name": "snowplow_web_sessions_lasts", "alias": "snowplow_web_sessions_lasts", "checksum": {"name": "sha256", "checksum": "5f779d652baea463718fee64c50e09f37fc8960234a72d983c5e36e0591bbdf7"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_page_views_this_run"], ["snowplow_web_sessions_aggs"]], "sources": [], "description": "This model identifies the last page view within a given session and returns various dimensions associated with that page view.", "columns": {"domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/sessions/scratch/sessions_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/snowplow_web_sessions_lasts.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "cluster_by": "\n\n \n \n", "sort": "domain_sessionid", "dist": "domain_sessionid", "sql_header": "\n \n"}, "created_at": 1652369620.714612, "compiled_sql": "\n\nselect\n a.domain_sessionid,\n a.page_title as last_page_title,\n\n a.page_url as last_page_url,\n\n a.page_urlscheme as last_page_urlscheme,\n a.page_urlhost as last_page_urlhost,\n a.page_urlpath as last_page_urlpath,\n a.page_urlquery as last_page_urlquery,\n a.page_urlfragment as last_page_urlfragment\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\" a\n\ninner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_aggs\" b\non a.domain_sessionid = b.domain_sessionid\n-- don't join on timestamp because people can return to a page after previous page view is complete.\nand a.page_view_in_session_index = b.page_views", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_lasts\""}, "model.snowplow_web.snowplow_web_sessions_this_run": {"raw_sql": "{{ \n config(\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"domain_userid\"]),\n sort='start_tstamp',\n dist='domain_sessionid',\n tags=[\"this_run\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n\nselect\n -- app id\n a.app_id,\n\n -- session fields\n a.domain_sessionid,\n a.domain_sessionidx,\n\n b.start_tstamp,\n b.end_tstamp,\n {{ dbt_utils.current_timestamp_in_utc() }} as model_tstamp,\n\n -- user fields\n a.user_id,\n a.domain_userid,\n\n {% if var('snowplow__session_stitching') %}\n -- updated with mapping as part of post hook on derived sessions table\n cast(a.domain_userid as {{ snowplow_utils.type_string(255) }}) as stitched_user_id,\n {% else %}\n cast(null as {{ snowplow_utils.type_string(255) }}) as stitched_user_id,\n {% endif %}\n \n a.network_userid,\n\n -- engagement fields\n b.page_views,\n b.engaged_time_in_s,\n {{ snowplow_utils.timestamp_diff('b.start_tstamp', 'b.end_tstamp', 'second') }} as absolute_time_in_s,\n\n -- first page fields\n a.page_title as first_page_title,\n\n a.page_url as first_page_url,\n\n a.page_urlscheme as first_page_urlscheme,\n a.page_urlhost as first_page_urlhost,\n a.page_urlpath as first_page_urlpath,\n a.page_urlquery as first_page_urlquery,\n a.page_urlfragment as first_page_urlfragment,\n\n c.last_page_title,\n\n c.last_page_url,\n\n c.last_page_urlscheme,\n c.last_page_urlhost,\n c.last_page_urlpath,\n c.last_page_urlquery,\n c.last_page_urlfragment,\n\n -- referrer fields\n a.page_referrer as referrer,\n\n a.refr_urlscheme,\n a.refr_urlhost,\n a.refr_urlpath,\n a.refr_urlquery,\n a.refr_urlfragment,\n\n a.refr_medium,\n a.refr_source,\n a.refr_term,\n\n -- marketing fields\n a.mkt_medium,\n a.mkt_source,\n a.mkt_term,\n a.mkt_content,\n a.mkt_campaign,\n a.mkt_clickid,\n a.mkt_network,\n\n -- geo fields\n a.geo_country,\n a.geo_region,\n a.geo_region_name,\n a.geo_city,\n a.geo_zipcode,\n a.geo_latitude,\n a.geo_longitude,\n a.geo_timezone,\n\n -- ip address\n a.user_ipaddress,\n\n -- user agent\n a.useragent,\n\n a.br_renderengine,\n a.br_lang,\n\n a.os_timezone,\n\n -- optional fields, only populated if enabled.\n\n -- iab enrichment fields\n a.category,\n a.primary_impact,\n a.reason,\n a.spider_or_robot,\n\n -- ua parser enrichment fields\n a.useragent_family,\n a.useragent_major,\n a.useragent_minor,\n a.useragent_patch,\n a.useragent_version,\n a.os_family,\n a.os_major,\n a.os_minor,\n a.os_patch,\n a.os_patch_minor,\n a.os_version,\n a.device_family,\n\n -- yauaa enrichment fields\n a.device_class,\n a.agent_class,\n a.agent_name,\n a.agent_name_version,\n a.agent_name_version_major,\n a.agent_version,\n a.agent_version_major,\n a.device_brand,\n a.device_name,\n a.device_version,\n a.layout_engine_class,\n a.layout_engine_name,\n a.layout_engine_name_version,\n a.layout_engine_name_version_major,\n a.layout_engine_version,\n a.layout_engine_version_major,\n a.operating_system_class,\n a.operating_system_name,\n a.operating_system_name_version,\n a.operating_system_version\n\nfrom {{ ref('snowplow_web_sessions_aggs') }} as b\n\ninner join {{ ref('snowplow_web_page_views_this_run') }} as a\non a.domain_sessionid = b.domain_sessionid\nand a.start_tstamp = b.start_tstamp\nand a.page_view_in_session_index = 1\n\ninner join {{ ref('snowplow_web_sessions_lasts') }} c\non b.domain_sessionid = c.domain_sessionid", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag", "macro.dbt_utils.current_timestamp_in_utc", "macro.snowplow_utils.type_string", "macro.snowplow_utils.timestamp_diff"], "nodes": ["model.snowplow_web.snowplow_web_sessions_aggs", "model.snowplow_web.snowplow_web_page_views_this_run", "model.snowplow_web.snowplow_web_sessions_lasts"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_sessionid", "sort": "start_tstamp", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "sessions", "scratch", "snowplow_web_sessions_this_run"], "unique_id": "model.snowplow_web.snowplow_web_sessions_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "sessions/scratch/snowplow_web_sessions_this_run.sql", "original_file_path": "models/sessions/scratch/snowplow_web_sessions_this_run.sql", "name": "snowplow_web_sessions_this_run", "alias": "snowplow_web_sessions_this_run", "checksum": {"name": "sha256", "checksum": "71b56ada57a8292d41dcf8881e78cd8ee35f055453d6722e31c0ce117f8b6d1d"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_web_sessions_aggs"], ["snowplow_web_page_views_this_run"], ["snowplow_web_sessions_lasts"]], "sources": [], "description": "This staging table contains all the sessions for the given run of the Web model. It possess all the same columns as `snowplow_web_sessions`. If building a custom module that requires session level data, this is the table you should reference.", "columns": {"app_id": {"name": "app_id", "description": "Application ID e.g. \u2018angry-birds\u2019 is used to distinguish different applications that are being tracked by the same Snowplow stack, e.g. production versus dev.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "domain_sessionidx": {"name": "domain_sessionidx", "description": "A visit / session index e.g. 3", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "Timestamp for the start of the session, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "Timestamp for the end of the session, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "model_tstamp": {"name": "model_tstamp", "description": "The current timestamp when the model processed this row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_views": {"name": "page_views", "description": "The number of distinct page views within a session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "engaged_time_in_s": {"name": "engaged_time_in_s", "description": "The total time engaged by a user within a session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "absolute_time_in_s": {"name": "absolute_time_in_s", "description": "The time in seconds between the `start_tstamp` and `end_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_title": {"name": "first_page_title", "description": "The title of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_url": {"name": "first_page_url", "description": "The url of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlscheme": {"name": "first_page_urlscheme", "description": "The urlscheme of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlhost": {"name": "first_page_urlhost", "description": "The urlhost of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlpath": {"name": "first_page_urlpath", "description": "The urlpath of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlquery": {"name": "first_page_urlquery", "description": "The urlquery of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlfragment": {"name": "first_page_urlfragment", "description": "The urlfragment of the first page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_title": {"name": "last_page_title", "description": "The title of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_url": {"name": "last_page_url", "description": "The url of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlscheme": {"name": "last_page_urlscheme", "description": "The urlscheme of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlhost": {"name": "last_page_urlhost", "description": "The urlhost of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlpath": {"name": "last_page_urlpath", "description": "The urlpath of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlquery": {"name": "last_page_urlquery", "description": "The urlquery of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlfragment": {"name": "last_page_urlfragment", "description": "The urlfragment of the last page visited within the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referrer": {"name": "referrer", "description": "The referrer associated with the first page view of the session", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_country": {"name": "geo_country", "description": "ISO 3166-1 code for the country the visitor is located in e.g. \u2018GB\u2019, \u2018US\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region": {"name": "geo_region", "description": "ISO-3166-2 code for country region the visitor is in e.g. \u2018I9\u2019, \u2018TX\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_city": {"name": "geo_city", "description": "City the visitor is in e.g. \u2018New York\u2019, \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_zipcode": {"name": "geo_zipcode", "description": "Postcode the visitor is in e.g. \u201894109\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_latitude": {"name": "geo_latitude", "description": "Visitor location latitude e.g. 37.443604", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_longitude": {"name": "geo_longitude", "description": "Visitor location longitude e.g. -122.4124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_timezone": {"name": "geo_timezone", "description": "Visitor timezone name e.g. \u2018Europe/London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_ipaddress": {"name": "user_ipaddress", "description": "User IP address e.g. \u201892.231.54.234\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent": {"name": "useragent", "description": "Raw useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_renderengine": {"name": "br_renderengine", "description": "Browser rendering engine e.g. \u2018GECKO\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_lang": {"name": "br_lang", "description": "Language the browser is set to e.g. \u2018en-GB\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "category": {"name": "category", "description": "Category based on activity if the IP/UA is a spider or robot, BROWSER otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "primary_impact": {"name": "primary_impact", "description": "Whether the spider or robot would affect page impression measurement, ad impression measurement, both or none", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "Type of failed check if the IP/UA is a spider or robot, PASSED_ALL otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spider_or_robot": {"name": "spider_or_robot", "description": "True if the IP address or user agent checked against the list is a spider or robot, false otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_family": {"name": "useragent_family", "description": "Useragent family (browser) name", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_major": {"name": "useragent_major", "description": "Useragent major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_minor": {"name": "useragent_minor", "description": "Useragent minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_patch": {"name": "useragent_patch", "description": "Useragent patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_version": {"name": "useragent_version", "description": "Full version of the useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_family": {"name": "os_family", "description": "Operating system family e.g. \u2018Linux\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_major": {"name": "os_major", "description": "Operation system major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_minor": {"name": "os_minor", "description": "Operation system minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch": {"name": "os_patch", "description": "Operation system patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch_minor": {"name": "os_patch_minor", "description": "Operation system patch minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_version": {"name": "os_version", "description": "Operation system full version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_family": {"name": "device_family", "description": "Device type", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_class": {"name": "device_class", "description": "Class of device e.g. phone", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_class": {"name": "agent_class", "description": "Class of agent e.g. browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name": {"name": "agent_name", "description": "Name of agent e.g. Chrome", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version": {"name": "agent_name_version", "description": "Name and version of agent e.g. Chrome 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version_major": {"name": "agent_name_version_major", "description": "Name and major version of agent e.g. Chrome 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version": {"name": "agent_version", "description": "Version of agent e.g. 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version_major": {"name": "agent_version_major", "description": "Major version of agent e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_brand": {"name": "device_brand", "description": "Brand of device e.g. Google", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_name": {"name": "device_name", "description": "Name of device e.g. Google Nexus 6", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_version": {"name": "device_version", "description": "Version of device e.g. 6.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_class": {"name": "layout_engine_class", "description": "Class of layout engine e.g. Browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name": {"name": "layout_engine_name", "description": "Name of layout engine e.g. Blink", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version": {"name": "layout_engine_name_version", "description": "Name and version of layout engine e.g. Blink 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version_major": {"name": "layout_engine_name_version_major", "description": "Name and major version of layout engine e.g. Blink 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version": {"name": "layout_engine_version", "description": "Version of layout engine e.g. 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version_major": {"name": "layout_engine_version_major", "description": "Major version of layout engine e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_class": {"name": "operating_system_class", "description": "Class of the OS e.g. Mobile", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name": {"name": "operating_system_name", "description": "Name of the OS e.g. Android", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name_version": {"name": "operating_system_name_version", "description": "Name and version of the OS e.g. Android 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_version": {"name": "operating_system_version", "description": "Version of the OS e.g. 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/sessions/scratch/sessions_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/snowplow_web_sessions_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sort": "start_tstamp", "dist": "domain_sessionid", "sql_header": "\n \n"}, "created_at": 1652369620.7134452, "compiled_sql": "\n\n\nselect\n -- app id\n a.app_id,\n\n -- session fields\n a.domain_sessionid,\n a.domain_sessionidx,\n\n b.start_tstamp,\n b.end_tstamp,\n \n \n getdate()\n\n as model_tstamp,\n\n -- user fields\n a.user_id,\n a.domain_userid,\n\n \n -- updated with mapping as part of post hook on derived sessions table\n cast(a.domain_userid as \n varchar( 255 )\n) as stitched_user_id,\n \n \n a.network_userid,\n\n -- engagement fields\n b.page_views,\n b.engaged_time_in_s,\n datediff(\n second,\n b.start_tstamp,\n b.end_tstamp\n ) as absolute_time_in_s,\n\n -- first page fields\n a.page_title as first_page_title,\n\n a.page_url as first_page_url,\n\n a.page_urlscheme as first_page_urlscheme,\n a.page_urlhost as first_page_urlhost,\n a.page_urlpath as first_page_urlpath,\n a.page_urlquery as first_page_urlquery,\n a.page_urlfragment as first_page_urlfragment,\n\n c.last_page_title,\n\n c.last_page_url,\n\n c.last_page_urlscheme,\n c.last_page_urlhost,\n c.last_page_urlpath,\n c.last_page_urlquery,\n c.last_page_urlfragment,\n\n -- referrer fields\n a.page_referrer as referrer,\n\n a.refr_urlscheme,\n a.refr_urlhost,\n a.refr_urlpath,\n a.refr_urlquery,\n a.refr_urlfragment,\n\n a.refr_medium,\n a.refr_source,\n a.refr_term,\n\n -- marketing fields\n a.mkt_medium,\n a.mkt_source,\n a.mkt_term,\n a.mkt_content,\n a.mkt_campaign,\n a.mkt_clickid,\n a.mkt_network,\n\n -- geo fields\n a.geo_country,\n a.geo_region,\n a.geo_region_name,\n a.geo_city,\n a.geo_zipcode,\n a.geo_latitude,\n a.geo_longitude,\n a.geo_timezone,\n\n -- ip address\n a.user_ipaddress,\n\n -- user agent\n a.useragent,\n\n a.br_renderengine,\n a.br_lang,\n\n a.os_timezone,\n\n -- optional fields, only populated if enabled.\n\n -- iab enrichment fields\n a.category,\n a.primary_impact,\n a.reason,\n a.spider_or_robot,\n\n -- ua parser enrichment fields\n a.useragent_family,\n a.useragent_major,\n a.useragent_minor,\n a.useragent_patch,\n a.useragent_version,\n a.os_family,\n a.os_major,\n a.os_minor,\n a.os_patch,\n a.os_patch_minor,\n a.os_version,\n a.device_family,\n\n -- yauaa enrichment fields\n a.device_class,\n a.agent_class,\n a.agent_name,\n a.agent_name_version,\n a.agent_name_version_major,\n a.agent_version,\n a.agent_version_major,\n a.device_brand,\n a.device_name,\n a.device_version,\n a.layout_engine_class,\n a.layout_engine_name,\n a.layout_engine_name_version,\n a.layout_engine_name_version_major,\n a.layout_engine_version,\n a.layout_engine_version_major,\n a.operating_system_class,\n a.operating_system_name,\n a.operating_system_name_version,\n a.operating_system_version\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_aggs\" as b\n\ninner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\" as a\non a.domain_sessionid = b.domain_sessionid\nand a.start_tstamp = b.start_tstamp\nand a.page_view_in_session_index = 1\n\ninner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_lasts\" c\non b.domain_sessionid = c.domain_sessionid", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\""}, "model.snowplow_web.snowplow_web_sessions_aggs": {"raw_sql": "{{ \n config(\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"domain_sessionid\"]),\n sort='domain_sessionid',\n dist='domain_sessionid',\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nselect\n domain_sessionid,\n -- time\n min(start_tstamp) as start_tstamp,\n max(end_tstamp) as end_tstamp,\n\n -- engagement\n count(distinct page_view_id) as page_views,\n sum(engaged_time_in_s) as engaged_time_in_s\n\nfrom {{ ref('snowplow_web_page_views_this_run') }}\n\nwhere domain_sessionid is not null\ngroup by 1", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_sessionid", "sort": "domain_sessionid", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "sessions", "scratch", "snowplow_web_sessions_aggs"], "unique_id": "model.snowplow_web.snowplow_web_sessions_aggs", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "sessions/scratch/snowplow_web_sessions_aggs.sql", "original_file_path": "models/sessions/scratch/snowplow_web_sessions_aggs.sql", "name": "snowplow_web_sessions_aggs", "alias": "snowplow_web_sessions_aggs", "checksum": {"name": "sha256", "checksum": "d1d309c2095f58282fe4f50bf2e79950de62a20549f2ef365a48f94496d2aebb"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "This model aggregates various metrics derived from page views to a session level.", "columns": {"domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/sessions/scratch/sessions_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/snowplow_web_sessions_aggs.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sort": "domain_sessionid", "dist": "domain_sessionid", "sql_header": "\n \n"}, "created_at": 1652369620.714051, "compiled_sql": "\n\nselect\n domain_sessionid,\n -- time\n min(start_tstamp) as start_tstamp,\n max(end_tstamp) as end_tstamp,\n\n -- engagement\n count(distinct page_view_id) as page_views,\n sum(engaged_time_in_s) as engaged_time_in_s\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\n\nwhere domain_sessionid is not null\ngroup by 1", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_aggs\""}, "model.snowplow_web.snowplow_web_users": {"raw_sql": "{{ \n config(\n materialized=var(\"snowplow__incremental_materialization\"),\n unique_key='domain_userid',\n upsert_date_key='start_tstamp',\n disable_upsert_lookback=true,\n sort='start_tstamp',\n dist='domain_userid',\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_web.web_cluster_by_fields_users(),\n tags=[\"derived\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nselect * \nfrom {{ ref('snowplow_web_users_this_run') }}\nwhere {{ snowplow_utils.is_run_with_new_events('snowplow_web') }} --returns false if run doesn't contain new events.", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_web.web_cluster_by_fields_users", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.is_run_with_new_events"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "derived", "database": null, "tags": ["snowplow_web_incremental", "derived"], "meta": {}, "materialized": "snowplow_incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_userid", "sort": "start_tstamp", "unique_key": "domain_userid", "upsert_date_key": "start_tstamp", "disable_upsert_lookback": true, "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_derived", "fqn": ["snowplow_web", "users", "snowplow_web_users"], "unique_id": "model.snowplow_web.snowplow_web_users", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "users/snowplow_web_users.sql", "original_file_path": "models/users/snowplow_web_users.sql", "name": "snowplow_web_users", "alias": "snowplow_web_users", "checksum": {"name": "sha256", "checksum": "c74df6a79e760d3f9981390960d9cc5edb7a5fbd03a7baec35ab1a672d967960"}, "tags": ["snowplow_web_incremental", "derived"], "refs": [["snowplow_web_users_this_run"], ["snowplow_web_base_new_event_limits"], ["snowplow_web_incremental_manifest"]], "sources": [], "description": "This derived incremental table contains all historic users data and should be the end point for any analysis or BI tools.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "Timestamp for the start of the users lifecycle, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "Timestamp for the last time the user was seen, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "model_tstamp": {"name": "model_tstamp", "description": "The current timestamp when the model processed this row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_views": {"name": "page_views", "description": "The total page views by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sessions": {"name": "sessions", "description": "The total sessions by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "engaged_time_in_s": {"name": "engaged_time_in_s", "description": "The total engaged time in seconds by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_title": {"name": "first_page_title", "description": "The title of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_url": {"name": "first_page_url", "description": "The url of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlscheme": {"name": "first_page_urlscheme", "description": "The urlscheme of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlhost": {"name": "first_page_urlhost", "description": "The urlhost of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlpath": {"name": "first_page_urlpath", "description": "The urlpath of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlquery": {"name": "first_page_urlquery", "description": "The urlquery of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlfragment": {"name": "first_page_urlfragment", "description": "The urlfragment of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_title": {"name": "last_page_title", "description": "The title of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_url": {"name": "last_page_url", "description": "The url of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlscheme": {"name": "last_page_urlscheme", "description": "The urlscheme of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlhost": {"name": "last_page_urlhost", "description": "The urlhost of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlpath": {"name": "last_page_urlpath", "description": "The urlpath of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlquery": {"name": "last_page_urlquery", "description": "The urlquery of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlfragment": {"name": "last_page_urlfragment", "description": "The urlfragment of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referrer": {"name": "referrer", "description": "The referrer associated with the first page view of the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/users/users.yml", "compiled_path": "target/compiled/snowplow_web/models/users/snowplow_web_users.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "snowplow_incremental", "bind": false, "schema": "derived", "tags": ["derived"], "unique_key": "domain_userid", "upsert_date_key": "start_tstamp", "disable_upsert_lookback": true, "sort": "start_tstamp", "dist": "domain_userid", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n"}, "created_at": 1652369620.73568, "compiled_sql": "\n\nselect * \nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere cast(1 as boolean) --returns false if run doesn't contain new events.", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\""}, "model.snowplow_web.snowplow_web_users_sessions_this_run": {"raw_sql": "{{ \n config(\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"domain_userid\"]),\n sort='start_tstamp',\n dist='domain_userid',\n tags=[\"this_run\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nwith user_ids_this_run as (\nselect distinct domain_userid from {{ ref('snowplow_web_base_sessions_this_run') }}\n)\n\nselect\n a.*,\n min(a.start_tstamp) over(partition by a.domain_userid) as user_start_tstamp,\n max(a.end_tstamp) over(partition by a.domain_userid) as user_end_tstamp \n\nfrom {{ var('snowplow__sessions_table') }} a\ninner join user_ids_this_run b\non a.domain_userid = b.domain_userid", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag"], "nodes": ["model.snowplow_web.snowplow_web_base_sessions_this_run", "model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_userid", "sort": "start_tstamp", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "users", "scratch", "snowplow_web_users_sessions_this_run"], "unique_id": "model.snowplow_web.snowplow_web_users_sessions_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "users/scratch/snowplow_web_users_sessions_this_run.sql", "original_file_path": "models/users/scratch/snowplow_web_users_sessions_this_run.sql", "name": "snowplow_web_users_sessions_this_run", "alias": "snowplow_web_users_sessions_this_run", "checksum": {"name": "sha256", "checksum": "c2e53bde4a1107a6287de8ded5a400b264a7b172da64cc3765866b61b99fd3c5"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_web_base_sessions_this_run"], ["snowplow_web_sessions"]], "sources": [], "description": "This model contains all sessions data related to users contained in the given run of the Web model", "columns": {"domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/users/scratch/users_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/users/scratch/snowplow_web_users_sessions_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sort": "start_tstamp", "dist": "domain_userid", "sql_header": "\n \n"}, "created_at": 1652369620.752976, "compiled_sql": "\n\nwith user_ids_this_run as (\nselect distinct domain_userid from \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_sessions_this_run\"\n)\n\nselect\n a.*,\n min(a.start_tstamp) over(partition by a.domain_userid) as user_start_tstamp,\n max(a.end_tstamp) over(partition by a.domain_userid) as user_end_tstamp \n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\" a\ninner join user_ids_this_run b\non a.domain_userid = b.domain_userid", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_sessions_this_run\""}, "model.snowplow_web.snowplow_web_users_this_run": {"raw_sql": "{{ \n config(\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"user_id\"]),\n sort='start_tstamp',\n dist='domain_userid',\n tags=[\"this_run\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nselect\n -- user fields\n a.user_id,\n a.domain_userid,\n a.network_userid,\n\n b.start_tstamp,\n b.end_tstamp,\n {{ dbt_utils.current_timestamp_in_utc() }} as model_tstamp,\n\n -- engagement fields\n b.page_views,\n b.sessions,\n\n b.engaged_time_in_s,\n\n -- first page fields\n a.first_page_title,\n\n a.first_page_url,\n\n a.first_page_urlscheme,\n a.first_page_urlhost,\n a.first_page_urlpath,\n a.first_page_urlquery,\n a.first_page_urlfragment,\n\n c.last_page_title,\n\n c.last_page_url,\n\n c.last_page_urlscheme,\n c.last_page_urlhost,\n c.last_page_urlpath,\n c.last_page_urlquery,\n c.last_page_urlfragment,\n\n -- referrer fields\n a.referrer,\n\n a.refr_urlscheme,\n a.refr_urlhost,\n a.refr_urlpath,\n a.refr_urlquery,\n a.refr_urlfragment,\n\n a.refr_medium,\n a.refr_source,\n a.refr_term,\n\n -- marketing fields\n a.mkt_medium,\n a.mkt_source,\n a.mkt_term,\n a.mkt_content,\n a.mkt_campaign,\n a.mkt_clickid,\n a.mkt_network\n\nfrom {{ ref('snowplow_web_users_aggs') }} as b\n\ninner join {{ ref('snowplow_web_users_sessions_this_run') }} as a\non a.domain_sessionid = b.first_domain_sessionid\n\ninner join {{ ref('snowplow_web_users_lasts') }} c\non b.domain_userid = c.domain_userid", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag", "macro.dbt_utils.current_timestamp_in_utc"], "nodes": ["model.snowplow_web.snowplow_web_users_aggs", "model.snowplow_web.snowplow_web_users_sessions_this_run", "model.snowplow_web.snowplow_web_users_lasts"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_userid", "sort": "start_tstamp", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "users", "scratch", "snowplow_web_users_this_run"], "unique_id": "model.snowplow_web.snowplow_web_users_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "users/scratch/snowplow_web_users_this_run.sql", "original_file_path": "models/users/scratch/snowplow_web_users_this_run.sql", "name": "snowplow_web_users_this_run", "alias": "snowplow_web_users_this_run", "checksum": {"name": "sha256", "checksum": "8889c359b3c9a2d2b1a8d38d0dc807c3478f4966ffc0c3c1fd526620e56c9cc6"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_web_users_aggs"], ["snowplow_web_users_sessions_this_run"], ["snowplow_web_users_lasts"]], "sources": [], "description": "This staging table contains all the users for the given run of the Web model. It possess all the same columns as `snowplow_web_users`. If building a custom module that requires session level data, this is the table you should reference.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "Timestamp for the start of the users lifecycle, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "Timestamp for the last time the user was seen, based on `derived_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "model_tstamp": {"name": "model_tstamp", "description": "The current timestamp when the model processed this row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_views": {"name": "page_views", "description": "The total page views by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sessions": {"name": "sessions", "description": "The total sessions by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "engaged_time_in_s": {"name": "engaged_time_in_s", "description": "The total engaged time in seconds by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_title": {"name": "first_page_title", "description": "The title of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_url": {"name": "first_page_url", "description": "The url of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlscheme": {"name": "first_page_urlscheme", "description": "The urlscheme of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlhost": {"name": "first_page_urlhost", "description": "The urlhost of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlpath": {"name": "first_page_urlpath", "description": "The urlpath of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlquery": {"name": "first_page_urlquery", "description": "The urlquery of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_page_urlfragment": {"name": "first_page_urlfragment", "description": "The urlfragment of the first page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_title": {"name": "last_page_title", "description": "The title of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_url": {"name": "last_page_url", "description": "The url of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlscheme": {"name": "last_page_urlscheme", "description": "The urlscheme of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlhost": {"name": "last_page_urlhost", "description": "The urlhost of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlpath": {"name": "last_page_urlpath", "description": "The urlpath of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlquery": {"name": "last_page_urlquery", "description": "The urlquery of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_page_urlfragment": {"name": "last_page_urlfragment", "description": "The urlfragment of the last page visited by the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referrer": {"name": "referrer", "description": "The referrer associated with the first page view of the user", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/users/scratch/users_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/users/scratch/snowplow_web_users_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sort": "start_tstamp", "dist": "domain_userid", "sql_header": "\n \n"}, "created_at": 1652369620.7512178, "compiled_sql": "\n\nselect\n -- user fields\n a.user_id,\n a.domain_userid,\n a.network_userid,\n\n b.start_tstamp,\n b.end_tstamp,\n \n \n getdate()\n\n as model_tstamp,\n\n -- engagement fields\n b.page_views,\n b.sessions,\n\n b.engaged_time_in_s,\n\n -- first page fields\n a.first_page_title,\n\n a.first_page_url,\n\n a.first_page_urlscheme,\n a.first_page_urlhost,\n a.first_page_urlpath,\n a.first_page_urlquery,\n a.first_page_urlfragment,\n\n c.last_page_title,\n\n c.last_page_url,\n\n c.last_page_urlscheme,\n c.last_page_urlhost,\n c.last_page_urlpath,\n c.last_page_urlquery,\n c.last_page_urlfragment,\n\n -- referrer fields\n a.referrer,\n\n a.refr_urlscheme,\n a.refr_urlhost,\n a.refr_urlpath,\n a.refr_urlquery,\n a.refr_urlfragment,\n\n a.refr_medium,\n a.refr_source,\n a.refr_term,\n\n -- marketing fields\n a.mkt_medium,\n a.mkt_source,\n a.mkt_term,\n a.mkt_content,\n a.mkt_campaign,\n a.mkt_clickid,\n a.mkt_network\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_aggs\" as b\n\ninner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_sessions_this_run\" as a\non a.domain_sessionid = b.first_domain_sessionid\n\ninner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_lasts\" c\non b.domain_userid = c.domain_userid", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\""}, "model.snowplow_web.snowplow_web_users_aggs": {"raw_sql": "{{ \n config(\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"domain_userid\"]),\n sort='domain_userid',\n dist='domain_userid',\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nselect\n domain_userid,\n -- time\n user_start_tstamp as start_tstamp,\n user_end_tstamp as end_tstamp,\n -- first/last session. Max to resolve edge case with multiple sessions with the same start/end tstamp\n max(case when start_tstamp = user_start_tstamp then domain_sessionid end) as first_domain_sessionid,\n max(case when end_tstamp = user_end_tstamp then domain_sessionid end) as last_domain_sessionid,\n -- engagement\n sum(page_views) as page_views,\n count(distinct domain_sessionid) as sessions,\n sum(engaged_time_in_s) as engaged_time_in_s\n\nfrom {{ ref('snowplow_web_users_sessions_this_run') }}\n\ngroup by 1,2,3", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag"], "nodes": ["model.snowplow_web.snowplow_web_users_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_userid", "sort": "domain_userid", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "users", "scratch", "snowplow_web_users_aggs"], "unique_id": "model.snowplow_web.snowplow_web_users_aggs", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "users/scratch/snowplow_web_users_aggs.sql", "original_file_path": "models/users/scratch/snowplow_web_users_aggs.sql", "name": "snowplow_web_users_aggs", "alias": "snowplow_web_users_aggs", "checksum": {"name": "sha256", "checksum": "99ed5103b929cc2e51ac12adb057d961efce2b13e9ad30ce8e8bda46a1dbb339"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_users_sessions_this_run"]], "sources": [], "description": "This model aggregates various metrics derived from sessions to a users level.", "columns": {"domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/users/scratch/users_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/users/scratch/snowplow_web_users_aggs.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sort": "domain_userid", "dist": "domain_userid", "sql_header": "\n \n"}, "created_at": 1652369620.751785, "compiled_sql": "\n\nselect\n domain_userid,\n -- time\n user_start_tstamp as start_tstamp,\n user_end_tstamp as end_tstamp,\n -- first/last session. Max to resolve edge case with multiple sessions with the same start/end tstamp\n max(case when start_tstamp = user_start_tstamp then domain_sessionid end) as first_domain_sessionid,\n max(case when end_tstamp = user_end_tstamp then domain_sessionid end) as last_domain_sessionid,\n -- engagement\n sum(page_views) as page_views,\n count(distinct domain_sessionid) as sessions,\n sum(engaged_time_in_s) as engaged_time_in_s\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_sessions_this_run\"\n\ngroup by 1,2,3", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_aggs\""}, "model.snowplow_web.snowplow_web_users_lasts": {"raw_sql": "{{ \n config(\n sort='domain_userid',\n dist='domain_userid',\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n\nselect\n a.domain_userid,\n a.last_page_title,\n\n a.last_page_url,\n\n a.last_page_urlscheme,\n a.last_page_urlhost,\n a.last_page_urlpath,\n a.last_page_urlquery,\n a.last_page_urlfragment\n\nfrom {{ ref('snowplow_web_users_sessions_this_run') }} a\n\ninner join {{ ref('snowplow_web_users_aggs') }} b\non a.domain_sessionid = b.last_domain_sessionid", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.set_query_tag"], "nodes": ["model.snowplow_web.snowplow_web_users_sessions_this_run", "model.snowplow_web.snowplow_web_users_aggs"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "domain_userid", "sort": "domain_userid", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "users", "scratch", "snowplow_web_users_lasts"], "unique_id": "model.snowplow_web.snowplow_web_users_lasts", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "users/scratch/snowplow_web_users_lasts.sql", "original_file_path": "models/users/scratch/snowplow_web_users_lasts.sql", "name": "snowplow_web_users_lasts", "alias": "snowplow_web_users_lasts", "checksum": {"name": "sha256", "checksum": "20d0456d4772dd5d374b5cad950d171a638225966a8a0b09492c957feaca13a7"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_users_sessions_this_run"], ["snowplow_web_users_aggs"]], "sources": [], "description": "This model identifies the last page view for a user and returns various dimensions associated with that page view.", "columns": {"domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/users/scratch/users_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/users/scratch/snowplow_web_users_lasts.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "sort": "domain_userid", "dist": "domain_userid", "sql_header": "\n \n"}, "created_at": 1652369620.752418, "compiled_sql": "\n\n\nselect\n a.domain_userid,\n a.last_page_title,\n\n a.last_page_url,\n\n a.last_page_urlscheme,\n a.last_page_urlhost,\n a.last_page_urlpath,\n a.last_page_urlquery,\n a.last_page_urlfragment\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_sessions_this_run\" a\n\ninner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_aggs\" b\non a.domain_sessionid = b.last_domain_sessionid", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_lasts\""}, "model.snowplow_web.snowplow_web_incremental_manifest": {"raw_sql": "{{ \n config(\n materialized='incremental',\n full_refresh=snowplow_web.allow_refresh(),\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n-- Boilerplate to generate table.\n-- Table updated as part of end-run hook\n\nwith prep as (\n select\n cast(null as {{ snowplow_utils.type_string(4096) }}) model,\n cast('1970-01-01' as {{ dbt_utils.type_timestamp() }}) as last_success\n)\n\nselect *\n\nfrom prep\nwhere false", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_web.allow_refresh", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.type_string", "macro.dbt_utils.type_timestamp"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": "snowplow_manifest", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_snowplow_manifest", "fqn": ["snowplow_web", "base", "manifest", "snowplow_web_incremental_manifest"], "unique_id": "model.snowplow_web.snowplow_web_incremental_manifest", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/manifest/snowplow_web_incremental_manifest.sql", "original_file_path": "models/base/manifest/snowplow_web_incremental_manifest.sql", "name": "snowplow_web_incremental_manifest", "alias": "snowplow_web_incremental_manifest", "checksum": {"name": "sha256", "checksum": "413bda6b5b224045f543b2d98eb701a04574ea35c0e3fd22ec99057af4c36888"}, "tags": [], "refs": [], "sources": [], "description": "This incremental table is a manifest of the timestamp of the latest event consumed per model within the `snowplow-web` package as well as any models leveraging the incremental framework provided by the package. The latest event's timestamp is based off `collector_tstamp`. This table is used to determine what events should be processed in the next run of the model.", "columns": {"model": {"name": "model", "description": "The name of the model.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "last_success": {"name": "last_success", "description": "The latest event consumed by the model, based on `collector_tstamp`", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/base/manifest/base_manifest.yml", "compiled_path": "target/compiled/snowplow_web/models/base/manifest/snowplow_web_incremental_manifest.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "bind": false, "schema": "snowplow_manifest", "full_refresh": null, "sql_header": "\n \n"}, "created_at": 1652369620.79569, "compiled_sql": "\n\n-- Boilerplate to generate table.\n-- Table updated as part of end-run hook\n\nwith prep as (\n select\n cast(null as \n varchar( 4096 )\n) model,\n cast('1970-01-01' as \n timestamp without time zone\n) as last_success\n)\n\nselect *\n\nfrom prep\nwhere false", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_incremental_manifest\""}, "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest": {"raw_sql": "{{ \n config(\n materialized=var(\"snowplow__incremental_materialization\"),\n unique_key='session_id',\n upsert_date_key='start_tstamp',\n sort='start_tstamp',\n dist='session_id',\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_web.web_cluster_by_fields_sessions_lifecycle(),\n full_refresh=snowplow_web.allow_refresh(),\n tags=[\"manifest\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n-- Known edge cases:\n-- 1: Rare case with multiple domain_userid per session.\n\n{% set lower_limit, upper_limit, _ = snowplow_utils.return_base_new_event_limits(ref('snowplow_web_base_new_event_limits')) %}\n{% set session_lookback_limit = snowplow_utils.get_session_lookback_limit(lower_limit) %}\n{% set is_run_with_new_events = snowplow_utils.is_run_with_new_events('snowplow_web') %}\n\nwith new_events_session_ids as (\n select\n e.domain_sessionid as session_id,\n max(e.domain_userid) as domain_userid, -- Edge case 1: Arbitary selection to avoid window function like first_value.\n min(e.collector_tstamp) as start_tstamp,\n max(e.collector_tstamp) as end_tstamp\n\n from {{ var('snowplow__events') }} e\n\n where\n e.domain_sessionid is not null\n and not exists (select 1 from {{ ref('snowplow_web_base_quarantined_sessions') }} as a where a.session_id = e.domain_sessionid) -- don't continue processing v.long sessions\n and e.dvce_sent_tstamp <= {{ snowplow_utils.timestamp_add('day', var(\"snowplow__days_late_allowed\", 3), 'dvce_created_tstamp') }} -- don't process data that's too late\n and e.collector_tstamp >= {{ lower_limit }}\n and e.collector_tstamp <= {{ upper_limit }}\n and {{ snowplow_utils.app_id_filter(var(\"snowplow__app_id\",[])) }}\n and {{ is_run_with_new_events }} --don't reprocess sessions that have already been processed.\n {% if var('snowplow__derived_tstamp_partitioned', true) and target.type == 'bigquery' | as_bool() %} -- BQ only\n and e.derived_tstamp >= {{ lower_limit }}\n and e.derived_tstamp <= {{ upper_limit }}\n {% endif %}\n\n group by 1\n )\n\n{% if snowplow_utils.snowplow_is_incremental() %} \n\n, previous_sessions as (\n select *\n\n from {{ this }}\n\n where start_tstamp >= {{ session_lookback_limit }}\n and {{ is_run_with_new_events }} --don't reprocess sessions that have already been processed.\n)\n\n, session_lifecycle as (\n select\n ns.session_id,\n coalesce(self.domain_userid, ns.domain_userid) as domain_userid, -- Edge case 1: Take previous value to keep domain_userid consistent. Not deterministic but performant\n least(ns.start_tstamp, coalesce(self.start_tstamp, ns.start_tstamp)) as start_tstamp,\n greatest(ns.end_tstamp, coalesce(self.end_tstamp, ns.end_tstamp)) as end_tstamp -- BQ 1 NULL will return null hence coalesce\n \n from new_events_session_ids ns\n left join previous_sessions as self\n on ns.session_id = self.session_id\n\n where\n self.session_id is null -- process all new sessions\n or self.end_tstamp < {{ snowplow_utils.timestamp_add('day', var(\"snowplow__max_session_days\", 3), 'self.start_tstamp') }} --stop updating sessions exceeding 3 days\n )\n\n{% else %}\n\n, session_lifecycle as (\n\n select * from new_events_session_ids\n\n)\n\n{% endif %}\n\nselect\n sl.session_id,\n sl.domain_userid,\n sl.start_tstamp,\n least({{ snowplow_utils.timestamp_add('day', var(\"snowplow__max_session_days\", 3), 'sl.start_tstamp') }}, sl.end_tstamp) as end_tstamp -- limit session length to max_session_days\n\nfrom session_lifecycle sl", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_web.web_cluster_by_fields_sessions_lifecycle", "macro.snowplow_web.allow_refresh", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.return_base_new_event_limits", "macro.snowplow_utils.get_session_lookback_limit", "macro.snowplow_utils.is_run_with_new_events", "macro.snowplow_utils.timestamp_add", "macro.snowplow_utils.app_id_filter", "macro.snowplow_utils.snowplow_is_incremental"], "nodes": ["source.snowplow_web.atomic.events", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest", "model.snowplow_web.snowplow_web_base_quarantined_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "snowplow_manifest", "database": null, "tags": ["manifest"], "meta": {}, "materialized": "snowplow_incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "session_id", "sort": "start_tstamp", "unique_key": "session_id", "upsert_date_key": "start_tstamp", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_snowplow_manifest", "fqn": ["snowplow_web", "base", "manifest", "snowplow_web_base_sessions_lifecycle_manifest"], "unique_id": "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/manifest/snowplow_web_base_sessions_lifecycle_manifest.sql", "original_file_path": "models/base/manifest/snowplow_web_base_sessions_lifecycle_manifest.sql", "name": "snowplow_web_base_sessions_lifecycle_manifest", "alias": "snowplow_web_base_sessions_lifecycle_manifest", "checksum": {"name": "sha256", "checksum": "dc7bbd78c7fa9ef4255eac9f85a8961b50f5b502c5930e143b5970f0cca4a766"}, "tags": ["manifest"], "refs": [["snowplow_web_base_new_event_limits"], ["snowplow_web_base_new_event_limits"], ["snowplow_web_incremental_manifest"], ["snowplow_web_base_quarantined_sessions"]], "sources": [["atomic", "events"]], "description": "This incremental table is a manifest of all sessions that have been processed by the Snowplow dbt web model. For each session, the start and end timestamp is recorded. \n\nBy knowing the lifecycle of a session the model is able to able to determine which sessions and thus events to process for a given timeframe, as well as the complete date range required to reprocess all events of each session.", "columns": {"session_id": {"name": "session_id", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "The `collector_tstamp` when the session began", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "The `collector_tstamp` when the session ended", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/base/manifest/base_manifest.yml", "compiled_path": "target/compiled/snowplow_web/models/base/manifest/snowplow_web_base_sessions_lifecycle_manifest.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "snowplow_incremental", "bind": false, "schema": "snowplow_manifest", "unique_key": "session_id", "upsert_date_key": "start_tstamp", "sort": "start_tstamp", "dist": "session_id", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "full_refresh": null, "tags": ["manifest"], "sql_header": "\n \n"}, "created_at": 1652369620.7949922, "compiled_sql": "\n\n-- Known edge cases:\n-- 1: Rare case with multiple domain_userid per session.\n\n\n\n\n\nwith new_events_session_ids as (\n select\n e.domain_sessionid as session_id,\n max(e.domain_userid) as domain_userid, -- Edge case 1: Arbitary selection to avoid window function like first_value.\n min(e.collector_tstamp) as start_tstamp,\n max(e.collector_tstamp) as end_tstamp\n\n from \"dev1\".\"atomic\".\"events\" e\n\n where\n e.domain_sessionid is not null\n and not exists (select 1 from \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_quarantined_sessions\" as a where a.session_id = e.domain_sessionid) -- don't continue processing v.long sessions\n and e.dvce_sent_tstamp <= \n\n dateadd(\n day,\n 3,\n dvce_created_tstamp\n )\n\n -- don't process data that's too late\n and e.collector_tstamp >= \n cast('2020-01-01 00:00:00' as \n timestamp without time zone\n)\n \n and e.collector_tstamp <= \n cast('2020-01-31 00:00:00' as \n timestamp without time zone\n)\n \n and true\n and cast(1 as boolean) --don't reprocess sessions that have already been processed.\n \n\n group by 1\n )\n\n \n\n, previous_sessions as (\n select *\n\n from \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_sessions_lifecycle_manifest\"\n\n where start_tstamp >= \n cast('2018-01-01 00:00:00' as \n timestamp without time zone\n)\n \n and cast(1 as boolean) --don't reprocess sessions that have already been processed.\n)\n\n, session_lifecycle as (\n select\n ns.session_id,\n coalesce(self.domain_userid, ns.domain_userid) as domain_userid, -- Edge case 1: Take previous value to keep domain_userid consistent. Not deterministic but performant\n least(ns.start_tstamp, coalesce(self.start_tstamp, ns.start_tstamp)) as start_tstamp,\n greatest(ns.end_tstamp, coalesce(self.end_tstamp, ns.end_tstamp)) as end_tstamp -- BQ 1 NULL will return null hence coalesce\n \n from new_events_session_ids ns\n left join previous_sessions as self\n on ns.session_id = self.session_id\n\n where\n self.session_id is null -- process all new sessions\n or self.end_tstamp < \n\n dateadd(\n day,\n 3,\n self.start_tstamp\n )\n\n --stop updating sessions exceeding 3 days\n )\n\n\n\nselect\n sl.session_id,\n sl.domain_userid,\n sl.start_tstamp,\n least(\n\n dateadd(\n day,\n 3,\n sl.start_tstamp\n )\n\n, sl.end_tstamp) as end_tstamp -- limit session length to max_session_days\n\nfrom session_lifecycle sl", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_sessions_lifecycle_manifest\""}, "model.snowplow_web.snowplow_web_base_quarantined_sessions": {"raw_sql": "{{ \n config(\n materialized='incremental',\n full_refresh=snowplow_web.allow_refresh(),\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n/* \nBoilerplate to generate table.\nTable updated as part of post-hook on sessions_this_run\nAny sessions exceeding max_session_days are quarantined\nOnce quarantined, any subsequent events from the session will not be processed.\nThis significantly reduces table scans\n*/\n\nwith prep as (\n select\n cast(null as {{ snowplow_utils.type_string(64) }}) session_id\n)\n\nselect *\n\nfrom prep\nwhere false", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_web.allow_refresh", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.type_string"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": "snowplow_manifest", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_snowplow_manifest", "fqn": ["snowplow_web", "base", "manifest", "snowplow_web_base_quarantined_sessions"], "unique_id": "model.snowplow_web.snowplow_web_base_quarantined_sessions", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/manifest/snowplow_web_base_quarantined_sessions.sql", "original_file_path": "models/base/manifest/snowplow_web_base_quarantined_sessions.sql", "name": "snowplow_web_base_quarantined_sessions", "alias": "snowplow_web_base_quarantined_sessions", "checksum": {"name": "sha256", "checksum": "84ea734ca5d3a3075ee74adc6c57e3faa613f4a3edf05fd1c35d00f7ab3f13ec"}, "tags": [], "refs": [], "sources": [], "description": "This table contains any sessions that have been quarantined. Sessions are quarantined once they exceed the maximum allowed session length, defined by `snowplow__max_session_days`.\nOnce quarantined, no further events from these sessions will be processed. Events up until the point of quarantine remain in your derived tables.\nThe reason for removing long sessions is to reduce table scans on both the events table and all derived tables. This improves performance greatly.", "columns": {"session_id": {"name": "session_id", "description": "The `session_id` of the quarantined session", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/base/manifest/base_manifest.yml", "compiled_path": "target/compiled/snowplow_web/models/base/manifest/snowplow_web_base_quarantined_sessions.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "bind": false, "schema": "snowplow_manifest", "full_refresh": null, "sql_header": "\n \n"}, "created_at": 1652369620.7963169, "compiled_sql": "\n\n/* \nBoilerplate to generate table.\nTable updated as part of post-hook on sessions_this_run\nAny sessions exceeding max_session_days are quarantined\nOnce quarantined, any subsequent events from the session will not be processed.\nThis significantly reduces table scans\n*/\n\nwith prep as (\n select\n cast(null as \n varchar( 64 )\n) session_id\n)\n\nselect *\n\nfrom prep\nwhere false", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_quarantined_sessions\""}, "model.snowplow_web.snowplow_web_base_new_event_limits": {"raw_sql": "{{ config(\n post_hook=[\"{{snowplow_utils.print_run_limits(this)}}\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n )\n}}\n\n\n{%- set models_in_run = snowplow_utils.get_enabled_snowplow_models('snowplow_web') -%}\n\n{% set min_last_success,\n max_last_success, \n models_matched_from_manifest,\n has_matched_all_models = snowplow_utils.get_incremental_manifest_status(ref('snowplow_web_incremental_manifest'),\n models_in_run) -%}\n\n\n{% set run_limits_query = snowplow_utils.get_run_limits(min_last_success, \n max_last_success,\n models_matched_from_manifest,\n has_matched_all_models,\n var(\"snowplow__start_date\",\"2020-01-01\")) -%}\n\n\n{{ run_limits_query }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.get_enabled_snowplow_models", "macro.snowplow_utils.get_incremental_manifest_status", "macro.snowplow_utils.get_run_limits", "macro.snowplow_utils.print_run_limits"], "nodes": ["model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "sql_header": "\n \n", "post-hook": [{"sql": "{{snowplow_utils.print_run_limits(this)}}", "transaction": true, "index": null}], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "base", "scratch", "snowplow_web_base_new_event_limits"], "unique_id": "model.snowplow_web.snowplow_web_base_new_event_limits", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/scratch/snowplow_web_base_new_event_limits.sql", "original_file_path": "models/base/scratch/snowplow_web_base_new_event_limits.sql", "name": "snowplow_web_base_new_event_limits", "alias": "snowplow_web_base_new_event_limits", "checksum": {"name": "sha256", "checksum": "f15819abcd27cacf17386519a8e60cf08b045cd0ea392db594fb348020a8c6dd"}, "tags": ["scratch"], "refs": [["snowplow_web_incremental_manifest"]], "sources": [], "description": "This table contains the lower and upper timestamp limits for the given run of the web model. These limits are used to select new events from the events table.", "columns": {"lower_limit": {"name": "lower_limit", "description": "The lower `collector_tstamp` limit for the run", "meta": {}, "data_type": null, "quote": null, "tags": []}, "upper_limit": {"name": "upper_limit", "description": "The upper `collector_tstamp` limit for the run", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/base/scratch/base_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/base/scratch/snowplow_web_base_new_event_limits.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "sql_header": "\n \n", "post-hook": ["{{snowplow_utils.print_run_limits(this)}}"]}, "created_at": 1652369620.804406, "compiled_sql": "\n select \n \n\n dateadd(\n hour,\n -6,\n \n cast('2020-01-30 23:59:52.819000' as \n timestamp without time zone\n)\n \n )\n\n as lower_limit,\n least(\n\n dateadd(\n day,\n 30,\n \n cast('2020-01-30 23:59:52.819000' as \n timestamp without time zone\n)\n \n )\n\n, \n \n \n getdate()\n\n) as upper_limit\n ", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_new_event_limits\""}, "model.snowplow_web.snowplow_web_base_sessions_this_run": {"raw_sql": "{{ \n config(\n sort='start_tstamp',\n dist='session_id',\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=snowplow_utils.get_cluster_by(bigquery_cols=[\"session_id\"]),\n tags=[\"this_run\"],\n post_hook=[\n \"{{ snowplow_utils.quarantine_sessions('snowplow_web', var('snowplow__max_session_days')) }}\"\n ],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n )\n}}\n\n{%- set lower_limit, \n upper_limit,\n session_start_limit = snowplow_utils.return_base_new_event_limits(ref('snowplow_web_base_new_event_limits')) %}\n\nselect\n s.session_id,\n s.domain_userid,\n s.start_tstamp,\n -- end_tstamp used in next step to limit events. When backfilling, set end_tstamp to upper_limit if end_tstamp > upper_limit. \n -- This ensures we don't accidentally process events after upper_limit\n case when s.end_tstamp > {{ upper_limit }} then {{ upper_limit }} else s.end_tstamp end as end_tstamp \n\nfrom {{ ref('snowplow_web_base_sessions_lifecycle_manifest')}} s\n\nwhere\n-- General window of start_tstamps to limit table scans. Logic complicated by backfills.\n-- To be within the run, session start_tstamp must be >= lower_limit - max_session_days as we limit end_tstamp in manifest to start_tstamp + max_session_days\ns.start_tstamp >= {{ session_start_limit }}\nand s.start_tstamp <= {{ upper_limit }}\n-- Select sessions within window that either; start or finish between lower & upper limit, start and finish outside of lower and upper limits\nand not (s.start_tstamp > {{ upper_limit }} or s.end_tstamp < {{ lower_limit }})", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by", "macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.return_base_new_event_limits", "macro.snowplow_utils.quarantine_sessions"], "nodes": ["model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest", "model.snowplow_web.snowplow_web_base_quarantined_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "session_id", "sort": "start_tstamp", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": [{"sql": "{{ snowplow_utils.quarantine_sessions('snowplow_web', var('snowplow__max_session_days')) }}", "transaction": true, "index": null}], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "base", "scratch", "snowplow_web_base_sessions_this_run"], "unique_id": "model.snowplow_web.snowplow_web_base_sessions_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/scratch/snowplow_web_base_sessions_this_run.sql", "original_file_path": "models/base/scratch/snowplow_web_base_sessions_this_run.sql", "name": "snowplow_web_base_sessions_this_run", "alias": "snowplow_web_base_sessions_this_run", "checksum": {"name": "sha256", "checksum": "8475f9223f426959fcfd0695213bb7a94e4167571fad9774d27914066742c0d8"}, "tags": ["scratch", "this_run"], "refs": [["snowplow_web_base_new_event_limits"], ["snowplow_web_base_sessions_lifecycle_manifest"], ["snowplow_web_base_quarantined_sessions"]], "sources": [], "description": "For any given run, this table contains all the required sessions.", "columns": {"session_id": {"name": "session_id", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_tstamp": {"name": "start_tstamp", "description": "The `collector_tstamp` when the session began", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_tstamp": {"name": "end_tstamp", "description": "The `collector_tstamp` when the session ended", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/base/scratch/base_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/base/scratch/snowplow_web_base_sessions_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "sort": "start_tstamp", "dist": "session_id", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": "\n\n \n \n", "sql_header": "\n \n", "post-hook": ["{{ snowplow_utils.quarantine_sessions('snowplow_web', var('snowplow__max_session_days')) }}"]}, "created_at": 1652369620.805405, "compiled_sql": "\n\nselect\n s.session_id,\n s.domain_userid,\n s.start_tstamp,\n -- end_tstamp used in next step to limit events. When backfilling, set end_tstamp to upper_limit if end_tstamp > upper_limit. \n -- This ensures we don't accidentally process events after upper_limit\n case when s.end_tstamp > \n cast('2020-01-31 00:00:00' as \n timestamp without time zone\n)\n then \n cast('2020-01-31 00:00:00' as \n timestamp without time zone\n)\n else s.end_tstamp end as end_tstamp \n\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_sessions_lifecycle_manifest\" s\n\nwhere\n-- General window of start_tstamps to limit table scans. Logic complicated by backfills.\n-- To be within the run, session start_tstamp must be >= lower_limit - max_session_days as we limit end_tstamp in manifest to start_tstamp + max_session_days\ns.start_tstamp >= \n cast('2019-12-29 00:00:00' as \n timestamp without time zone\n)\n \nand s.start_tstamp <= \n cast('2020-01-31 00:00:00' as \n timestamp without time zone\n)\n \n-- Select sessions within window that either; start or finish between lower & upper limit, start and finish outside of lower and upper limits\nand not (s.start_tstamp > \n cast('2020-01-31 00:00:00' as \n timestamp without time zone\n)\n or s.end_tstamp < \n cast('2020-01-01 00:00:00' as \n timestamp without time zone\n)\n )", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_sessions_this_run\""}, "model.snowplow_web.snowplow_web_base_events_this_run": {"raw_sql": "{{ \n config(\n sort='collector_tstamp',\n dist='event_id',\n tags=[\"this_run\"]\n ) \n}}\n\n{%- set lower_limit, upper_limit = snowplow_utils.return_limits_from_model(ref('snowplow_web_base_sessions_this_run'),\n 'start_tstamp',\n 'end_tstamp') %}\n\n/* Dedupe logic: Per dupe event_id keep earliest row ordered by collector_tstamp.\n If multiple earliest rows, i.e. matching collector_tstamp, remove entirely. */\n\nwith events_this_run AS (\n select\n a.app_id,\n a.platform,\n a.etl_tstamp,\n a.collector_tstamp,\n a.dvce_created_tstamp,\n a.event,\n a.event_id,\n a.txn_id,\n a.name_tracker,\n a.v_tracker,\n a.v_collector,\n a.v_etl,\n a.user_id,\n a.user_ipaddress,\n a.user_fingerprint,\n b.domain_userid, -- take domain_userid from manifest. This ensures only 1 domain_userid per session.\n a.domain_sessionidx,\n a.network_userid,\n a.geo_country,\n a.geo_region,\n a.geo_city,\n a.geo_zipcode,\n a.geo_latitude,\n a.geo_longitude,\n a.geo_region_name,\n a.ip_isp,\n a.ip_organization,\n a.ip_domain,\n a.ip_netspeed,\n a.page_url,\n a.page_title,\n a.page_referrer,\n a.page_urlscheme,\n a.page_urlhost,\n a.page_urlport,\n a.page_urlpath,\n a.page_urlquery,\n a.page_urlfragment,\n a.refr_urlscheme,\n a.refr_urlhost,\n a.refr_urlport,\n a.refr_urlpath,\n a.refr_urlquery,\n a.refr_urlfragment,\n a.refr_medium,\n a.refr_source,\n a.refr_term,\n a.mkt_medium,\n a.mkt_source,\n a.mkt_term,\n a.mkt_content,\n a.mkt_campaign,\n a.se_category,\n a.se_action,\n a.se_label,\n a.se_property,\n a.se_value,\n a.tr_orderid,\n a.tr_affiliation,\n a.tr_total,\n a.tr_tax,\n a.tr_shipping,\n a.tr_city,\n a.tr_state,\n a.tr_country,\n a.ti_orderid,\n a.ti_sku,\n a.ti_name,\n a.ti_category,\n a.ti_price,\n a.ti_quantity,\n a.pp_xoffset_min,\n a.pp_xoffset_max,\n a.pp_yoffset_min,\n a.pp_yoffset_max,\n a.useragent,\n a.br_name,\n a.br_family,\n a.br_version,\n a.br_type,\n a.br_renderengine,\n a.br_lang,\n a.br_features_pdf,\n a.br_features_flash,\n a.br_features_java,\n a.br_features_director,\n a.br_features_quicktime,\n a.br_features_realplayer,\n a.br_features_windowsmedia,\n a.br_features_gears,\n a.br_features_silverlight,\n a.br_cookies,\n a.br_colordepth,\n a.br_viewwidth,\n a.br_viewheight,\n a.os_name,\n a.os_family,\n a.os_manufacturer,\n a.os_timezone,\n a.dvce_type,\n a.dvce_ismobile,\n a.dvce_screenwidth,\n a.dvce_screenheight,\n a.doc_charset,\n a.doc_width,\n a.doc_height,\n a.tr_currency,\n a.tr_total_base,\n a.tr_tax_base,\n a.tr_shipping_base,\n a.ti_currency,\n a.ti_price_base,\n a.base_currency,\n a.geo_timezone,\n a.mkt_clickid,\n a.mkt_network,\n a.etl_tags,\n a.dvce_sent_tstamp,\n a.refr_domain_userid,\n a.refr_dvce_tstamp,\n a.domain_sessionid,\n a.derived_tstamp,\n a.event_vendor,\n a.event_name,\n a.event_format,\n a.event_version,\n a.event_fingerprint,\n a.true_tstamp,\n dense_rank() over (partition by a.event_id order by a.collector_tstamp) as event_id_dedupe_index --dense_rank so rows with equal tstamps assigned same number\n\n from {{ var('snowplow__events') }} as a\n inner join {{ ref('snowplow_web_base_sessions_this_run') }} as b\n on a.domain_sessionid = b.session_id\n\n where a.collector_tstamp <= {{ snowplow_utils.timestamp_add('day', var(\"snowplow__max_session_days\", 3), 'b.start_tstamp') }}\n and a.dvce_sent_tstamp <= {{ snowplow_utils.timestamp_add('day', var(\"snowplow__days_late_allowed\", 3), 'a.dvce_created_tstamp') }}\n and a.collector_tstamp >= {{ lower_limit }}\n and a.collector_tstamp <= {{ upper_limit }}\n and {{ snowplow_utils.app_id_filter(var(\"snowplow__app_id\",[])) }}\n)\n\n, events_dedupe as (\n select\n *,\n count(*) over(partition by e.event_id) as row_count\n\n from events_this_run e\n \n where \n e.event_id_dedupe_index = 1 -- Keep row(s) with earliest collector_tstamp per dupe event\n)\n\n, cleaned_events as (\n select *\n from events_dedupe\n where row_count = 1 -- Only keep dupes with single row per earliest collector_tstamp\n)\n\n, page_context as (\n select\n root_id,\n root_tstamp,\n id as page_view_id\n\n from {{ var('snowplow__page_view_context') }}\n where \n root_tstamp >= {{ lower_limit }}\n and root_tstamp <= {{ upper_limit }}\n)\n\nselect\n ce.*,\n pc.page_view_id\n\nfrom cleaned_events as ce\nleft join page_context as pc\non ce.event_id = pc.root_id\nand ce.collector_tstamp = pc.root_tstamp", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.return_limits_from_model", "macro.snowplow_utils.timestamp_add", "macro.snowplow_utils.app_id_filter"], "nodes": ["source.snowplow_web.atomic.events", "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1", "model.snowplow_web.snowplow_web_base_sessions_this_run", "model.snowplow_web.snowplow_web_base_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "scratch", "database": null, "tags": ["scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "event_id", "sort": "collector_tstamp", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "base", "scratch", "default", "snowplow_web_base_events_this_run"], "unique_id": "model.snowplow_web.snowplow_web_base_events_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/scratch/default/snowplow_web_base_events_this_run.sql", "original_file_path": "models/base/scratch/default/snowplow_web_base_events_this_run.sql", "name": "snowplow_web_base_events_this_run", "alias": "snowplow_web_base_events_this_run", "checksum": {"name": "sha256", "checksum": "f49cc43d5d33cc549027517bb2f10d29a99233ce2481af2a11c0d6cb64e5be34"}, "tags": ["scratch", "this_run"], "refs": [["snowplow_web_base_sessions_this_run"], ["snowplow_web_base_sessions_this_run"]], "sources": [["atomic", "events"], ["atomic", "com_snowplowanalytics_snowplow_web_page_1"]], "description": "For any given run, this table contains all required events to be consumed by subsequent nodes in the Snowplow dbt web package. This is a cleaned, deduped dataset, containing all columns from the raw events table as well as having the `page_view_id` joined in from the page view context. \n\n**Note: This table should be used as the input to any custom modules that require event level data, rather than selecting straight from `atomic.events`**", "columns": {"app_id": {"name": "app_id", "description": "Application ID e.g. \u2018angry-birds\u2019 is used to distinguish different applications that are being tracked by the same Snowplow stack, e.g. production versus dev.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "platform": {"name": "platform", "description": "Platform e.g. \u2018web\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "etl_tstamp": {"name": "etl_tstamp", "description": "Timestamp event began ETL e.g. \u20182017-01-26 00:01:25.292\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "collector_tstamp": {"name": "collector_tstamp", "description": "Time stamp for the event recorded by the collector e.g. `2013-11-26 00:02:05`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_created_tstamp": {"name": "dvce_created_tstamp", "description": "Timestamp event was recorded on the client device e.g. \u20182013-11-26 00:03:57.885\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event": {"name": "event", "description": "The type of event recorded e.g. \u2018page_view\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "A UUID for each event e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": ["primary-key"]}, "txn_id": {"name": "txn_id", "description": "Transaction ID set client-side, used to de-dupe records e.g. 421828", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name_tracker": {"name": "name_tracker", "description": "Tracker namespace e.g. \u2018sp1\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "v_tracker": {"name": "v_tracker", "description": "Tracker version e.g. \u2018js-3.0.0\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "v_collector": {"name": "v_collector", "description": "Collector version e.g. \u2018ssc-2.1.0-kinesis\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "v_etl": {"name": "v_etl", "description": "ETL version e.g. \u2018snowplow-micro-1.1.0-common-1.4.2\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_ipaddress": {"name": "user_ipaddress", "description": "User IP address e.g. \u201892.231.54.234\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_fingerprint": {"name": "user_fingerprint", "description": "A user fingerprint generated by looking at the individual browser features e.g. 2161814971", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionidx": {"name": "domain_sessionidx", "description": "A visit / session index e.g. 3", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_country": {"name": "geo_country", "description": "ISO 3166-1 code for the country the visitor is located in e.g. \u2018GB\u2019, \u2018US\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region": {"name": "geo_region", "description": "ISO-3166-2 code for country region the visitor is in e.g. \u2018I9\u2019, \u2018TX\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_city": {"name": "geo_city", "description": "City the visitor is in e.g. \u2018New York\u2019, \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_zipcode": {"name": "geo_zipcode", "description": "Postcode the visitor is in e.g. \u201894109\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_latitude": {"name": "geo_latitude", "description": "Visitor location latitude e.g. 37.443604", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_longitude": {"name": "geo_longitude", "description": "Visitor location longitude e.g. -122.4124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_isp": {"name": "ip_isp", "description": "Visitor\u2019s ISP e.g. \u2018FDN Communications\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_organization": {"name": "ip_organization", "description": "Organization associated with the visitor\u2019s IP address \u2013 defaults to ISP name if none is found e.g. \u2018Bouygues Telecom\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_domain": {"name": "ip_domain", "description": "Second level domain name associated with the visitor\u2019s IP address e.g. \u2018nuvox.net\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_netspeed": {"name": "ip_netspeed", "description": "Visitor\u2019s connection type e.g. \u2018Cable/DSL\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_title": {"name": "page_title", "description": "Web page title e.g. \u2018Snowplow Docs \u2013 Understanding the structure of Snowplow data\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlscheme": {"name": "page_urlscheme", "description": "Scheme aka protocol e.g. \u2018https\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlhost": {"name": "page_urlhost", "description": "Host aka domain e.g. \u2018\u201cwww.snowplowanalytics.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlport": {"name": "page_urlport", "description": "Port if specified, 80 if not 80", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlpath": {"name": "page_urlpath", "description": "Path to page e.g. \u2018/product/index.html\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlquery": {"name": "page_urlquery", "description": "Querystring e.g. \u2018id=GTM-DLRG\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlfragment": {"name": "page_urlfragment", "description": "Fragment aka anchor e.g. \u20184-conclusion\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlport": {"name": "refr_urlport", "description": "Referer port e.g. 80", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_category": {"name": "se_category", "description": "Category of event e.g. \u2018ecomm\u2019, \u2018video\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_action": {"name": "se_action", "description": "Action performed / event name e.g. \u2018add-to-basket\u2019, \u2018play-video\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_label": {"name": "se_label", "description": "The object of the action e.g. the ID of the video played or SKU of the product added-to-basket e.g. \u2018pbz00123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_property": {"name": "se_property", "description": "A property associated with the object of the action e.g. \u2018HD\u2019, \u2018large\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_value": {"name": "se_value", "description": "A value associated with the event / action e.g. the value of goods added-to-basket e.g. 9.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_orderid": {"name": "tr_orderid", "description": "Order ID e.g. \u2018#134\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_affiliation": {"name": "tr_affiliation", "description": "Transaction affiliation (e.g. store where sale took place) e.g. \u2018web\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_total": {"name": "tr_total", "description": "Total transaction value e.g. 12.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_tax": {"name": "tr_tax", "description": "Total tax included in transaction value e.g. 3.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_shipping": {"name": "tr_shipping", "description": "Delivery cost charged e.g. 0.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_city": {"name": "tr_city", "description": "Delivery address, city e.g. \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_state": {"name": "tr_state", "description": "Delivery address, state e.g. \u2018Washington\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_country": {"name": "tr_country", "description": "Delivery address, country e.g. \u2018France\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_orderid": {"name": "ti_orderid", "description": "Order ID e.g. \u2018#134\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_sku": {"name": "ti_sku", "description": "Product SKU e.g. \u2018pbz00123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_name": {"name": "ti_name", "description": "Product name e.g. \u2018Cone pendulum\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_category": {"name": "ti_category", "description": "Product category e.g. \u2018New Age\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_price": {"name": "ti_price", "description": "Product unit price e.g. 9.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_quantity": {"name": "ti_quantity", "description": "Number of product in transaction e.g. 2", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_xoffset_min": {"name": "pp_xoffset_min", "description": "Minimum page x offset seen in the last ping period e.g. 0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_xoffset_max": {"name": "pp_xoffset_max", "description": "Maximum page x offset seen in the last ping period e.g. 100", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_yoffset_min": {"name": "pp_yoffset_min", "description": "Minimum page y offset seen in the last ping period e.g. 0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_yoffset_max": {"name": "pp_yoffset_max", "description": "Maximum page y offset seen in the last ping period e.g. 200", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent": {"name": "useragent", "description": "Raw useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_name": {"name": "br_name", "description": "Browser name e.g. `Firefox 12`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_family": {"name": "br_family", "description": "Browser family e.g. \u2018Firefox\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_version": {"name": "br_version", "description": "Browser version e.g. \u201812.0\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_type": {"name": "br_type", "description": "Browser type e.g. \u2018Browser\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_renderengine": {"name": "br_renderengine", "description": "Browser rendering engine e.g. \u2018GECKO\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_lang": {"name": "br_lang", "description": "Language the browser is set to e.g. \u2018en-GB\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_pdf": {"name": "br_features_pdf", "description": "Whether the browser recognizes PDFs e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_flash": {"name": "br_features_flash", "description": "Whether Flash is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_java": {"name": "br_features_java", "description": "Whether Java is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_director": {"name": "br_features_director", "description": "Whether Adobe Shockwave is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_quicktime": {"name": "br_features_quicktime", "description": "Whether QuickTime is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_realplayer": {"name": "br_features_realplayer", "description": "Whether RealPlayer is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_windowsmedia": {"name": "br_features_windowsmedia", "description": "Whether mplayer2 is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_gears": {"name": "br_features_gears", "description": "Whether Google Gears is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_silverlight": {"name": "br_features_silverlight", "description": "Whether Microsoft Silverlight is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_cookies": {"name": "br_cookies", "description": "Whether cookies are enabled e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_colordepth": {"name": "br_colordepth", "description": "Bit depth of the browser color palette e.g. 24", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewwidth": {"name": "br_viewwidth", "description": "Viewport width e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewheight": {"name": "br_viewheight", "description": "Viewport height e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_name": {"name": "os_name", "description": "Name of operating system e.g. `Android`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_family": {"name": "os_family", "description": "Operating system family e.g. \u2018Linux\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_manufacturer": {"name": "os_manufacturer", "description": "Company responsible for OS e.g. \u2018Apple\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_type": {"name": "dvce_type", "description": "Type of device e.g. `Computer`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_ismobile": {"name": "dvce_ismobile", "description": "Is the device mobile? e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_screenwidth": {"name": "dvce_screenwidth", "description": "Screen width in pixels e.g. 1900", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_screenheight": {"name": "dvce_screenheight", "description": "Screen height in pixels e.g. 1024", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_charset": {"name": "doc_charset", "description": "The page\u2019s character encoding e.g. , \u2018UTF-8\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_width": {"name": "doc_width", "description": "The page\u2019s width in pixels e.g. 1024", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_height": {"name": "doc_height", "description": "The page\u2019s height in pixels e.g. 3000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_currency": {"name": "tr_currency", "description": "Currency e.g. \u2018USD\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_total_base": {"name": "tr_total_base", "description": "Total in base currency e.g. 12.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_tax_base": {"name": "tr_tax_base", "description": "Total tax in base currency e.g. 3.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_shipping_base": {"name": "tr_shipping_base", "description": "decimal Delivery cost in base currency e.g. 0.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_currency": {"name": "ti_currency", "description": "Currency e.g. \u2018EUR\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_price_base": {"name": "ti_price_base", "description": "decimal Price in base currency e.g. 9.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "base_currency": {"name": "base_currency", "description": "Reporting currency e.g. \u2018GBP\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_timezone": {"name": "geo_timezone", "description": "Visitor timezone name e.g. \u2018Europe/London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "etl_tags": {"name": "etl_tags", "description": "JSON of tags for this ETL run e.g. \u201c[\u2018prod\u2019]\u201d", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_sent_tstamp": {"name": "dvce_sent_tstamp", "description": "When the event was sent by the client device e.g. \u20182013-11-26 00:03:58.032\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_domain_userid": {"name": "refr_domain_userid", "description": "The Snowplow domain_userid of the referring website e.g. \u2018bc2e92ec6c204a14\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_dvce_tstamp": {"name": "refr_dvce_tstamp", "description": "The time of attaching the domain_userid to the inbound link e.g. \u20182013-11-26 00:02:05\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "derived_tstamp": {"name": "derived_tstamp", "description": "Timestamp making allowance for inaccurate device clock e.g. `2013-11-26 00:02:04`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_vendor": {"name": "event_vendor", "description": "Who defined the event e.g. \u2018com.acme\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_name": {"name": "event_name", "description": "Event name e.g. \u2018link_click\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_format": {"name": "event_format", "description": "Format for event e.g. \u2018jsonschema\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_version": {"name": "event_version", "description": "Version of event schema e.g. \u20181-0-2\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_fingerprint": {"name": "event_fingerprint", "description": "Hash client-set event fields e.g. AADCE520E20C2899F4CED228A79A3083", "meta": {}, "data_type": null, "quote": null, "tags": []}, "true_tstamp": {"name": "true_tstamp", "description": "User-set \u201ctrue timestamp\u201d for the event e.g. \u20182013-11-26 00:02:04\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_view_id": {"name": "page_view_id", "description": "", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/base/scratch/base_scratch.yml", "compiled_path": "target/compiled/snowplow_web/models/base/scratch/default/snowplow_web_base_events_this_run.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "enabled": "{{ target.type in ['redshift', 'postgres'] | as_bool() }}", "sort": "collector_tstamp", "dist": "event_id"}, "created_at": 1652369620.824828, "compiled_sql": "\n\n/* Dedupe logic: Per dupe event_id keep earliest row ordered by collector_tstamp.\n If multiple earliest rows, i.e. matching collector_tstamp, remove entirely. */\n\nwith events_this_run AS (\n select\n a.app_id,\n a.platform,\n a.etl_tstamp,\n a.collector_tstamp,\n a.dvce_created_tstamp,\n a.event,\n a.event_id,\n a.txn_id,\n a.name_tracker,\n a.v_tracker,\n a.v_collector,\n a.v_etl,\n a.user_id,\n a.user_ipaddress,\n a.user_fingerprint,\n b.domain_userid, -- take domain_userid from manifest. This ensures only 1 domain_userid per session.\n a.domain_sessionidx,\n a.network_userid,\n a.geo_country,\n a.geo_region,\n a.geo_city,\n a.geo_zipcode,\n a.geo_latitude,\n a.geo_longitude,\n a.geo_region_name,\n a.ip_isp,\n a.ip_organization,\n a.ip_domain,\n a.ip_netspeed,\n a.page_url,\n a.page_title,\n a.page_referrer,\n a.page_urlscheme,\n a.page_urlhost,\n a.page_urlport,\n a.page_urlpath,\n a.page_urlquery,\n a.page_urlfragment,\n a.refr_urlscheme,\n a.refr_urlhost,\n a.refr_urlport,\n a.refr_urlpath,\n a.refr_urlquery,\n a.refr_urlfragment,\n a.refr_medium,\n a.refr_source,\n a.refr_term,\n a.mkt_medium,\n a.mkt_source,\n a.mkt_term,\n a.mkt_content,\n a.mkt_campaign,\n a.se_category,\n a.se_action,\n a.se_label,\n a.se_property,\n a.se_value,\n a.tr_orderid,\n a.tr_affiliation,\n a.tr_total,\n a.tr_tax,\n a.tr_shipping,\n a.tr_city,\n a.tr_state,\n a.tr_country,\n a.ti_orderid,\n a.ti_sku,\n a.ti_name,\n a.ti_category,\n a.ti_price,\n a.ti_quantity,\n a.pp_xoffset_min,\n a.pp_xoffset_max,\n a.pp_yoffset_min,\n a.pp_yoffset_max,\n a.useragent,\n a.br_name,\n a.br_family,\n a.br_version,\n a.br_type,\n a.br_renderengine,\n a.br_lang,\n a.br_features_pdf,\n a.br_features_flash,\n a.br_features_java,\n a.br_features_director,\n a.br_features_quicktime,\n a.br_features_realplayer,\n a.br_features_windowsmedia,\n a.br_features_gears,\n a.br_features_silverlight,\n a.br_cookies,\n a.br_colordepth,\n a.br_viewwidth,\n a.br_viewheight,\n a.os_name,\n a.os_family,\n a.os_manufacturer,\n a.os_timezone,\n a.dvce_type,\n a.dvce_ismobile,\n a.dvce_screenwidth,\n a.dvce_screenheight,\n a.doc_charset,\n a.doc_width,\n a.doc_height,\n a.tr_currency,\n a.tr_total_base,\n a.tr_tax_base,\n a.tr_shipping_base,\n a.ti_currency,\n a.ti_price_base,\n a.base_currency,\n a.geo_timezone,\n a.mkt_clickid,\n a.mkt_network,\n a.etl_tags,\n a.dvce_sent_tstamp,\n a.refr_domain_userid,\n a.refr_dvce_tstamp,\n a.domain_sessionid,\n a.derived_tstamp,\n a.event_vendor,\n a.event_name,\n a.event_format,\n a.event_version,\n a.event_fingerprint,\n a.true_tstamp,\n dense_rank() over (partition by a.event_id order by a.collector_tstamp) as event_id_dedupe_index --dense_rank so rows with equal tstamps assigned same number\n\n from \"dev1\".\"atomic\".\"events\" as a\n inner join \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_sessions_this_run\" as b\n on a.domain_sessionid = b.session_id\n\n where a.collector_tstamp <= \n\n dateadd(\n day,\n 3,\n b.start_tstamp\n )\n\n\n and a.dvce_sent_tstamp <= \n\n dateadd(\n day,\n 3,\n a.dvce_created_tstamp\n )\n\n\n and a.collector_tstamp >= \n cast('2020-01-01 17:57:05.748000' as \n timestamp without time zone\n)\n \n and a.collector_tstamp <= \n cast('2020-01-30 23:59:52.819000' as \n timestamp without time zone\n)\n \n and true\n)\n\n, events_dedupe as (\n select\n *,\n count(*) over(partition by e.event_id) as row_count\n\n from events_this_run e\n \n where \n e.event_id_dedupe_index = 1 -- Keep row(s) with earliest collector_tstamp per dupe event\n)\n\n, cleaned_events as (\n select *\n from events_dedupe\n where row_count = 1 -- Only keep dupes with single row per earliest collector_tstamp\n)\n\n, page_context as (\n select\n root_id,\n root_tstamp,\n id as page_view_id\n\n from \"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_web_page_1\"\n where \n root_tstamp >= \n cast('2020-01-01 17:57:05.748000' as \n timestamp without time zone\n)\n \n and root_tstamp <= \n cast('2020-01-30 23:59:52.819000' as \n timestamp without time zone\n)\n \n)\n\nselect\n ce.*,\n pc.page_view_id\n\nfrom cleaned_events as ce\nleft join page_context as pc\non ce.event_id = pc.root_id\nand ce.collector_tstamp = pc.root_tstamp", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\""}, "test.snowplow_web.snowplow_tests_page_view_in_session_values": {"raw_sql": "with prep as (\n select \n domain_sessionid, \n count(distinct page_views_in_session) as dist_pvis_values,\n count(*) - count(distinct page_view_in_session_index) as all_minus_dist_pvisi,\n count(*) - count(distinct page_view_id) as all_minus_dist_pvids \n\n from {{ ref('snowplow_web_page_views') }}\n group by 1\n)\n\nselect\n domain_sessionid\n\nfrom prep\n\nwhere dist_pvis_values != 1\nor all_minus_dist_pvisi != 0\nor all_minus_dist_pvids != 0", "compiled": true, "resource_type": "test", "depends_on": {"macros": [], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "snowplow_tests_page_view_in_session_values"], "unique_id": "test.snowplow_web.snowplow_tests_page_view_in_session_values", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/snowplow_tests_page_view_in_session_values.sql", "original_file_path": "tests/page_views/snowplow_tests_page_view_in_session_values.sql", "name": "snowplow_tests_page_view_in_session_values", "alias": "snowplow_tests_page_view_in_session_values", "checksum": {"name": "sha256", "checksum": "e4afb8566741fe06488dbc613c0541ef62975a31d1c43035ff2a240fbfacc5e8"}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/tests/page_views/snowplow_tests_page_view_in_session_values.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.405121, "compiled_sql": "with prep as (\n select \n domain_sessionid, \n count(distinct page_views_in_session) as dist_pvis_values,\n count(*) - count(distinct page_view_in_session_index) as all_minus_dist_pvisi,\n count(*) - count(distinct page_view_id) as all_minus_dist_pvids \n\n from \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\n group by 1\n)\n\nselect\n domain_sessionid\n\nfrom prep\n\nwhere dist_pvis_values != 1\nor all_minus_dist_pvisi != 0\nor all_minus_dist_pvids != 0", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "operation.snowplow_web.snowplow_web-on-run-start-0": {"raw_sql": "{{ snowplow_utils.snowplow_web_delete_from_manifest(var('models_to_remove',[])) }}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.snowplow_utils.snowplow_web_delete_from_manifest"], "nodes": ["model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes", "fqn": ["snowplow_web", "hooks", "snowplow_web-on-run-start-0"], "unique_id": "operation.snowplow_web.snowplow_web-on-run-start-0", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "hooks/snowplow_web-on-run-start-0.sql", "original_file_path": "./dbt_project.yml", "name": "snowplow_web-on-run-start-0", "alias": "snowplow_web-on-run-start-0", "checksum": {"name": "sha256", "checksum": "678530e74d4f78096e8b6cdcdba81bada21906697c84faf7a8787dd7f4b58cb3"}, "tags": ["on-run-start"], "refs": [["snowplow_web_incremental_manifest"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/./dbt_project.yml/hooks/snowplow_web-on-run-start-0.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false}, "created_at": 1652369620.500799, "compiled_sql": "\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 0}, "operation.snowplow_web.snowplow_web-on-run-end-0": {"raw_sql": "{{ snowplow_utils.snowplow_incremental_post_hook('snowplow_web') }}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.snowplow_utils.snowplow_incremental_post_hook"], "nodes": ["model.snowplow_web.snowplow_web_incremental_manifest", "model.snowplow_web.snowplow_web_base_events_this_run"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes", "fqn": ["snowplow_web", "hooks", "snowplow_web-on-run-end-0"], "unique_id": "operation.snowplow_web.snowplow_web-on-run-end-0", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "hooks/snowplow_web-on-run-end-0.sql", "original_file_path": "./dbt_project.yml", "name": "snowplow_web-on-run-end-0", "alias": "snowplow_web-on-run-end-0", "checksum": {"name": "sha256", "checksum": "678530e74d4f78096e8b6cdcdba81bada21906697c84faf7a8787dd7f4b58cb3"}, "tags": ["on-run-end"], "refs": [["snowplow_web_incremental_manifest"], ["snowplow_web_base_events_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/./dbt_project.yml/hooks/snowplow_web-on-run-end-0.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false}, "created_at": 1652369620.5081751, "compiled_sql": "\n \n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 0}, "test.snowplow_media_player.unique_snowplow_media_player_base_play_id.42806fdcfc": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "play_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_base')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_base"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "unique_snowplow_media_player_base_play_id"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_base_play_id.42806fdcfc", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_base_play_id.sql", "original_file_path": "models/web/snowplow_media_player.yml", "name": "unique_snowplow_media_player_base_play_id", "alias": "unique_snowplow_media_player_base_play_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_base"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player.yml/unique_snowplow_media_player_base_play_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.541006, "compiled_sql": "\n \n \n\nselect\n play_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_base\"\nwhere play_id is not null\ngroup by play_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "play_id", "file_key_name": "models.snowplow_media_player_base"}, "test.snowplow_media_player.not_null_snowplow_media_player_base_play_id.75c3e8e087": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "play_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_base')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_base"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "not_null_snowplow_media_player_base_play_id"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_base_play_id.75c3e8e087", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_base_play_id.sql", "original_file_path": "models/web/snowplow_media_player.yml", "name": "not_null_snowplow_media_player_base_play_id", "alias": "not_null_snowplow_media_player_base_play_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_base"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player.yml/not_null_snowplow_media_player_base_play_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.5419981, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_base\"\nwhere play_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "play_id", "file_key_name": "models.snowplow_media_player_base"}, "test.snowplow_media_player.unique_snowplow_media_player_plays_by_pageview_play_id.f38ea98226": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "play_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_plays_by_pageview')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_plays_by_pageview"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "unique_snowplow_media_player_plays_by_pageview_play_id"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_plays_by_pageview_play_id.f38ea98226", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_plays_by_pageview_play_id.sql", "original_file_path": "models/web/snowplow_media_player.yml", "name": "unique_snowplow_media_player_plays_by_pageview_play_id", "alias": "unique_snowplow_media_player_plays_by_pageview_play_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_plays_by_pageview"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player.yml/unique_snowplow_media_player_plays_by_pageview_play_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.5429518, "compiled_sql": "\n \n \n\nselect\n play_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_plays_by_pageview\"\nwhere play_id is not null\ngroup by play_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "play_id", "file_key_name": "models.snowplow_media_player_plays_by_pageview"}, "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_pageview_play_id.f9c8ecdb6d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "play_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_plays_by_pageview')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_plays_by_pageview"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "not_null_snowplow_media_player_plays_by_pageview_play_id"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_pageview_play_id.f9c8ecdb6d", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_plays_by_pageview_play_id.sql", "original_file_path": "models/web/snowplow_media_player.yml", "name": "not_null_snowplow_media_player_plays_by_pageview_play_id", "alias": "not_null_snowplow_media_player_plays_by_pageview_play_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_plays_by_pageview"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player.yml/not_null_snowplow_media_player_plays_by_pageview_play_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.543786, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_plays_by_pageview\"\nwhere play_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "play_id", "file_key_name": "models.snowplow_media_player_plays_by_pageview"}, "test.snowplow_media_player.unique_snowplow_media_player_media_stats_media_id.02472f49b3": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "media_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_media_stats')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_media_stats"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "unique_snowplow_media_player_media_stats_media_id"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_media_stats_media_id.02472f49b3", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_media_stats_media_id.sql", "original_file_path": "models/web/snowplow_media_player.yml", "name": "unique_snowplow_media_player_media_stats_media_id", "alias": "unique_snowplow_media_player_media_stats_media_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_media_stats"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player.yml/unique_snowplow_media_player_media_stats_media_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.54463, "compiled_sql": "\n \n \n\nselect\n media_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_media_stats\"\nwhere media_id is not null\ngroup by media_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "media_id", "file_key_name": "models.snowplow_media_player_media_stats"}, "test.snowplow_media_player.not_null_snowplow_media_player_media_stats_media_id.4af247e237": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "media_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_media_stats')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_media_stats"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "not_null_snowplow_media_player_media_stats_media_id"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_media_stats_media_id.4af247e237", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_media_stats_media_id.sql", "original_file_path": "models/web/snowplow_media_player.yml", "name": "not_null_snowplow_media_player_media_stats_media_id", "alias": "not_null_snowplow_media_player_media_stats_media_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_media_stats"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/snowplow_media_player.yml/not_null_snowplow_media_player_media_stats_media_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.5454621, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_media_player_media_stats\"\nwhere media_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "media_id", "file_key_name": "models.snowplow_media_player_media_stats"}, "test.snowplow_media_player.unique_snowplow_media_player_interactions_this_run_event_id.ec39d65876": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_interactions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "scratch", "unique_snowplow_media_player_interactions_this_run_event_id"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_interactions_this_run_event_id.ec39d65876", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_interactions_this_run_event_id.sql", "original_file_path": "models/web/scratch/snowplow_media_player_scratch.yml", "name": "unique_snowplow_media_player_interactions_this_run_event_id", "alias": "unique_snowplow_media_player_interactions_this_run_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_interactions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_scratch.yml/unique_snowplow_media_player_interactions_this_run_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.5632782, "compiled_sql": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_interactions_this_run\"\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_media_player_interactions_this_run"}, "test.snowplow_media_player.not_null_snowplow_media_player_interactions_this_run_event_id.64c07fa266": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_interactions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "scratch", "not_null_snowplow_media_player_interactions_this_run_event_id"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_interactions_this_run_event_id.64c07fa266", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_interactions_this_run_event_id.sql", "original_file_path": "models/web/scratch/snowplow_media_player_scratch.yml", "name": "not_null_snowplow_media_player_interactions_this_run_event_id", "alias": "not_null_snowplow_media_player_interactions_this_run_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_interactions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_scratch.yml/not_null_snowplow_media_player_interactions_this_run_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.564445, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_interactions_this_run\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_media_player_interactions_this_run"}, "test.snowplow_media_player.unique_snowplow_media_player_base_this_run_play_id.1480904280": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "play_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_base_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_base_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "scratch", "unique_snowplow_media_player_base_this_run_play_id"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_base_this_run_play_id.1480904280", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_base_this_run_play_id.sql", "original_file_path": "models/web/scratch/snowplow_media_player_scratch.yml", "name": "unique_snowplow_media_player_base_this_run_play_id", "alias": "unique_snowplow_media_player_base_this_run_play_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_base_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_scratch.yml/unique_snowplow_media_player_base_this_run_play_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.5654058, "compiled_sql": "\n \n \n\nselect\n play_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_base_this_run\"\nwhere play_id is not null\ngroup by play_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "play_id", "file_key_name": "models.snowplow_media_player_base_this_run"}, "test.snowplow_media_player.not_null_snowplow_media_player_base_this_run_play_id.e59aaaef71": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "play_id", "model": "{{ get_where_subquery(ref('snowplow_media_player_base_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_base_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "scratch", "not_null_snowplow_media_player_base_this_run_play_id"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_base_this_run_play_id.e59aaaef71", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_base_this_run_play_id.sql", "original_file_path": "models/web/scratch/snowplow_media_player_scratch.yml", "name": "not_null_snowplow_media_player_base_this_run_play_id", "alias": "not_null_snowplow_media_player_base_this_run_play_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_base_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_scratch.yml/not_null_snowplow_media_player_base_this_run_play_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.566268, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_base_this_run\"\nwhere play_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "play_id", "file_key_name": "models.snowplow_media_player_base_this_run"}, "test.snowplow_media_player.unique_snowplow_media_player_pivot_base_percent_progress.f340fd7fc8": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "percent_progress", "model": "{{ get_where_subquery(ref('snowplow_media_player_pivot_base')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_pivot_base"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "scratch", "unique_snowplow_media_player_pivot_base_percent_progress"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_pivot_base_percent_progress.f340fd7fc8", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_pivot_base_percent_progress.sql", "original_file_path": "models/web/scratch/snowplow_media_player_scratch.yml", "name": "unique_snowplow_media_player_pivot_base_percent_progress", "alias": "unique_snowplow_media_player_pivot_base_percent_progress", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_pivot_base"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_scratch.yml/unique_snowplow_media_player_pivot_base_percent_progress.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.567271, "compiled_sql": "\n \n \n\nselect\n percent_progress as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_pivot_base\"\nwhere percent_progress is not null\ngroup by percent_progress\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "percent_progress", "file_key_name": "models.snowplow_media_player_pivot_base"}, "test.snowplow_media_player.not_null_snowplow_media_player_pivot_base_percent_progress.2c08f44ca8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "percent_progress", "model": "{{ get_where_subquery(ref('snowplow_media_player_pivot_base')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_media_player.snowplow_media_player_pivot_base"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "web", "scratch", "not_null_snowplow_media_player_pivot_base_percent_progress"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_pivot_base_percent_progress.2c08f44ca8", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_pivot_base_percent_progress.sql", "original_file_path": "models/web/scratch/snowplow_media_player_scratch.yml", "name": "not_null_snowplow_media_player_pivot_base_percent_progress", "alias": "not_null_snowplow_media_player_pivot_base_percent_progress", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_pivot_base"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_media_player/models/web/scratch/snowplow_media_player_scratch.yml/not_null_snowplow_media_player_pivot_base_percent_progress.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.568125, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_media_player_pivot_base\"\nwhere percent_progress is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "percent_progress", "file_key_name": "models.snowplow_media_player_pivot_base"}, "test.snowplow_media_player.unique_snowplow_media_player_plays_by_session_domain_sessionid.dcd2199aa4": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_media_player_plays_by_session')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "custom", "unique_snowplow_media_player_plays_by_session_domain_sessionid"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_plays_by_session_domain_sessionid.dcd2199aa4", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_plays_by_session_domain_sessionid.sql", "original_file_path": "models/custom/snowplow_media_player_custom.yml", "name": "unique_snowplow_media_player_plays_by_session_domain_sessionid", "alias": "unique_snowplow_media_player_plays_by_session_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_plays_by_session"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.574944, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_media_player_plays_by_session"}, "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_session_domain_sessionid.641be5fa6d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_snowplow_media_player_e46ddce100bf8333c7e1e95a3abf69bb\") }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_media_player_plays_by_session')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "config": {"enabled": false, "alias": "not_null_snowplow_media_player_e46ddce100bf8333c7e1e95a3abf69bb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "custom", "not_null_snowplow_media_player_plays_by_session_domain_sessionid"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_session_domain_sessionid.641be5fa6d", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_e46ddce100bf8333c7e1e95a3abf69bb.sql", "original_file_path": "models/custom/snowplow_media_player_custom.yml", "name": "not_null_snowplow_media_player_plays_by_session_domain_sessionid", "alias": "not_null_snowplow_media_player_e46ddce100bf8333c7e1e95a3abf69bb", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_plays_by_session"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "not_null_snowplow_media_player_e46ddce100bf8333c7e1e95a3abf69bb"}, "created_at": 1652369620.5759969, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_media_player_plays_by_session"}, "test.snowplow_media_player.unique_snowplow_media_player_user_stats_domain_userid.fc18fd22a4": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_media_player_user_stats')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "custom", "unique_snowplow_media_player_user_stats_domain_userid"], "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_user_stats_domain_userid.fc18fd22a4", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "unique_snowplow_media_player_user_stats_domain_userid.sql", "original_file_path": "models/custom/snowplow_media_player_custom.yml", "name": "unique_snowplow_media_player_user_stats_domain_userid", "alias": "unique_snowplow_media_player_user_stats_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_user_stats"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.577452, "column_name": "domain_userid", "file_key_name": "models.snowplow_media_player_user_stats"}, "test.snowplow_media_player.not_null_snowplow_media_player_user_stats_domain_userid.c9f3d3c94e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_media_player_user_stats')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_media_player", "custom", "not_null_snowplow_media_player_user_stats_domain_userid"], "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_user_stats_domain_userid.c9f3d3c94e", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "not_null_snowplow_media_player_user_stats_domain_userid.sql", "original_file_path": "models/custom/snowplow_media_player_custom.yml", "name": "not_null_snowplow_media_player_user_stats_domain_userid", "alias": "not_null_snowplow_media_player_user_stats_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_media_player_user_stats"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.578381, "column_name": "domain_userid", "file_key_name": "models.snowplow_media_player_user_stats"}, "test.snowplow_web.unique_snowplow_web_page_views_page_view_id.d0551e11d8": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "unique_snowplow_web_page_views_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_page_view_id.d0551e11d8", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_page_views_page_view_id.sql", "original_file_path": "models/page_views/page_views.yml", "name": "unique_snowplow_web_page_views_page_view_id", "alias": "unique_snowplow_web_page_views_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/unique_snowplow_web_page_views_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.599222, "compiled_sql": "\n \n \n\nselect\n page_view_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere page_view_id is not null\ngroup by page_view_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_page_view_id.ed9780c9ab": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_view_id.ed9780c9ab", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_page_view_id.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_page_view_id", "alias": "not_null_snowplow_web_page_views_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6004748, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere page_view_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.unique_snowplow_web_page_views_event_id.874efe18e1": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "unique_snowplow_web_page_views_event_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_event_id.874efe18e1", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_page_views_event_id.sql", "original_file_path": "models/page_views/page_views.yml", "name": "unique_snowplow_web_page_views_event_id", "alias": "unique_snowplow_web_page_views_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/unique_snowplow_web_page_views_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.601402, "compiled_sql": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_event_id.af9403c39f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_event_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_event_id.af9403c39f", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_event_id.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_event_id", "alias": "not_null_snowplow_web_page_views_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.602297, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_domain_userid.c4dc145a92": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_domain_userid.c4dc145a92", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_domain_userid.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_domain_userid", "alias": "not_null_snowplow_web_page_views_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.603183, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_network_userid.b5bb0baa9b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network_userid", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_network_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_network_userid.b5bb0baa9b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_network_userid.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_network_userid", "alias": "not_null_snowplow_web_page_views_network_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_network_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6045802, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere network_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network_userid", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionid.d171abf764": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_domain_sessionid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionid.d171abf764", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_domain_sessionid.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_domain_sessionid", "alias": "not_null_snowplow_web_page_views_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.605448, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere domain_sessionid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionidx.e2c23f3f73": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionidx", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_domain_sessionidx"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionidx.e2c23f3f73", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_domain_sessionidx.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_domain_sessionidx", "alias": "not_null_snowplow_web_page_views_domain_sessionidx", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_domain_sessionidx.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6062999, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere domain_sessionidx is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionidx", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_page_view_in_session_index.a624a66afc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_in_session_index", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_page_view_in_session_index"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_view_in_session_index.a624a66afc", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_page_view_in_session_index.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_page_view_in_session_index", "alias": "not_null_snowplow_web_page_views_page_view_in_session_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_page_view_in_session_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6074398, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere page_view_in_session_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_in_session_index", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_page_views_in_session.90627e03fd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_views_in_session", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_page_views_in_session"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_views_in_session.90627e03fd", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_page_views_in_session.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_page_views_in_session", "alias": "not_null_snowplow_web_page_views_page_views_in_session", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_page_views_in_session.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6086679, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere page_views_in_session is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_views_in_session", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_dvce_created_tstamp.f9ef0a90e4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "dvce_created_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_dvce_created_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_dvce_created_tstamp.f9ef0a90e4", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_dvce_created_tstamp.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_dvce_created_tstamp", "alias": "not_null_snowplow_web_page_views_dvce_created_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_dvce_created_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.609601, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere dvce_created_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "dvce_created_tstamp", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_collector_tstamp.eebfc2e362": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "collector_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_collector_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_collector_tstamp.eebfc2e362", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_collector_tstamp.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_collector_tstamp", "alias": "not_null_snowplow_web_page_views_collector_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_collector_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.610483, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere collector_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "collector_tstamp", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_derived_tstamp.936b5957b7": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "derived_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_derived_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_derived_tstamp.936b5957b7", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_derived_tstamp.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_derived_tstamp", "alias": "not_null_snowplow_web_page_views_derived_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_derived_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.61137, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere derived_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "derived_tstamp", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_start_tstamp.f0205359bb": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_start_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_start_tstamp.f0205359bb", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_start_tstamp.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_start_tstamp", "alias": "not_null_snowplow_web_page_views_start_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_start_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.612407, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere start_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "start_tstamp", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_end_tstamp.49df31f6f5": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_end_tstamp.49df31f6f5", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_end_tstamp.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_end_tstamp", "alias": "not_null_snowplow_web_page_views_end_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_end_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.613267, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_engaged_time_in_s.3e4b8848b3": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engaged_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_engaged_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_engaged_time_in_s.3e4b8848b3", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_engaged_time_in_s.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_engaged_time_in_s", "alias": "not_null_snowplow_web_page_views_engaged_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_engaged_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6141188, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere engaged_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "engaged_time_in_s", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_absolute_time_in_s.b0bdaac0aa": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "absolute_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_absolute_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_absolute_time_in_s.b0bdaac0aa", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_absolute_time_in_s.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_absolute_time_in_s", "alias": "not_null_snowplow_web_page_views_absolute_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_absolute_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.614992, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere absolute_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "absolute_time_in_s", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.not_null_snowplow_web_page_views_page_url.8dddde87ba": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_url", "model": "{{ get_where_subquery(ref('snowplow_web_page_views')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "not_null_snowplow_web_page_views_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_url.8dddde87ba", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_page_url.sql", "original_file_path": "models/page_views/page_views.yml", "name": "not_null_snowplow_web_page_views_page_url", "alias": "not_null_snowplow_web_page_views_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/page_views.yml/not_null_snowplow_web_page_views_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.616011, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_page_views\"\nwhere page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_url", "file_key_name": "models.snowplow_web_page_views"}, "test.snowplow_web.unique_snowplow_web_page_views_this_run_page_view_id.265385eac0": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_page_views_this_run_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_this_run_page_view_id.265385eac0", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_page_views_this_run_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_page_views_this_run_page_view_id", "alias": "unique_snowplow_web_page_views_this_run_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/unique_snowplow_web_page_views_this_run_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.637079, "compiled_sql": "\n \n \n\nselect\n page_view_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere page_view_id is not null\ngroup by page_view_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_id.cc0f0d96b3": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_id.cc0f0d96b3", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_page_view_id", "alias": "not_null_snowplow_web_page_views_this_run_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.638099, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere page_view_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.unique_snowplow_web_page_views_this_run_event_id.42096b7aa3": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_page_views_this_run_event_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_this_run_event_id.42096b7aa3", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_page_views_this_run_event_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_page_views_this_run_event_id", "alias": "unique_snowplow_web_page_views_this_run_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/unique_snowplow_web_page_views_this_run_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6391182, "compiled_sql": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_event_id.8f03269031": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_event_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_event_id.8f03269031", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_event_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_event_id", "alias": "not_null_snowplow_web_page_views_this_run_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.640003, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_userid.77f79e80dd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_userid.77f79e80dd", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_domain_userid.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_domain_userid", "alias": "not_null_snowplow_web_page_views_this_run_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.640874, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_network_userid.9dfe18559d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network_userid", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_network_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_network_userid.9dfe18559d", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_network_userid.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_network_userid", "alias": "not_null_snowplow_web_page_views_this_run_network_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_network_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.641734, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere network_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network_userid", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionid.8c6f26a143": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_domain_sessionid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionid.8c6f26a143", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_domain_sessionid.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_domain_sessionid", "alias": "not_null_snowplow_web_page_views_this_run_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6427362, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere domain_sessionid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionidx.69a8717c74": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionidx", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_domain_sessionidx"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionidx.69a8717c74", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_domain_sessionidx.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_domain_sessionidx", "alias": "not_null_snowplow_web_page_views_this_run_domain_sessionidx", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_domain_sessionidx.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6436028, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere domain_sessionidx is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionidx", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_in_session_index.c7826944c8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_snowplow_web_page_vie_d9b0dc07933b746ccf76ea4ca9cd45cb\") }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_in_session_index", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": "not_null_snowplow_web_page_vie_d9b0dc07933b746ccf76ea4ca9cd45cb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_page_view_in_session_index"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_in_session_index.c7826944c8", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_vie_d9b0dc07933b746ccf76ea4ca9cd45cb.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_page_view_in_session_index", "alias": "not_null_snowplow_web_page_vie_d9b0dc07933b746ccf76ea4ca9cd45cb", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_vie_d9b0dc07933b746ccf76ea4ca9cd45cb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "not_null_snowplow_web_page_vie_d9b0dc07933b746ccf76ea4ca9cd45cb"}, "created_at": 1652369620.644465, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere page_view_in_session_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_in_session_index", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_views_in_session.8d647c2332": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_views_in_session", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_page_views_in_session"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_views_in_session.8d647c2332", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_page_views_in_session.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_page_views_in_session", "alias": "not_null_snowplow_web_page_views_this_run_page_views_in_session", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_page_views_in_session.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6454039, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere page_views_in_session is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_views_in_session", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.40e528d602": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "dvce_created_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_dvce_created_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.40e528d602", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_dvce_created_tstamp", "alias": "not_null_snowplow_web_page_views_this_run_dvce_created_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6465652, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere dvce_created_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "dvce_created_tstamp", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_collector_tstamp.3382a3c260": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "collector_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_collector_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_collector_tstamp.3382a3c260", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_collector_tstamp.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_collector_tstamp", "alias": "not_null_snowplow_web_page_views_this_run_collector_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_collector_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6474319, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere collector_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "collector_tstamp", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_derived_tstamp.c845283a13": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "derived_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_derived_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_derived_tstamp.c845283a13", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_derived_tstamp.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_derived_tstamp", "alias": "not_null_snowplow_web_page_views_this_run_derived_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_derived_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6483, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere derived_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "derived_tstamp", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_start_tstamp.f397976d5e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_start_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_start_tstamp.f397976d5e", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_start_tstamp.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_start_tstamp", "alias": "not_null_snowplow_web_page_views_this_run_start_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_start_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.64916, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere start_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "start_tstamp", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_end_tstamp.56229099fe": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_end_tstamp.56229099fe", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_end_tstamp.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_end_tstamp", "alias": "not_null_snowplow_web_page_views_this_run_end_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_end_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.650143, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_engaged_time_in_s.347bdb2071": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engaged_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_engaged_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_engaged_time_in_s.347bdb2071", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_engaged_time_in_s.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_engaged_time_in_s", "alias": "not_null_snowplow_web_page_views_this_run_engaged_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_engaged_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6510022, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere engaged_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "engaged_time_in_s", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_absolute_time_in_s.54893adc18": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "absolute_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_absolute_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_absolute_time_in_s.54893adc18", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_absolute_time_in_s.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_absolute_time_in_s", "alias": "not_null_snowplow_web_page_views_this_run_absolute_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_absolute_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.651855, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere absolute_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "absolute_time_in_s", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_url.5d2cf56a0b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_url", "model": "{{ get_where_subquery(ref('snowplow_web_page_views_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_views_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_views_this_run_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_url.5d2cf56a0b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_views_this_run_page_url.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_views_this_run_page_url", "alias": "not_null_snowplow_web_page_views_this_run_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_page_views_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_views_this_run_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.652704, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_views_this_run\"\nwhere page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_url", "file_key_name": "models.snowplow_web_page_views_this_run"}, "test.snowplow_web.unique_snowplow_web_page_view_events_page_view_id.79b1b7c6c9": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_view_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_view_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_page_view_events_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_page_view_events_page_view_id.79b1b7c6c9", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_page_view_events_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_page_view_events_page_view_id", "alias": "unique_snowplow_web_page_view_events_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_page_view_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/unique_snowplow_web_page_view_events_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {"enabled": true}, "created_at": 1652369620.654216, "compiled_sql": "\n \n \n\nselect\n page_view_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_view_events\"\nwhere page_view_id is not null\ngroup by page_view_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_page_view_events"}, "test.snowplow_web.not_null_snowplow_web_page_view_events_page_view_id.c0a6fd5093": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_page_view_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_page_view_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_page_view_events_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_page_view_events_page_view_id.c0a6fd5093", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_page_view_events_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_page_view_events_page_view_id", "alias": "not_null_snowplow_web_page_view_events_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_page_view_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_page_view_events_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {"enabled": true}, "created_at": 1652369620.655541, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_page_view_events\"\nwhere page_view_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_page_view_events"}, "test.snowplow_web.unique_snowplow_web_pv_engaged_time_page_view_id.ccfb493466": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_engaged_time')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_pv_engaged_time"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_pv_engaged_time_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_pv_engaged_time_page_view_id.ccfb493466", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_pv_engaged_time_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_pv_engaged_time_page_view_id", "alias": "unique_snowplow_web_pv_engaged_time_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_engaged_time"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/unique_snowplow_web_pv_engaged_time_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.665778, "compiled_sql": "\n \n \n\nselect\n page_view_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_engaged_time\"\nwhere page_view_id is not null\ngroup by page_view_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_engaged_time"}, "test.snowplow_web.not_null_snowplow_web_pv_engaged_time_page_view_id.21b1a00326": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_engaged_time')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_pv_engaged_time"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_pv_engaged_time_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_pv_engaged_time_page_view_id.21b1a00326", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_pv_engaged_time_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_pv_engaged_time_page_view_id", "alias": "not_null_snowplow_web_pv_engaged_time_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_engaged_time"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_pv_engaged_time_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.666655, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_engaged_time\"\nwhere page_view_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_engaged_time"}, "test.snowplow_web.unique_snowplow_web_pv_scroll_depth_page_view_id.bea0dbc29e": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_scroll_depth')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_pv_scroll_depth"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_pv_scroll_depth_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_pv_scroll_depth_page_view_id.bea0dbc29e", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_pv_scroll_depth_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_pv_scroll_depth_page_view_id", "alias": "unique_snowplow_web_pv_scroll_depth_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_scroll_depth"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/unique_snowplow_web_pv_scroll_depth_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6676679, "compiled_sql": "\n \n \n\nselect\n page_view_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_scroll_depth\"\nwhere page_view_id is not null\ngroup by page_view_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_scroll_depth"}, "test.snowplow_web.not_null_snowplow_web_pv_scroll_depth_page_view_id.5e70f95d64": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_scroll_depth')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_pv_scroll_depth"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_pv_scroll_depth_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_pv_scroll_depth_page_view_id.5e70f95d64", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_pv_scroll_depth_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_pv_scroll_depth_page_view_id", "alias": "not_null_snowplow_web_pv_scroll_depth_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_scroll_depth"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/page_views/scratch/page_views_scratch.yml/not_null_snowplow_web_pv_scroll_depth_page_view_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.668533, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_pv_scroll_depth\"\nwhere page_view_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_scroll_depth"}, "test.snowplow_web.unique_snowplow_web_user_mapping_domain_userid.3f9b26384c": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_user_mapping')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_user_mapping"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "user_mapping", "unique_snowplow_web_user_mapping_domain_userid"], "unique_id": "test.snowplow_web.unique_snowplow_web_user_mapping_domain_userid.3f9b26384c", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_user_mapping_domain_userid.sql", "original_file_path": "models/user_mapping/user_mapping.yml", "name": "unique_snowplow_web_user_mapping_domain_userid", "alias": "unique_snowplow_web_user_mapping_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_user_mapping"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/user_mapping/user_mapping.yml/unique_snowplow_web_user_mapping_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.670489, "compiled_sql": "\n \n \n\nselect\n domain_userid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_user_mapping\"\nwhere domain_userid is not null\ngroup by domain_userid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_user_mapping"}, "test.snowplow_web.not_null_snowplow_web_user_mapping_domain_userid.5ce237cee5": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_user_mapping')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_user_mapping"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "user_mapping", "not_null_snowplow_web_user_mapping_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_user_mapping_domain_userid.5ce237cee5", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_user_mapping_domain_userid.sql", "original_file_path": "models/user_mapping/user_mapping.yml", "name": "not_null_snowplow_web_user_mapping_domain_userid", "alias": "not_null_snowplow_web_user_mapping_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_user_mapping"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/user_mapping/user_mapping.yml/not_null_snowplow_web_user_mapping_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.671384, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_user_mapping\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_user_mapping"}, "test.snowplow_web.not_null_snowplow_web_user_mapping_user_id.9002d9e31c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('snowplow_web_user_mapping')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_user_mapping"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "user_mapping", "not_null_snowplow_web_user_mapping_user_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_user_mapping_user_id.9002d9e31c", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_user_mapping_user_id.sql", "original_file_path": "models/user_mapping/user_mapping.yml", "name": "not_null_snowplow_web_user_mapping_user_id", "alias": "not_null_snowplow_web_user_mapping_user_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_user_mapping"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/user_mapping/user_mapping.yml/not_null_snowplow_web_user_mapping_user_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.672267, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_user_mapping\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "user_id", "file_key_name": "models.snowplow_web_user_mapping"}, "test.snowplow_web.not_null_snowplow_web_user_mapping_end_tstamp.e6f41e2335": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_user_mapping')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_user_mapping"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "user_mapping", "not_null_snowplow_web_user_mapping_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_user_mapping_end_tstamp.e6f41e2335", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_user_mapping_end_tstamp.sql", "original_file_path": "models/user_mapping/user_mapping.yml", "name": "not_null_snowplow_web_user_mapping_end_tstamp", "alias": "not_null_snowplow_web_user_mapping_end_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_user_mapping"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/user_mapping/user_mapping.yml/not_null_snowplow_web_user_mapping_end_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6733398, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_user_mapping\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_user_mapping"}, "test.snowplow_web.unique_snowplow_web_sessions_domain_sessionid.cc08fe64cd": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "unique_snowplow_web_sessions_domain_sessionid"], "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_domain_sessionid.cc08fe64cd", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_sessions_domain_sessionid.sql", "original_file_path": "models/sessions/sessions.yml", "name": "unique_snowplow_web_sessions_domain_sessionid", "alias": "unique_snowplow_web_sessions_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/unique_snowplow_web_sessions_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6886148, "compiled_sql": "\n \n \n\nselect\n domain_sessionid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere domain_sessionid is not null\ngroup by domain_sessionid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionid.77c850bf50": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_domain_sessionid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionid.77c850bf50", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_domain_sessionid.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_domain_sessionid", "alias": "not_null_snowplow_web_sessions_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.689503, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere domain_sessionid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionidx.4658289a96": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionidx", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_domain_sessionidx"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionidx.4658289a96", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_domain_sessionidx.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_domain_sessionidx", "alias": "not_null_snowplow_web_sessions_domain_sessionidx", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_domain_sessionidx.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6903749, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere domain_sessionidx is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionidx", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_start_tstamp.46c3284a01": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_start_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_start_tstamp.46c3284a01", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_start_tstamp.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_start_tstamp", "alias": "not_null_snowplow_web_sessions_start_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_start_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.691471, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere start_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "start_tstamp", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_end_tstamp.a01aba32a9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_end_tstamp.a01aba32a9", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_end_tstamp.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_end_tstamp", "alias": "not_null_snowplow_web_sessions_end_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_end_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.692341, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_domain_userid.71f8f1725c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_domain_userid.71f8f1725c", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_domain_userid.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_domain_userid", "alias": "not_null_snowplow_web_sessions_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.693197, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_network_userid.d8e7074d8d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network_userid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_network_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_network_userid.d8e7074d8d", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_network_userid.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_network_userid", "alias": "not_null_snowplow_web_sessions_network_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_network_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.694054, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere network_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network_userid", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_page_views.cadd000967": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_views", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_page_views"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_page_views.cadd000967", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_page_views.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_page_views", "alias": "not_null_snowplow_web_sessions_page_views", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_page_views.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.69505, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere page_views is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_views", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_engaged_time_in_s.474d223b0e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engaged_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_engaged_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_engaged_time_in_s.474d223b0e", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_engaged_time_in_s.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_engaged_time_in_s", "alias": "not_null_snowplow_web_sessions_engaged_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_engaged_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.695912, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere engaged_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "engaged_time_in_s", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_absolute_time_in_s.f0ab4554bf": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "absolute_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_absolute_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_absolute_time_in_s.f0ab4554bf", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_absolute_time_in_s.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_absolute_time_in_s", "alias": "not_null_snowplow_web_sessions_absolute_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_absolute_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.6967602, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere absolute_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "absolute_time_in_s", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_first_page_url.6f41b28018": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "first_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_first_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_first_page_url.6f41b28018", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_first_page_url.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_first_page_url", "alias": "not_null_snowplow_web_sessions_first_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_first_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.697597, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere first_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "first_page_url", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.not_null_snowplow_web_sessions_last_page_url.3d31ff89a0": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "not_null_snowplow_web_sessions_last_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_last_page_url.3d31ff89a0", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_last_page_url.sql", "original_file_path": "models/sessions/sessions.yml", "name": "not_null_snowplow_web_sessions_last_page_url", "alias": "not_null_snowplow_web_sessions_last_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/sessions.yml/not_null_snowplow_web_sessions_last_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.698594, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_sessions\"\nwhere last_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "last_page_url", "file_key_name": "models.snowplow_web_sessions"}, "test.snowplow_web.unique_snowplow_web_sessions_this_run_domain_sessionid.69a930bc20": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "unique_snowplow_web_sessions_this_run_domain_sessionid"], "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_this_run_domain_sessionid.69a930bc20", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_sessions_this_run_domain_sessionid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "unique_snowplow_web_sessions_this_run_domain_sessionid", "alias": "unique_snowplow_web_sessions_this_run_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/unique_snowplow_web_sessions_this_run_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.71507, "compiled_sql": "\n \n \n\nselect\n domain_sessionid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere domain_sessionid is not null\ngroup by domain_sessionid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionid.e339e9d10c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_domain_sessionid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionid.e339e9d10c", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_domain_sessionid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_domain_sessionid", "alias": "not_null_snowplow_web_sessions_this_run_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.71597, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere domain_sessionid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionidx.63be165793": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionidx", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_domain_sessionidx"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionidx.63be165793", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_domain_sessionidx.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_domain_sessionidx", "alias": "not_null_snowplow_web_sessions_this_run_domain_sessionidx", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_domain_sessionidx.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7168388, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere domain_sessionidx is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionidx", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_start_tstamp.124debede7": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_start_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_start_tstamp.124debede7", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_start_tstamp.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_start_tstamp", "alias": "not_null_snowplow_web_sessions_this_run_start_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_start_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.717813, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere start_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "start_tstamp", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_end_tstamp.0863cb9826": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_end_tstamp.0863cb9826", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_end_tstamp.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_end_tstamp", "alias": "not_null_snowplow_web_sessions_this_run_end_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_end_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7186618, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_userid.5edc0e4b52": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_userid.5edc0e4b52", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_domain_userid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_domain_userid", "alias": "not_null_snowplow_web_sessions_this_run_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7195158, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_network_userid.68ca052c7b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network_userid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_network_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_network_userid.68ca052c7b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_network_userid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_network_userid", "alias": "not_null_snowplow_web_sessions_this_run_network_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_network_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.720505, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere network_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network_userid", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_page_views.4c2da8e445": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_views", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_page_views"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_page_views.4c2da8e445", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_page_views.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_page_views", "alias": "not_null_snowplow_web_sessions_this_run_page_views", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_page_views.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.721368, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere page_views is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_views", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_engaged_time_in_s.d6cbebbd9d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engaged_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_engaged_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_engaged_time_in_s.d6cbebbd9d", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_engaged_time_in_s.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_engaged_time_in_s", "alias": "not_null_snowplow_web_sessions_this_run_engaged_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_engaged_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7222168, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere engaged_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "engaged_time_in_s", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_absolute_time_in_s.dee7fcd472": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "absolute_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_absolute_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_absolute_time_in_s.dee7fcd472", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_absolute_time_in_s.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_absolute_time_in_s", "alias": "not_null_snowplow_web_sessions_this_run_absolute_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_absolute_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.723058, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere absolute_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "absolute_time_in_s", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_first_page_url.1b7eaa462c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "first_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_first_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_first_page_url.1b7eaa462c", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_first_page_url.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_first_page_url", "alias": "not_null_snowplow_web_sessions_this_run_first_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_first_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7240489, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere first_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "first_page_url", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_sessions_this_run_last_page_url.08695f7040": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_this_run_last_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_last_page_url.08695f7040", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_this_run_last_page_url.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_this_run_last_page_url", "alias": "not_null_snowplow_web_sessions_this_run_last_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_this_run_last_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7249038, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_this_run\"\nwhere last_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "last_page_url", "file_key_name": "models.snowplow_web_sessions_this_run"}, "test.snowplow_web.unique_snowplow_web_sessions_aggs_domain_sessionid.bd890ff72e": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_aggs')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_aggs"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "unique_snowplow_web_sessions_aggs_domain_sessionid"], "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_aggs_domain_sessionid.bd890ff72e", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_sessions_aggs_domain_sessionid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "unique_snowplow_web_sessions_aggs_domain_sessionid", "alias": "unique_snowplow_web_sessions_aggs_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions_aggs"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/unique_snowplow_web_sessions_aggs_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.725763, "compiled_sql": "\n \n \n\nselect\n domain_sessionid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_aggs\"\nwhere domain_sessionid is not null\ngroup by domain_sessionid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions_aggs"}, "test.snowplow_web.not_null_snowplow_web_sessions_aggs_domain_sessionid.89fbe02a91": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_aggs')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_aggs"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_aggs_domain_sessionid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_aggs_domain_sessionid.89fbe02a91", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_aggs_domain_sessionid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_aggs_domain_sessionid", "alias": "not_null_snowplow_web_sessions_aggs_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions_aggs"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_aggs_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.726601, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_aggs\"\nwhere domain_sessionid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions_aggs"}, "test.snowplow_web.unique_snowplow_web_sessions_lasts_domain_sessionid.5825bca1f2": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_lasts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_lasts"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "unique_snowplow_web_sessions_lasts_domain_sessionid"], "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_lasts_domain_sessionid.5825bca1f2", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_sessions_lasts_domain_sessionid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "unique_snowplow_web_sessions_lasts_domain_sessionid", "alias": "unique_snowplow_web_sessions_lasts_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions_lasts"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/unique_snowplow_web_sessions_lasts_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.727618, "compiled_sql": "\n \n \n\nselect\n domain_sessionid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_lasts\"\nwhere domain_sessionid is not null\ngroup by domain_sessionid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions_lasts"}, "test.snowplow_web.not_null_snowplow_web_sessions_lasts_domain_sessionid.2a80ea96a7": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_sessions_lasts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_sessions_lasts"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "sessions", "scratch", "not_null_snowplow_web_sessions_lasts_domain_sessionid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_lasts_domain_sessionid.2a80ea96a7", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_sessions_lasts_domain_sessionid.sql", "original_file_path": "models/sessions/scratch/sessions_scratch.yml", "name": "not_null_snowplow_web_sessions_lasts_domain_sessionid", "alias": "not_null_snowplow_web_sessions_lasts_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_sessions_lasts"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/sessions/scratch/sessions_scratch.yml/not_null_snowplow_web_sessions_lasts_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.728481, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_sessions_lasts\"\nwhere domain_sessionid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_sessions_lasts"}, "test.snowplow_web.unique_snowplow_web_users_domain_userid.382879ad4d": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "unique_snowplow_web_users_domain_userid"], "unique_id": "test.snowplow_web.unique_snowplow_web_users_domain_userid.382879ad4d", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_users_domain_userid.sql", "original_file_path": "models/users/users.yml", "name": "unique_snowplow_web_users_domain_userid", "alias": "unique_snowplow_web_users_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/unique_snowplow_web_users_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7361379, "compiled_sql": "\n \n \n\nselect\n domain_userid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere domain_userid is not null\ngroup by domain_userid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_domain_userid.1ccdf3a506": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_domain_userid.1ccdf3a506", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_domain_userid.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_domain_userid", "alias": "not_null_snowplow_web_users_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.737047, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_network_userid.4bed7aba0e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_network_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_network_userid.4bed7aba0e", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_network_userid.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_network_userid", "alias": "not_null_snowplow_web_users_network_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_network_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7379131, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere network_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network_userid", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_start_tstamp.27d53ec51b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_start_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_start_tstamp.27d53ec51b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_start_tstamp.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_start_tstamp", "alias": "not_null_snowplow_web_users_start_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_start_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.738762, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere start_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "start_tstamp", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_end_tstamp.a557857240": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_end_tstamp.a557857240", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_end_tstamp.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_end_tstamp", "alias": "not_null_snowplow_web_users_end_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_end_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.739744, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_page_views.0e04d20dbc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_views", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_page_views"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_page_views.0e04d20dbc", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_page_views.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_page_views", "alias": "not_null_snowplow_web_users_page_views", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_page_views.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.740594, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere page_views is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_views", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_sessions.158e1154ee": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "sessions", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_sessions"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_sessions.158e1154ee", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_sessions.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_sessions", "alias": "not_null_snowplow_web_users_sessions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_sessions.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.741451, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere sessions is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "sessions", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_engaged_time_in_s.3cb774c56b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engaged_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_engaged_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_engaged_time_in_s.3cb774c56b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_engaged_time_in_s.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_engaged_time_in_s", "alias": "not_null_snowplow_web_users_engaged_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_engaged_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7424269, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere engaged_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "engaged_time_in_s", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_first_page_url.04ab06a553": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "first_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_first_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_first_page_url.04ab06a553", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_first_page_url.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_first_page_url", "alias": "not_null_snowplow_web_users_first_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_first_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.743287, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere first_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "first_page_url", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.not_null_snowplow_web_users_last_page_url.5cc3990f51": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_users')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "not_null_snowplow_web_users_last_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_last_page_url.5cc3990f51", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_last_page_url.sql", "original_file_path": "models/users/users.yml", "name": "not_null_snowplow_web_users_last_page_url", "alias": "not_null_snowplow_web_users_last_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/users.yml/not_null_snowplow_web_users_last_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7441401, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_derived\".\"snowplow_web_users\"\nwhere last_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "last_page_url", "file_key_name": "models.snowplow_web_users"}, "test.snowplow_web.unique_snowplow_web_users_this_run_domain_userid.098d3c27e7": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "unique_snowplow_web_users_this_run_domain_userid"], "unique_id": "test.snowplow_web.unique_snowplow_web_users_this_run_domain_userid.098d3c27e7", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_users_this_run_domain_userid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "unique_snowplow_web_users_this_run_domain_userid", "alias": "unique_snowplow_web_users_this_run_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/unique_snowplow_web_users_this_run_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.753427, "compiled_sql": "\n \n \n\nselect\n domain_userid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere domain_userid is not null\ngroup by domain_userid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_domain_userid.2fe7d698b6": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_domain_userid.2fe7d698b6", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_domain_userid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_domain_userid", "alias": "not_null_snowplow_web_users_this_run_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.754313, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_network_userid.cd5d1e9429": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_network_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_network_userid.cd5d1e9429", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_network_userid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_network_userid", "alias": "not_null_snowplow_web_users_this_run_network_userid", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_network_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.755181, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere network_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network_userid", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_start_tstamp.1aa7174fca": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_start_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_start_tstamp.1aa7174fca", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_start_tstamp.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_start_tstamp", "alias": "not_null_snowplow_web_users_this_run_start_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_start_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.756167, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere start_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "start_tstamp", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_end_tstamp.e5321dde8b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_end_tstamp.e5321dde8b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_end_tstamp.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_end_tstamp", "alias": "not_null_snowplow_web_users_this_run_end_tstamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_end_tstamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7570298, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_page_views.bdfc6538a5": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_views", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_page_views"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_page_views.bdfc6538a5", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_page_views.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_page_views", "alias": "not_null_snowplow_web_users_this_run_page_views", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_page_views.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7578838, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere page_views is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "page_views", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_sessions.701f1778bf": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "sessions", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_sessions"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_sessions.701f1778bf", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_sessions.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_sessions", "alias": "not_null_snowplow_web_users_this_run_sessions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_sessions.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.758752, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere sessions is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "sessions", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_engaged_time_in_s.ab5559e6a8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engaged_time_in_s", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_engaged_time_in_s"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_engaged_time_in_s.ab5559e6a8", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_engaged_time_in_s.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_engaged_time_in_s", "alias": "not_null_snowplow_web_users_this_run_engaged_time_in_s", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_engaged_time_in_s.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.759736, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere engaged_time_in_s is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "engaged_time_in_s", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_first_page_url.1742180bd0": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "first_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_first_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_first_page_url.1742180bd0", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_first_page_url.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_first_page_url", "alias": "not_null_snowplow_web_users_this_run_first_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_first_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.760591, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere first_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "first_page_url", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_this_run_last_page_url.4917b11840": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_page_url", "model": "{{ get_where_subquery(ref('snowplow_web_users_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_this_run_last_page_url"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_last_page_url.4917b11840", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_this_run_last_page_url.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_this_run_last_page_url", "alias": "not_null_snowplow_web_users_this_run_last_page_url", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_users_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_this_run_last_page_url.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.76145, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_this_run\"\nwhere last_page_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "last_page_url", "file_key_name": "models.snowplow_web_users_this_run"}, "test.snowplow_web.unique_snowplow_web_users_aggs_domain_userid.6bf5f8306b": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users_aggs')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_aggs"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "unique_snowplow_web_users_aggs_domain_userid"], "unique_id": "test.snowplow_web.unique_snowplow_web_users_aggs_domain_userid.6bf5f8306b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_users_aggs_domain_userid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "unique_snowplow_web_users_aggs_domain_userid", "alias": "unique_snowplow_web_users_aggs_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_aggs"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/unique_snowplow_web_users_aggs_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7623029, "compiled_sql": "\n \n \n\nselect\n domain_userid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_aggs\"\nwhere domain_userid is not null\ngroup by domain_userid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users_aggs"}, "test.snowplow_web.not_null_snowplow_web_users_aggs_domain_userid.418de3f818": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users_aggs')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_aggs"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_aggs_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_aggs_domain_userid.418de3f818", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_aggs_domain_userid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_aggs_domain_userid", "alias": "not_null_snowplow_web_users_aggs_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_aggs"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_aggs_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.763289, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_aggs\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users_aggs"}, "test.snowplow_web.unique_snowplow_web_users_lasts_domain_userid.1c0deae6ac": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users_lasts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_lasts"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "unique_snowplow_web_users_lasts_domain_userid"], "unique_id": "test.snowplow_web.unique_snowplow_web_users_lasts_domain_userid.1c0deae6ac", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_users_lasts_domain_userid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "unique_snowplow_web_users_lasts_domain_userid", "alias": "unique_snowplow_web_users_lasts_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_lasts"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/unique_snowplow_web_users_lasts_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.764142, "compiled_sql": "\n \n \n\nselect\n domain_userid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_lasts\"\nwhere domain_userid is not null\ngroup by domain_userid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users_lasts"}, "test.snowplow_web.not_null_snowplow_web_users_lasts_domain_userid.5a3966b2e0": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_userid", "model": "{{ get_where_subquery(ref('snowplow_web_users_lasts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_lasts"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_lasts_domain_userid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_lasts_domain_userid.5a3966b2e0", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_lasts_domain_userid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_lasts_domain_userid", "alias": "not_null_snowplow_web_users_lasts_domain_userid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_lasts"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_lasts_domain_userid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.7649941, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_lasts\"\nwhere domain_userid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_userid", "file_key_name": "models.snowplow_web_users_lasts"}, "test.snowplow_web.unique_snowplow_web_users_sessions_this_run_domain_sessionid.dd827f20ca": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_users_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "unique_snowplow_web_users_sessions_this_run_domain_sessionid"], "unique_id": "test.snowplow_web.unique_snowplow_web_users_sessions_this_run_domain_sessionid.dd827f20ca", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_users_sessions_this_run_domain_sessionid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "unique_snowplow_web_users_sessions_this_run_domain_sessionid", "alias": "unique_snowplow_web_users_sessions_this_run_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/unique_snowplow_web_users_sessions_this_run_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.765841, "compiled_sql": "\n \n \n\nselect\n domain_sessionid as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_sessions_this_run\"\nwhere domain_sessionid is not null\ngroup by domain_sessionid\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_users_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_users_sessions_this_run_domain_sessionid.a0be268f54": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "domain_sessionid", "model": "{{ get_where_subquery(ref('snowplow_web_users_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_users_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "users", "scratch", "not_null_snowplow_web_users_sessions_this_run_domain_sessionid"], "unique_id": "test.snowplow_web.not_null_snowplow_web_users_sessions_this_run_domain_sessionid.a0be268f54", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_users_sessions_this_run_domain_sessionid.sql", "original_file_path": "models/users/scratch/users_scratch.yml", "name": "not_null_snowplow_web_users_sessions_this_run_domain_sessionid", "alias": "not_null_snowplow_web_users_sessions_this_run_domain_sessionid", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_users_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/users/scratch/users_scratch.yml/not_null_snowplow_web_users_sessions_this_run_domain_sessionid.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.766839, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_users_sessions_this_run\"\nwhere domain_sessionid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "domain_sessionid", "file_key_name": "models.snowplow_web_users_sessions_this_run"}, "test.snowplow_web.unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.98156c1d39": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "session_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_sessions_lifecycle_manifest')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "unique_snowplow_web_base_sessions_lifecycle_manifest_session_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.98156c1d39", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "unique_snowplow_web_base_sessions_lifecycle_manifest_session_id", "alias": "unique_snowplow_web_base_sessions_lifecycle_manifest_session_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_sessions_lifecycle_manifest"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.79678, "compiled_sql": "\n \n \n\nselect\n session_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_sessions_lifecycle_manifest\"\nwhere session_id is not null\ngroup by session_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "session_id", "file_key_name": "models.snowplow_web_base_sessions_lifecycle_manifest"}, "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id.319366317f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_snowplow_web_base_ses_d54de7b02b6ce1f75988357a846f054c\") }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "session_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_sessions_lifecycle_manifest')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"]}, "config": {"enabled": true, "alias": "not_null_snowplow_web_base_ses_d54de7b02b6ce1f75988357a846f054c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id.319366317f", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_base_ses_d54de7b02b6ce1f75988357a846f054c.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id", "alias": "not_null_snowplow_web_base_ses_d54de7b02b6ce1f75988357a846f054c", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_sessions_lifecycle_manifest"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/not_null_snowplow_web_base_ses_d54de7b02b6ce1f75988357a846f054c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "not_null_snowplow_web_base_ses_d54de7b02b6ce1f75988357a846f054c"}, "created_at": 1652369620.797696, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_sessions_lifecycle_manifest\"\nwhere session_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "session_id", "file_key_name": "models.snowplow_web_base_sessions_lifecycle_manifest"}, "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp.19f9724e3e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_snowplow_web_base_ses_7216c9a84e092968da938f1188bbb6c4\") }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_base_sessions_lifecycle_manifest')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"]}, "config": {"enabled": true, "alias": "not_null_snowplow_web_base_ses_7216c9a84e092968da938f1188bbb6c4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp.19f9724e3e", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_base_ses_7216c9a84e092968da938f1188bbb6c4.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp", "alias": "not_null_snowplow_web_base_ses_7216c9a84e092968da938f1188bbb6c4", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_base_sessions_lifecycle_manifest"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/not_null_snowplow_web_base_ses_7216c9a84e092968da938f1188bbb6c4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "not_null_snowplow_web_base_ses_7216c9a84e092968da938f1188bbb6c4"}, "created_at": 1652369620.798649, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_sessions_lifecycle_manifest\"\nwhere start_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "start_tstamp", "file_key_name": "models.snowplow_web_base_sessions_lifecycle_manifest"}, "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp.de91d8a021": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_snowplow_web_base_ses_3ab69ed36c085a307484c69b8a1b409d\") }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_tstamp", "model": "{{ get_where_subquery(ref('snowplow_web_base_sessions_lifecycle_manifest')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"]}, "config": {"enabled": true, "alias": "not_null_snowplow_web_base_ses_3ab69ed36c085a307484c69b8a1b409d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp"], "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp.de91d8a021", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_base_ses_3ab69ed36c085a307484c69b8a1b409d.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp", "alias": "not_null_snowplow_web_base_ses_3ab69ed36c085a307484c69b8a1b409d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["snowplow_web_base_sessions_lifecycle_manifest"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/not_null_snowplow_web_base_ses_3ab69ed36c085a307484c69b8a1b409d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "not_null_snowplow_web_base_ses_3ab69ed36c085a307484c69b8a1b409d"}, "created_at": 1652369620.799702, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_sessions_lifecycle_manifest\"\nwhere end_tstamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "end_tstamp", "file_key_name": "models.snowplow_web_base_sessions_lifecycle_manifest"}, "test.snowplow_web.unique_snowplow_web_incremental_manifest_model.225591dff7": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "model", "model": "{{ get_where_subquery(ref('snowplow_web_incremental_manifest')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "unique_snowplow_web_incremental_manifest_model"], "unique_id": "test.snowplow_web.unique_snowplow_web_incremental_manifest_model.225591dff7", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_incremental_manifest_model.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "unique_snowplow_web_incremental_manifest_model", "alias": "unique_snowplow_web_incremental_manifest_model", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_incremental_manifest"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/unique_snowplow_web_incremental_manifest_model.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.8006332, "compiled_sql": "\n \n \n\nselect\n model as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_incremental_manifest\"\nwhere model is not null\ngroup by model\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "model", "file_key_name": "models.snowplow_web_incremental_manifest"}, "test.snowplow_web.not_null_snowplow_web_incremental_manifest_model.1abc13aaeb": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "model", "model": "{{ get_where_subquery(ref('snowplow_web_incremental_manifest')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_incremental_manifest"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "not_null_snowplow_web_incremental_manifest_model"], "unique_id": "test.snowplow_web.not_null_snowplow_web_incremental_manifest_model.1abc13aaeb", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_incremental_manifest_model.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "not_null_snowplow_web_incremental_manifest_model", "alias": "not_null_snowplow_web_incremental_manifest_model", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_incremental_manifest"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/not_null_snowplow_web_incremental_manifest_model.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.8014889, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_incremental_manifest\"\nwhere model is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "model", "file_key_name": "models.snowplow_web_incremental_manifest"}, "test.snowplow_web.unique_snowplow_web_base_quarantined_sessions_session_id.eef9115def": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "session_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_quarantined_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_quarantined_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "unique_snowplow_web_base_quarantined_sessions_session_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_base_quarantined_sessions_session_id.eef9115def", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_base_quarantined_sessions_session_id.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "unique_snowplow_web_base_quarantined_sessions_session_id", "alias": "unique_snowplow_web_base_quarantined_sessions_session_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_quarantined_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/unique_snowplow_web_base_quarantined_sessions_session_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.802353, "compiled_sql": "\n \n \n\nselect\n session_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_quarantined_sessions\"\nwhere session_id is not null\ngroup by session_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "session_id", "file_key_name": "models.snowplow_web_base_quarantined_sessions"}, "test.snowplow_web.not_null_snowplow_web_base_quarantined_sessions_session_id.862c7621b8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "session_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_quarantined_sessions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_quarantined_sessions"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "manifest", "not_null_snowplow_web_base_quarantined_sessions_session_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_base_quarantined_sessions_session_id.862c7621b8", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_base_quarantined_sessions_session_id.sql", "original_file_path": "models/base/manifest/base_manifest.yml", "name": "not_null_snowplow_web_base_quarantined_sessions_session_id", "alias": "not_null_snowplow_web_base_quarantined_sessions_session_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_quarantined_sessions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/manifest/base_manifest.yml/not_null_snowplow_web_base_quarantined_sessions_session_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.8033412, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_snowplow_manifest\".\"snowplow_web_base_quarantined_sessions\"\nwhere session_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "session_id", "file_key_name": "models.snowplow_web_base_quarantined_sessions"}, "test.snowplow_web.unique_snowplow_web_base_sessions_this_run_session_id.daa62a6c5c": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "session_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "scratch", "unique_snowplow_web_base_sessions_this_run_session_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_base_sessions_this_run_session_id.daa62a6c5c", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_base_sessions_this_run_session_id.sql", "original_file_path": "models/base/scratch/base_scratch.yml", "name": "unique_snowplow_web_base_sessions_this_run_session_id", "alias": "unique_snowplow_web_base_sessions_this_run_session_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/scratch/base_scratch.yml/unique_snowplow_web_base_sessions_this_run_session_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.8252978, "compiled_sql": "\n \n \n\nselect\n session_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_sessions_this_run\"\nwhere session_id is not null\ngroup by session_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "session_id", "file_key_name": "models.snowplow_web_base_sessions_this_run"}, "test.snowplow_web.not_null_snowplow_web_base_sessions_this_run_session_id.56273da92b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "session_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_sessions_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_sessions_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "scratch", "not_null_snowplow_web_base_sessions_this_run_session_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_this_run_session_id.56273da92b", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_base_sessions_this_run_session_id.sql", "original_file_path": "models/base/scratch/base_scratch.yml", "name": "not_null_snowplow_web_base_sessions_this_run_session_id", "alias": "not_null_snowplow_web_base_sessions_this_run_session_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_sessions_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/scratch/base_scratch.yml/not_null_snowplow_web_base_sessions_this_run_session_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.826211, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_sessions_this_run\"\nwhere session_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "session_id", "file_key_name": "models.snowplow_web_base_sessions_this_run"}, "test.snowplow_web.unique_snowplow_web_base_events_this_run_event_id.9ad59b967e": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_events_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_events_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "scratch", "unique_snowplow_web_base_events_this_run_event_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_base_events_this_run_event_id.9ad59b967e", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_base_events_this_run_event_id.sql", "original_file_path": "models/base/scratch/base_scratch.yml", "name": "unique_snowplow_web_base_events_this_run_event_id", "alias": "unique_snowplow_web_base_events_this_run_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_events_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/scratch/base_scratch.yml/unique_snowplow_web_base_events_this_run_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.827154, "compiled_sql": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\"\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_web_base_events_this_run"}, "test.snowplow_web.not_null_snowplow_web_base_events_this_run_event_id.0fc80e3549": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('snowplow_web_base_events_this_run')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snowplow_web.snowplow_web_base_events_this_run"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "base", "scratch", "not_null_snowplow_web_base_events_this_run_event_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_base_events_this_run_event_id.0fc80e3549", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_base_events_this_run_event_id.sql", "original_file_path": "models/base/scratch/base_scratch.yml", "name": "not_null_snowplow_web_base_events_this_run_event_id", "alias": "not_null_snowplow_web_base_events_this_run_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_base_events_this_run"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/snowplow_web/models/base/scratch/base_scratch.yml/not_null_snowplow_web_base_events_this_run_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652369620.828023, "compiled_sql": "\n \n \n\nselect *\nfrom \"dev1\".\"dbt_agnes_scratch\".\"snowplow_web_base_events_this_run\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.snowplow_web_base_events_this_run"}}, "sources": {"source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1": {"fqn": ["snowplow_media_player", "web", "atomic", "com_snowplowanalytics_snowplow_web_page_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "models/web/sources.yml", "original_file_path": "models/web/sources.yml", "name": "com_snowplowanalytics_snowplow_web_page_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "com_snowplowanalytics_snowplow_web_page_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains the `page_view_id` associated with an event.", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_web_page_1\"", "created_at": 1652369620.828544}, "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1": {"fqn": ["snowplow_media_player", "web", "atomic", "com_snowplowanalytics_snowplow_media_player_event_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "models/web/sources.yml", "original_file_path": "models/web/sources.yml", "name": "com_snowplowanalytics_snowplow_media_player_event_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "com_snowplowanalytics_snowplow_media_player_event_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "The table specifying the media player event type (e.g. playing, seek) and the label given for the media for user friendly identification.", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_media_player_event_1\"", "created_at": 1652369620.828635}, "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1": {"fqn": ["snowplow_media_player", "web", "atomic", "com_snowplowanalytics_snowplow_media_player_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "models/web/sources.yml", "original_file_path": "models/web/sources.yml", "name": "com_snowplowanalytics_snowplow_media_player_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "com_snowplowanalytics_snowplow_media_player_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains a set of entities that are common between media events across platforms.", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_media_player_1\"", "created_at": 1652369620.828695}, "source.snowplow_media_player.atomic.com_youtube_youtube_1": {"fqn": ["snowplow_media_player", "web", "atomic", "com_youtube_youtube_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_media_player.atomic.com_youtube_youtube_1", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "models/web/sources.yml", "original_file_path": "models/web/sources.yml", "name": "com_youtube_youtube_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "com_youtube_youtube_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "The context table with data specific to embedded YouTube videos.", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"com_youtube_youtube_1\"", "created_at": 1652369620.828749}, "source.snowplow_media_player.atomic.org_whatwg_media_element_1": {"fqn": ["snowplow_media_player", "web", "atomic", "org_whatwg_media_element_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_media_player.atomic.org_whatwg_media_element_1", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "models/web/sources.yml", "original_file_path": "models/web/sources.yml", "name": "org_whatwg_media_element_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "org_whatwg_media_element_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains the entities related to the HTML5 Media Element, adapted from the\u00a0whatwg\u00a0spec.", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"org_whatwg_media_element_1\"", "created_at": 1652369620.828803}, "source.snowplow_media_player.atomic.org_whatwg_video_element_1": {"fqn": ["snowplow_media_player", "web", "atomic", "org_whatwg_video_element_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_media_player.atomic.org_whatwg_video_element_1", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "models/web/sources.yml", "original_file_path": "models/web/sources.yml", "name": "org_whatwg_video_element_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "org_whatwg_video_element_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains the entities related to the HTML5 Video Element, adapted from the\u00a0whatwg\u00a0spec.", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"org_whatwg_video_element_1\"", "created_at": 1652369620.828855}, "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_web_page_1": {"fqn": ["snowplow_web", "base", "atomic", "com_snowplowanalytics_snowplow_web_page_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_web_page_1", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "models/base/src_base.yml", "original_file_path": "models/base/src_base.yml", "name": "com_snowplowanalytics_snowplow_web_page_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "com_snowplowanalytics_snowplow_web_page_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains the `page_view_id` associated with an event.", "columns": {"id": {"name": "id", "description": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_web_page_1\"", "created_at": 1652369620.828918}, "source.snowplow_web.atomic.com_iab_snowplow_spiders_and_robots_1": {"fqn": ["snowplow_web", "base", "atomic", "com_iab_snowplow_spiders_and_robots_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_web.atomic.com_iab_snowplow_spiders_and_robots_1", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "models/base/src_base.yml", "original_file_path": "models/base/src_base.yml", "name": "com_iab_snowplow_spiders_and_robots_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "com_iab_snowplow_spiders_and_robots_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains the data generated by the IAB Spiders & Robots enrichment.\n\nThe IAB Spiders & Robots enrichment uses the [IAB/ABC International Spiders and Bots List](https://iabtechlab.com/software/iababc-international-spiders-and-bots-list/) to determine whether an event was produced by a user or a robot/spider based on its\u2019 IP address and user agent.", "columns": {"category": {"name": "category", "description": "Category based on activity if the IP/UA is a spider or robot, BROWSER otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "primary_impact": {"name": "primary_impact", "description": "Whether the spider or robot would affect page impression measurement, ad impression measurement, both or none", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "Type of failed check if the IP/UA is a spider or robot, PASSED_ALL otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spider_or_robot": {"name": "spider_or_robot", "description": "True if the IP address or user agent checked against the list is a spider or robot, false otherwise", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"com_iab_snowplow_spiders_and_robots_1\"", "created_at": 1652369620.828983}, "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_ua_parser_context_1": {"fqn": ["snowplow_web", "base", "atomic", "com_snowplowanalytics_snowplow_ua_parser_context_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_ua_parser_context_1", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "models/base/src_base.yml", "original_file_path": "models/base/src_base.yml", "name": "com_snowplowanalytics_snowplow_ua_parser_context_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "com_snowplowanalytics_snowplow_ua_parser_context_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains the data generated by the [UA parser enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/ua-parser-enrichment/).", "columns": {"device_family": {"name": "device_family", "description": "Device type", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_family": {"name": "os_family", "description": "Operation system name", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_family": {"name": "useragent_family", "description": "Useragent family (browser) name", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_major": {"name": "os_major", "description": "Operation system major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_minor": {"name": "os_minor", "description": "Operation system minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch": {"name": "os_patch", "description": "Operation system patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_patch_minor": {"name": "os_patch_minor", "description": "Operation system patch minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_version": {"name": "os_version", "description": "Operation system full version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_major": {"name": "useragent_major", "description": "Useragent major version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_minor": {"name": "useragent_minor", "description": "Useragent minor version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_patch": {"name": "useragent_patch", "description": "Useragent patch version", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent_version": {"name": "useragent_version", "description": "Full version of the useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"com_snowplowanalytics_snowplow_ua_parser_context_1\"", "created_at": 1652369620.829058}, "source.snowplow_web.atomic.nl_basjes_yauaa_context_1": {"fqn": ["snowplow_web", "base", "atomic", "nl_basjes_yauaa_context_1"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_web.atomic.nl_basjes_yauaa_context_1", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "models/base/src_base.yml", "original_file_path": "models/base/src_base.yml", "name": "nl_basjes_yauaa_context_1", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "nl_basjes_yauaa_context_1", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This context table contains the data generated by the [YAUAA enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/yauaa-enrichment/).", "columns": {"device_class": {"name": "device_class", "description": "Class of device e.g. phone", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_class": {"name": "agent_class", "description": "Class of agent e.g. browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name": {"name": "agent_name", "description": "Name of agent e.g. Chrome", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version": {"name": "agent_name_version", "description": "Name and version of agent e.g. Chrome 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_name_version_major": {"name": "agent_name_version_major", "description": "Name and major version of agent e.g. Chrome 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version": {"name": "agent_version", "description": "Version of agent e.g. 53.0.2785.124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "agent_version_major": {"name": "agent_version_major", "description": "Major version of agent e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_brand": {"name": "device_brand", "description": "Brand of device e.g. Google", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_name": {"name": "device_name", "description": "Name of device e.g. Google Nexus 6", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_version": {"name": "device_version", "description": "Version of device e.g. 6.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_class": {"name": "layout_engine_class", "description": "Class of layout engine e.g. Browser", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name": {"name": "layout_engine_name", "description": "Name of layout engine e.g. Blink", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version": {"name": "layout_engine_name_version", "description": "Name and version of layout engine e.g. Blink 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_name_version_major": {"name": "layout_engine_name_version_major", "description": "Name and major version of layout engine e.g. Blink 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version": {"name": "layout_engine_version", "description": "Version of layout engine e.g. 53.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "layout_engine_version_major": {"name": "layout_engine_version_major", "description": "Major version of layout engine e.g. 53", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_class": {"name": "operating_system_class", "description": "Class of the OS e.g. Mobile", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name": {"name": "operating_system_name", "description": "Name of the OS e.g. Android", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_name_version": {"name": "operating_system_name_version", "description": "Name and version of the OS e.g. Android 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "operating_system_version": {"name": "operating_system_version", "description": "Version of the OS e.g. 7.0", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"nl_basjes_yauaa_context_1\"", "created_at": 1652369620.8291378}, "source.snowplow_web.atomic.events": {"fqn": ["snowplow_web", "base", "atomic", "events"], "database": "dev1", "schema": "atomic", "unique_id": "source.snowplow_web.atomic.events", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "models/base/src_base.yml", "original_file_path": "models/base/src_base.yml", "name": "events", "source_name": "atomic", "source_description": "", "loader": "", "identifier": "events", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "The `events` table contains all canonical events generated by [Snowplow's](https://snowplowanalytics.com/) trackers, including web, mobile and server side events.", "columns": {"app_id": {"name": "app_id", "description": "Application ID e.g. \u2018angry-birds\u2019 is used to distinguish different applications that are being tracked by the same Snowplow stack, e.g. production versus dev.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "platform": {"name": "platform", "description": "Platform e.g. \u2018web\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "etl_tstamp": {"name": "etl_tstamp", "description": "Timestamp event began ETL e.g. \u20182017-01-26 00:01:25.292\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "collector_tstamp": {"name": "collector_tstamp", "description": "Time stamp for the event recorded by the collector e.g. `2013-11-26 00:02:05`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_created_tstamp": {"name": "dvce_created_tstamp", "description": "Timestamp event was recorded on the client device e.g. \u20182013-11-26 00:03:57.885\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event": {"name": "event", "description": "The type of event recorded e.g. \u2018page_view\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "A UUID for each event e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "txn_id": {"name": "txn_id", "description": "Transaction ID set client-side, used to de-dupe records e.g. 421828", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name_tracker": {"name": "name_tracker", "description": "Tracker namespace e.g. \u2018sp1\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "v_tracker": {"name": "v_tracker", "description": "Tracker version e.g. \u2018js-3.0.0\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "v_collector": {"name": "v_collector", "description": "Collector version e.g. \u2018ssc-2.1.0-kinesis\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "v_etl": {"name": "v_etl", "description": "ETL version e.g. \u2018snowplow-micro-1.1.0-common-1.4.2\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_ipaddress": {"name": "user_ipaddress", "description": "User IP address e.g. \u201892.231.54.234\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_fingerprint": {"name": "user_fingerprint", "description": "A user fingerprint generated by looking at the individual browser features e.g. 2161814971", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_userid": {"name": "domain_userid", "description": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionidx": {"name": "domain_sessionidx", "description": "A visit / session index e.g. 3", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network_userid": {"name": "network_userid", "description": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_country": {"name": "geo_country", "description": "ISO 3166-1 code for the country the visitor is located in e.g. \u2018GB\u2019, \u2018US\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region": {"name": "geo_region", "description": "ISO-3166-2 code for country region the visitor is in e.g. \u2018I9\u2019, \u2018TX\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_city": {"name": "geo_city", "description": "City the visitor is in e.g. \u2018New York\u2019, \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_zipcode": {"name": "geo_zipcode", "description": "Postcode the visitor is in e.g. \u201894109\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_latitude": {"name": "geo_latitude", "description": "Visitor location latitude e.g. 37.443604", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_longitude": {"name": "geo_longitude", "description": "Visitor location longitude e.g. -122.4124", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_region_name": {"name": "geo_region_name", "description": "Visitor region name e.g. `Florida`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_isp": {"name": "ip_isp", "description": "Visitor\u2019s ISP e.g. \u2018FDN Communications\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_organization": {"name": "ip_organization", "description": "Organization associated with the visitor\u2019s IP address \u2013 defaults to ISP name if none is found e.g. \u2018Bouygues Telecom\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_domain": {"name": "ip_domain", "description": "Second level domain name associated with the visitor\u2019s IP address e.g. \u2018nuvox.net\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ip_netspeed": {"name": "ip_netspeed", "description": "Visitor\u2019s connection type e.g. \u2018Cable/DSL\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_url": {"name": "page_url", "description": "The page URL e.g. `http://www.example.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_title": {"name": "page_title", "description": "Web page title e.g. \u2018Snowplow Docs \u2013 Understanding the structure of Snowplow data\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_referrer": {"name": "page_referrer", "description": "URL of the referrer e.g. `http://www.referrer.com`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlscheme": {"name": "page_urlscheme", "description": "Scheme aka protocol e.g. \u2018https\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlhost": {"name": "page_urlhost", "description": "Host aka domain e.g. \u2018\u201cwww.snowplowanalytics.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlport": {"name": "page_urlport", "description": "Port if specified, 80 if not 80", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlpath": {"name": "page_urlpath", "description": "Path to page e.g. \u2018/product/index.html\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlquery": {"name": "page_urlquery", "description": "Querystring e.g. \u2018id=GTM-DLRG\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "page_urlfragment": {"name": "page_urlfragment", "description": "Fragment aka anchor e.g. \u20184-conclusion\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlscheme": {"name": "refr_urlscheme", "description": "Referer scheme e.g. \u2018http\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlhost": {"name": "refr_urlhost", "description": "Referer host e.g. \u2018www.bing.com\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlport": {"name": "refr_urlport", "description": "Referer port e.g. 80", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlpath": {"name": "refr_urlpath", "description": "Referer page path e.g. \u2018/images/search\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlquery": {"name": "refr_urlquery", "description": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_urlfragment": {"name": "refr_urlfragment", "description": "Referer URL fragment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_medium": {"name": "refr_medium", "description": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_source": {"name": "refr_source", "description": "Name of referer if recognised e.g. \u2018Bing images\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_term": {"name": "refr_term", "description": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_medium": {"name": "mkt_medium", "description": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_source": {"name": "mkt_source", "description": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_term": {"name": "mkt_term", "description": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_content": {"name": "mkt_content", "description": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_campaign": {"name": "mkt_campaign", "description": "The campaign ID e.g. \u2018diageo-123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_category": {"name": "se_category", "description": "Category of event e.g. \u2018ecomm\u2019, \u2018video\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_action": {"name": "se_action", "description": "Action performed / event name e.g. \u2018add-to-basket\u2019, \u2018play-video\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_label": {"name": "se_label", "description": "The object of the action e.g. the ID of the video played or SKU of the product added-to-basket e.g. \u2018pbz00123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_property": {"name": "se_property", "description": "A property associated with the object of the action e.g. \u2018HD\u2019, \u2018large\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "se_value": {"name": "se_value", "description": "A value associated with the event / action e.g. the value of goods added-to-basket e.g. 9.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_orderid": {"name": "tr_orderid", "description": "Order ID e.g. \u2018#134\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_affiliation": {"name": "tr_affiliation", "description": "Transaction affiliation (e.g. store where sale took place) e.g. \u2018web\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_total": {"name": "tr_total", "description": "Total transaction value e.g. 12.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_tax": {"name": "tr_tax", "description": "Total tax included in transaction value e.g. 3.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_shipping": {"name": "tr_shipping", "description": "Delivery cost charged e.g. 0.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_city": {"name": "tr_city", "description": "Delivery address, city e.g. \u2018London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_state": {"name": "tr_state", "description": "Delivery address, state e.g. \u2018Washington\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_country": {"name": "tr_country", "description": "Delivery address, country e.g. \u2018France\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_orderid": {"name": "ti_orderid", "description": "Order ID e.g. \u2018#134\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_sku": {"name": "ti_sku", "description": "Product SKU e.g. \u2018pbz00123\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_name": {"name": "ti_name", "description": "Product name e.g. \u2018Cone pendulum\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_category": {"name": "ti_category", "description": "Product category e.g. \u2018New Age\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_price": {"name": "ti_price", "description": "Product unit price e.g. 9.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_quantity": {"name": "ti_quantity", "description": "Number of product in transaction e.g. 2", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_xoffset_min": {"name": "pp_xoffset_min", "description": "Minimum page x offset seen in the last ping period e.g. 0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_xoffset_max": {"name": "pp_xoffset_max", "description": "Maximum page x offset seen in the last ping period e.g. 100", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_yoffset_min": {"name": "pp_yoffset_min", "description": "Minimum page y offset seen in the last ping period e.g. 0", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pp_yoffset_max": {"name": "pp_yoffset_max", "description": "Maximum page y offset seen in the last ping period e.g. 200", "meta": {}, "data_type": null, "quote": null, "tags": []}, "useragent": {"name": "useragent", "description": "Raw useragent", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_name": {"name": "br_name", "description": "Browser name e.g. `Firefox 12`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_family": {"name": "br_family", "description": "Browser family e.g. \u2018Firefox\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_version": {"name": "br_version", "description": "Browser version e.g. \u201812.0\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_type": {"name": "br_type", "description": "Browser type e.g. \u2018Browser\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_renderengine": {"name": "br_renderengine", "description": "Browser rendering engine e.g. \u2018GECKO\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_lang": {"name": "br_lang", "description": "Language the browser is set to e.g. \u2018en-GB\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_pdf": {"name": "br_features_pdf", "description": "Whether the browser recognizes PDFs e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_flash": {"name": "br_features_flash", "description": "Whether Flash is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_java": {"name": "br_features_java", "description": "Whether Java is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_director": {"name": "br_features_director", "description": "Whether Adobe Shockwave is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_quicktime": {"name": "br_features_quicktime", "description": "Whether QuickTime is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_realplayer": {"name": "br_features_realplayer", "description": "Whether RealPlayer is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_windowsmedia": {"name": "br_features_windowsmedia", "description": "Whether mplayer2 is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_gears": {"name": "br_features_gears", "description": "Whether Google Gears is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_features_silverlight": {"name": "br_features_silverlight", "description": "Whether Microsoft Silverlight is installed e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_cookies": {"name": "br_cookies", "description": "Whether cookies are enabled e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_colordepth": {"name": "br_colordepth", "description": "Bit depth of the browser color palette e.g. 24", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewwidth": {"name": "br_viewwidth", "description": "Viewport width e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "br_viewheight": {"name": "br_viewheight", "description": "Viewport height e.g. 1000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_name": {"name": "os_name", "description": "Name of operating system e.g. `Android`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_family": {"name": "os_family", "description": "Operating system family e.g. \u2018Linux\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_manufacturer": {"name": "os_manufacturer", "description": "Company responsible for OS e.g. \u2018Apple\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "os_timezone": {"name": "os_timezone", "description": "Client operating system timezone e.g. `Europe/London`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_type": {"name": "dvce_type", "description": "Type of device e.g. `Computer`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_ismobile": {"name": "dvce_ismobile", "description": "Is the device mobile? e.g. True", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_screenwidth": {"name": "dvce_screenwidth", "description": "Screen width in pixels e.g. 1900", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_screenheight": {"name": "dvce_screenheight", "description": "Screen height in pixels e.g. 1024", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_charset": {"name": "doc_charset", "description": "The page\u2019s character encoding e.g. , \u2018UTF-8\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_width": {"name": "doc_width", "description": "The page\u2019s width in pixels e.g. 1024", "meta": {}, "data_type": null, "quote": null, "tags": []}, "doc_height": {"name": "doc_height", "description": "The page\u2019s height in pixels e.g. 3000", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_currency": {"name": "tr_currency", "description": "Currency e.g. \u2018USD\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_total_base": {"name": "tr_total_base", "description": "Total in base currency e.g. 12.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_tax_base": {"name": "tr_tax_base", "description": "Total tax in base currency e.g. 3.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tr_shipping_base": {"name": "tr_shipping_base", "description": "decimal Delivery cost in base currency e.g. 0.00", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_currency": {"name": "ti_currency", "description": "Currency e.g. \u2018EUR\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ti_price_base": {"name": "ti_price_base", "description": "decimal Price in base currency e.g. 9.99", "meta": {}, "data_type": null, "quote": null, "tags": []}, "base_currency": {"name": "base_currency", "description": "Reporting currency e.g. \u2018GBP\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "geo_timezone": {"name": "geo_timezone", "description": "Visitor timezone name e.g. \u2018Europe/London\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_clickid": {"name": "mkt_clickid", "description": "The click ID e.g. \u2018ac3d8e459\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "mkt_network": {"name": "mkt_network", "description": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "etl_tags": {"name": "etl_tags", "description": "JSON of tags for this ETL run e.g. \u201c[\u2018prod\u2019]\u201d", "meta": {}, "data_type": null, "quote": null, "tags": []}, "dvce_sent_tstamp": {"name": "dvce_sent_tstamp", "description": "When the event was sent by the client device e.g. \u20182013-11-26 00:03:58.032\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_domain_userid": {"name": "refr_domain_userid", "description": "The Snowplow domain_userid of the referring website e.g. \u2018bc2e92ec6c204a14\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refr_dvce_tstamp": {"name": "refr_dvce_tstamp", "description": "The time of attaching the domain_userid to the inbound link e.g. \u20182013-11-26 00:02:05\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "domain_sessionid": {"name": "domain_sessionid", "description": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "derived_tstamp": {"name": "derived_tstamp", "description": "Timestamp making allowance for inaccurate device clock e.g. `2013-11-26 00:02:04`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_vendor": {"name": "event_vendor", "description": "Who defined the event e.g. \u2018com.acme\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_name": {"name": "event_name", "description": "Event name e.g. \u2018link_click\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_format": {"name": "event_format", "description": "Format for event e.g. \u2018jsonschema\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_version": {"name": "event_version", "description": "Version of event schema e.g. \u20181-0-2\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_fingerprint": {"name": "event_fingerprint", "description": "Hash client-set event fields e.g. AADCE520E20C2899F4CED228A79A3083", "meta": {}, "data_type": null, "quote": null, "tags": []}, "true_tstamp": {"name": "true_tstamp", "description": "User-set \u201ctrue timestamp\u201d for the event e.g. \u20182013-11-26 00:02:04\u2019", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"dev1\".\"atomic\".\"events\"", "created_at": 1652369620.8294132}}, "macros": {"macro.snowplow_media_player.get_percentage_boundaries": {"unique_id": "macro.snowplow_media_player.get_percentage_boundaries", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "macros/get_percentage_boundaries.sql", "original_file_path": "macros/get_percentage_boundaries.sql", "name": "get_percentage_boundaries", "macro_sql": "{% macro get_percentage_boundaries(tracked_boundaries) %}\n\n {% set percentage_boundaries = [] %}\n\n {% for element in var(\"snowplow__percent_progress_boundaries\") %}\n {% if element < 0 or element > 100 %}\n {{ exceptions.raise_compiler_error(\"`snowplow__percent_progress_boundary` is outside the accepted range 0-100. Got: \" ~ element) }}\n\n {% elif element % 1 != 0 %}\n {{ exceptions.raise_compiler_error(\"`snowplow__percent_progress_boundary` needs to be a whole number. Got: \" ~ element) }}\n\n {% else %}\n {% do percentage_boundaries.append(element) %}\n {% endif %}\n {% endfor %}\n\n {% if 100 not in var(\"snowplow__percent_progress_boundaries\") %}\n {% do percentage_boundaries.append('100') %}\n {% endif %}\n\n {{ return(percentage_boundaries) }}\n\n {% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.512577}, "macro.dbt_redshift.redshift__get_base_catalog": {"unique_id": "macro.dbt_redshift.redshift__get_base_catalog", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "redshift__get_base_catalog", "macro_sql": "{% macro redshift__get_base_catalog(information_schema, schemas) -%}\n {%- call statement('base_catalog', fetch_result=True) -%}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n with late_binding as (\n select\n '{{ database }}'::varchar as table_database,\n table_schema,\n table_name,\n 'LATE BINDING VIEW'::varchar as table_type,\n null::text as table_comment,\n\n column_name,\n column_index,\n column_type,\n null::text as column_comment\n from pg_get_late_binding_view_cols()\n cols(table_schema name, table_name name, column_name name,\n column_type varchar,\n column_index int)\n order by \"column_index\"\n ),\n\n early_binding as (\n select\n '{{ database }}'::varchar as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n where (\n {%- for schema in schemas -%}\n upper(sch.nspname) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and tbl.relkind in ('r', 'v', 'f', 'p')\n and col.attnum > 0\n and not col.attisdropped\n ),\n\n table_owners as (\n\n select\n '{{ database }}'::varchar as table_database,\n schemaname as table_schema,\n tablename as table_name,\n tableowner as table_owner\n\n from pg_tables\n\n union all\n\n select\n '{{ database }}'::varchar as table_database,\n schemaname as table_schema,\n viewname as table_name,\n viewowner as table_owner\n\n from pg_views\n\n ),\n\n unioned as (\n\n select *\n from early_binding\n\n union all\n\n select *\n from late_binding\n\n )\n\n select *,\n table_database || '.' || table_schema || '.' || table_name as table_id\n\n from unioned\n join table_owners using (table_database, table_schema, table_name)\n\n where (\n {%- for schema in schemas -%}\n upper(table_schema) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n\n order by \"column_index\"\n {%- endcall -%}\n\n {{ return(load_result('base_catalog').table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.517906}, "macro.dbt_redshift.redshift__get_extended_catalog": {"unique_id": "macro.dbt_redshift.redshift__get_extended_catalog", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "redshift__get_extended_catalog", "macro_sql": "{% macro redshift__get_extended_catalog(schemas) %}\n {%- call statement('extended_catalog', fetch_result=True) -%}\n\n select\n \"database\" || '.' || \"schema\" || '.' || \"table\" as table_id,\n\n 'Encoded'::text as \"stats:encoded:label\",\n encoded as \"stats:encoded:value\",\n 'Indicates whether any column in the table has compression encoding defined.'::text as \"stats:encoded:description\",\n true as \"stats:encoded:include\",\n\n 'Dist Style' as \"stats:diststyle:label\",\n diststyle as \"stats:diststyle:value\",\n 'Distribution style or distribution key column, if key distribution is defined.'::text as \"stats:diststyle:description\",\n true as \"stats:diststyle:include\",\n\n 'Sort Key 1' as \"stats:sortkey1:label\",\n -- handle 0xFF byte in response for interleaved sort styles\n case\n when sortkey1 like 'INTERLEAVED%' then 'INTERLEAVED'::text\n else sortkey1\n end as \"stats:sortkey1:value\",\n 'First column in the sort key.'::text as \"stats:sortkey1:description\",\n (sortkey1 is not null) as \"stats:sortkey1:include\",\n\n 'Max Varchar' as \"stats:max_varchar:label\",\n max_varchar as \"stats:max_varchar:value\",\n 'Size of the largest column that uses a VARCHAR data type.'::text as \"stats:max_varchar:description\",\n true as \"stats:max_varchar:include\",\n\n -- exclude this, as the data is strangely returned with null-byte characters\n 'Sort Key 1 Encoding' as \"stats:sortkey1_enc:label\",\n sortkey1_enc as \"stats:sortkey1_enc:value\",\n 'Compression encoding of the first column in the sort key.' as \"stats:sortkey1_enc:description\",\n false as \"stats:sortkey1_enc:include\",\n\n '# Sort Keys' as \"stats:sortkey_num:label\",\n sortkey_num as \"stats:sortkey_num:value\",\n 'Number of columns defined as sort keys.' as \"stats:sortkey_num:description\",\n (sortkey_num > 0) as \"stats:sortkey_num:include\",\n\n 'Approximate Size' as \"stats:size:label\",\n size * 1000000 as \"stats:size:value\",\n 'Approximate size of the table, calculated from a count of 1MB blocks'::text as \"stats:size:description\",\n true as \"stats:size:include\",\n\n 'Disk Utilization' as \"stats:pct_used:label\",\n pct_used / 100.0 as \"stats:pct_used:value\",\n 'Percent of available space that is used by the table.'::text as \"stats:pct_used:description\",\n true as \"stats:pct_used:include\",\n\n 'Unsorted %' as \"stats:unsorted:label\",\n unsorted / 100.0 as \"stats:unsorted:value\",\n 'Percent of unsorted rows in the table.'::text as \"stats:unsorted:description\",\n (unsorted is not null) as \"stats:unsorted:include\",\n\n 'Stats Off' as \"stats:stats_off:label\",\n stats_off as \"stats:stats_off:value\",\n 'Number that indicates how stale the table statistics are; 0 is current, 100 is out of date.'::text as \"stats:stats_off:description\",\n true as \"stats:stats_off:include\",\n\n 'Approximate Row Count' as \"stats:rows:label\",\n tbl_rows as \"stats:rows:value\",\n 'Approximate number of rows in the table. This value includes rows marked for deletion, but not yet vacuumed.'::text as \"stats:rows:description\",\n true as \"stats:rows:include\",\n\n 'Sort Key Skew' as \"stats:skew_sortkey1:label\",\n skew_sortkey1 as \"stats:skew_sortkey1:value\",\n 'Ratio of the size of the largest non-sort key column to the size of the first column of the sort key.'::text as \"stats:skew_sortkey1:description\",\n (skew_sortkey1 is not null) as \"stats:skew_sortkey1:include\",\n\n 'Skew Rows' as \"stats:skew_rows:label\",\n skew_rows as \"stats:skew_rows:value\",\n 'Ratio of the number of rows in the slice with the most rows to the number of rows in the slice with the fewest rows.'::text as \"stats:skew_rows:description\",\n (skew_rows is not null) as \"stats:skew_rows:include\"\n\n from svv_table_info\n where (\n {%- for schema in schemas -%}\n upper(schema) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n\n {%- endcall -%}\n\n {{ return(load_result('extended_catalog').table) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.518612}, "macro.dbt_redshift.redshift__can_select_from": {"unique_id": "macro.dbt_redshift.redshift__can_select_from", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "redshift__can_select_from", "macro_sql": "{% macro redshift__can_select_from(table_name) %}\n\n {%- call statement('has_table_privilege', fetch_result=True) -%}\n\n select has_table_privilege(current_user, '{{ table_name }}', 'SELECT') as can_select\n\n {%- endcall -%}\n\n {% set can_select = load_result('has_table_privilege').table[0]['can_select'] %}\n {{ return(can_select) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.51901}, "macro.dbt_redshift.redshift__no_svv_table_info_warning": {"unique_id": "macro.dbt_redshift.redshift__no_svv_table_info_warning", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "redshift__no_svv_table_info_warning", "macro_sql": "{% macro redshift__no_svv_table_info_warning() %}\n\n {% set msg %}\n\n Warning: The database user \"{{ target.user }}\" has insufficient permissions to\n query the \"svv_table_info\" table. Please grant SELECT permissions on this table\n to the \"{{ target.user }}\" user to fetch extended table details from Redshift.\n\n {% endset %}\n\n {{ log(msg, info=True) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.519319}, "macro.dbt_redshift.redshift__get_catalog": {"unique_id": "macro.dbt_redshift.redshift__get_catalog", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "redshift__get_catalog", "macro_sql": "{% macro redshift__get_catalog(information_schema, schemas) %}\n\n {#-- Compute a left-outer join in memory. Some Redshift queries are\n -- leader-only, and cannot be joined to other compute-based queries #}\n\n {% set catalog = redshift__get_base_catalog(information_schema, schemas) %}\n\n {% set select_extended = redshift__can_select_from('svv_table_info') %}\n {% if select_extended %}\n {% set extended_catalog = redshift__get_extended_catalog(schemas) %}\n {% set catalog = catalog.join(extended_catalog, 'table_id') %}\n {% else %}\n {{ redshift__no_svv_table_info_warning() }}\n {% endif %}\n\n {{ return(catalog.exclude(['table_id'])) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_base_catalog", "macro.dbt_redshift.redshift__can_select_from", "macro.dbt_redshift.redshift__get_extended_catalog", "macro.dbt_redshift.redshift__no_svv_table_info_warning"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.51998}, "macro.dbt_redshift.redshift__get_relations": {"unique_id": "macro.dbt_redshift.redshift__get_relations", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "name": "redshift__get_relations", "macro_sql": "{% macro redshift__get_relations () -%}\n {{ return(dbt.postgres__get_relations()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.520266}, "macro.dbt_redshift.dist": {"unique_id": "macro.dbt_redshift.dist", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "dist", "macro_sql": "{% macro dist(dist) %}\n {%- if dist is not none -%}\n {%- set dist = dist.strip().lower() -%}\n\n {%- if dist in ['all', 'even'] -%}\n diststyle {{ dist }}\n {%- elif dist == \"auto\" -%}\n {%- else -%}\n diststyle key distkey ({{ dist }})\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.530946}, "macro.dbt_redshift.sort": {"unique_id": "macro.dbt_redshift.sort", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "sort", "macro_sql": "{% macro sort(sort_type, sort) %}\n {%- if sort is not none %}\n {{ sort_type | default('compound', boolean=true) }} sortkey(\n {%- if sort is string -%}\n {%- set sort = [sort] -%}\n {%- endif -%}\n {%- for item in sort -%}\n {{ item }}\n {%- if not loop.last -%},{%- endif -%}\n {%- endfor -%}\n )\n {%- endif %}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.531469}, "macro.dbt_redshift.redshift__create_table_as": {"unique_id": "macro.dbt_redshift.redshift__create_table_as", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__create_table_as", "macro_sql": "{% macro redshift__create_table_as(temporary, relation, sql) -%}\n\n {%- set _dist = config.get('dist') -%}\n {%- set _sort_type = config.get(\n 'sort_type',\n validator=validation.any['compound', 'interleaved']) -%}\n {%- set _sort = config.get(\n 'sort',\n validator=validation.any[list, basestring]) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n {%- set backup = config.get('backup') -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {{ dist(_dist) }}\n {{ sort(_sort_type, _sort) }}\n {% if backup == false -%}backup no{%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.dist", "macro.dbt_redshift.sort"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.532544}, "macro.dbt_redshift.redshift__create_view_as": {"unique_id": "macro.dbt_redshift.redshift__create_view_as", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__create_view_as", "macro_sql": "{% macro redshift__create_view_as(relation, sql) -%}\n {%- set binding = config.get('bind', default=True) -%}\n\n {% set bind_qualifier = '' if binding else 'with no schema binding' %}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create view {{ relation }} as (\n {{ sql }}\n ) {{ bind_qualifier }};\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.533039}, "macro.dbt_redshift.redshift__create_schema": {"unique_id": "macro.dbt_redshift.redshift__create_schema", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__create_schema", "macro_sql": "{% macro redshift__create_schema(relation) -%}\n {{ postgres__create_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.533168}, "macro.dbt_redshift.redshift__drop_schema": {"unique_id": "macro.dbt_redshift.redshift__drop_schema", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__drop_schema", "macro_sql": "{% macro redshift__drop_schema(relation) -%}\n {{ postgres__drop_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.533294}, "macro.dbt_redshift.redshift__get_columns_in_relation": {"unique_id": "macro.dbt_redshift.redshift__get_columns_in_relation", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__get_columns_in_relation", "macro_sql": "{% macro redshift__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n with bound_views as (\n select\n ordinal_position,\n table_schema,\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from information_schema.\"columns\"\n where table_name = '{{ relation.identifier }}'\n ),\n\n unbound_views as (\n select\n ordinal_position,\n view_schema,\n col_name,\n case\n when col_type ilike 'character varying%' then\n 'character varying'\n when col_type ilike 'numeric%' then 'numeric'\n else col_type\n end as col_type,\n case\n when col_type like 'character%'\n then nullif(REGEXP_SUBSTR(col_type, '[0-9]+'), '')::int\n else null\n end as character_maximum_length,\n case\n when col_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(col_type, '[0-9,]+'), ',', 1),\n '')::int\n else null\n end as numeric_precision,\n case\n when col_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(col_type, '[0-9,]+'), ',', 2),\n '')::int\n else null\n end as numeric_scale\n\n from pg_get_late_binding_view_cols()\n cols(view_schema name, view_name name, col_name name,\n col_type varchar, ordinal_position int)\n where view_name = '{{ relation.identifier }}'\n ),\n\n external_views as (\n select\n columnnum,\n schemaname,\n columnname,\n case\n when external_type ilike 'character varying%' or external_type ilike 'varchar%'\n then 'character varying'\n when external_type ilike 'numeric%' then 'numeric'\n else external_type\n end as external_type,\n case\n when external_type like 'character%' or external_type like 'varchar%'\n then nullif(\n REGEXP_SUBSTR(external_type, '[0-9]+'),\n '')::int\n else null\n end as character_maximum_length,\n case\n when external_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(external_type, '[0-9,]+'), ',', 1),\n '')::int\n else null\n end as numeric_precision,\n case\n when external_type like 'numeric%'\n then nullif(\n SPLIT_PART(REGEXP_SUBSTR(external_type, '[0-9,]+'), ',', 2),\n '')::int\n else null\n end as numeric_scale\n from\n pg_catalog.svv_external_columns\n where\n schemaname = '{{ relation.schema }}'\n and tablename = '{{ relation.identifier }}'\n\n ),\n\n unioned as (\n select * from bound_views\n union all\n select * from unbound_views\n union all\n select * from external_views\n )\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from unioned\n {% if relation.schema %}\n where table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5340002}, "macro.dbt_redshift.redshift__list_relations_without_caching": {"unique_id": "macro.dbt_redshift.redshift__list_relations_without_caching", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__list_relations_without_caching", "macro_sql": "{% macro redshift__list_relations_without_caching(schema_relation) %}\n {{ return(postgres__list_relations_without_caching(schema_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5341609}, "macro.dbt_redshift.redshift__information_schema_name": {"unique_id": "macro.dbt_redshift.redshift__information_schema_name", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__information_schema_name", "macro_sql": "{% macro redshift__information_schema_name(database) -%}\n {{ return(postgres__information_schema_name(database)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5343091}, "macro.dbt_redshift.redshift__list_schemas": {"unique_id": "macro.dbt_redshift.redshift__list_schemas", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__list_schemas", "macro_sql": "{% macro redshift__list_schemas(database) -%}\n {{ return(postgres__list_schemas(database)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5344582}, "macro.dbt_redshift.redshift__check_schema_exists": {"unique_id": "macro.dbt_redshift.redshift__check_schema_exists", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__check_schema_exists", "macro_sql": "{% macro redshift__check_schema_exists(information_schema, schema) -%}\n {{ return(postgres__check_schema_exists(information_schema, schema)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.534629}, "macro.dbt_redshift.redshift__current_timestamp": {"unique_id": "macro.dbt_redshift.redshift__current_timestamp", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() -%}\n getdate()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.534705}, "macro.dbt_redshift.redshift__snapshot_get_time": {"unique_id": "macro.dbt_redshift.redshift__snapshot_get_time", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__snapshot_get_time", "macro_sql": "{% macro redshift__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.534809}, "macro.dbt_redshift.redshift__snapshot_string_as_time": {"unique_id": "macro.dbt_redshift.redshift__snapshot_string_as_time", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__snapshot_string_as_time", "macro_sql": "{% macro redshift__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp\" -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.535001}, "macro.dbt_redshift.redshift__make_temp_relation": {"unique_id": "macro.dbt_redshift.redshift__make_temp_relation", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__make_temp_relation", "macro_sql": "{% macro redshift__make_temp_relation(base_relation, suffix) %}\n {% do return(postgres__make_temp_relation(base_relation, suffix)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.535191}, "macro.dbt_redshift.redshift__persist_docs": {"unique_id": "macro.dbt_redshift.redshift__persist_docs", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__persist_docs", "macro_sql": "{% macro redshift__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {# Override: do not set column comments for LBVs #}\n {% set is_lbv = config.get('materialized') == 'view' and config.get('bind') == false %}\n {% if for_columns and config.persist_column_docs() and model.columns and not is_lbv %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.53602}, "macro.dbt_redshift.redshift__alter_relation_comment": {"unique_id": "macro.dbt_redshift.redshift__alter_relation_comment", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__alter_relation_comment", "macro_sql": "{% macro redshift__alter_relation_comment(relation, comment) %}\n {% do return(postgres__alter_relation_comment(relation, comment)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.536215}, "macro.dbt_redshift.redshift__alter_column_comment": {"unique_id": "macro.dbt_redshift.redshift__alter_column_comment", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__alter_column_comment", "macro_sql": "{% macro redshift__alter_column_comment(relation, column_dict) %}\n {% do return(postgres__alter_column_comment(relation, column_dict)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.536405}, "macro.dbt_redshift.redshift__alter_relation_add_remove_columns": {"unique_id": "macro.dbt_redshift.redshift__alter_relation_add_remove_columns", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "redshift__alter_relation_add_remove_columns", "macro_sql": "{% macro redshift__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns %}\n \n {% for column in add_columns %}\n {% set sql -%}\n alter {{ relation.type }} {{ relation }} add column {{ column.name }} {{ column.data_type }}\n {% endset %}\n {% do run_query(sql) %}\n {% endfor %}\n\n {% endif %}\n \n {% if remove_columns %}\n \n {% for column in remove_columns %}\n {% set sql -%}\n alter {{ relation.type }} {{ relation }} drop column {{ column.name }}\n {% endset %}\n {% do run_query(sql) %}\n {% endfor %}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.537156}, "macro.dbt_redshift.redshift__snapshot_merge_sql": {"unique_id": "macro.dbt_redshift.redshift__snapshot_merge_sql", "package_name": "dbt_redshift", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/redshift", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "name": "redshift__snapshot_merge_sql", "macro_sql": "{% macro redshift__snapshot_merge_sql(target, source, insert_cols) -%}\n {{ postgres__snapshot_merge_sql(target, source, insert_cols) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5375192}, "macro.dbt_postgres.postgres__get_catalog": {"unique_id": "macro.dbt_postgres.postgres__get_catalog", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n\n {%- call statement('catalog', fetch_result=True) -%}\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n\n where (\n {%- for schema in schemas -%}\n upper(sch.nspname) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table, [m]aterialized view\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5386932}, "macro.dbt_postgres.postgres_get_relations": {"unique_id": "macro.dbt_postgres.postgres_get_relations", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "name": "postgres_get_relations", "macro_sql": "{% macro postgres_get_relations () -%}\n\n {#\n -- in pg_depend, objid is the dependent, refobjid is the referenced object\n -- > a pg_depend entry indicates that the referenced object cannot be\n -- > dropped without also dropping the dependent object.\n #}\n\n {%- call statement('relations', fetch_result=True) -%}\n with relation as (\n select\n pg_rewrite.ev_class as class,\n pg_rewrite.oid as id\n from pg_rewrite\n ),\n class as (\n select\n oid as id,\n relname as name,\n relnamespace as schema,\n relkind as kind\n from pg_class\n ),\n dependency as (\n select\n pg_depend.objid as id,\n pg_depend.refobjid as ref\n from pg_depend\n ),\n schema as (\n select\n pg_namespace.oid as id,\n pg_namespace.nspname as name\n from pg_namespace\n where nspname != 'information_schema' and nspname not like 'pg\\_%'\n ),\n referenced as (\n select\n relation.id AS id,\n referenced_class.name ,\n referenced_class.schema ,\n referenced_class.kind\n from relation\n join class as referenced_class on relation.class=referenced_class.id\n where referenced_class.kind in ('r', 'v')\n ),\n relationships as (\n select\n referenced.name as referenced_name,\n referenced.schema as referenced_schema_id,\n dependent_class.name as dependent_name,\n dependent_class.schema as dependent_schema_id,\n referenced.kind as kind\n from referenced\n join dependency on referenced.id=dependency.id\n join class as dependent_class on dependency.ref=dependent_class.id\n where\n (referenced.name != dependent_class.name or\n referenced.schema != dependent_class.schema)\n )\n\n select\n referenced_schema.name as referenced_schema,\n relationships.referenced_name as referenced_name,\n dependent_schema.name as dependent_schema,\n relationships.dependent_name as dependent_name\n from relationships\n join schema as dependent_schema on relationships.dependent_schema_id=dependent_schema.id\n join schema as referenced_schema on relationships.referenced_schema_id=referenced_schema.id\n group by referenced_schema, referenced_name, dependent_schema, dependent_name\n order by referenced_schema, referenced_name, dependent_schema, dependent_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.539408}, "macro.dbt_postgres.postgres__create_table_as": {"unique_id": "macro.dbt_postgres.postgres__create_table_as", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n {%- set unlogged = config.get('unlogged', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}\n temporary\n {%- elif unlogged -%}\n unlogged\n {%- endif %} table {{ relation }}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.545485}, "macro.dbt_postgres.postgres__get_create_index_sql": {"unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n {%- set index_config = adapter.parse_index(index_dict) -%}\n {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n {%- set index_name = index_config.render(relation) -%}\n\n create {% if index_config.unique -%}\n unique\n {%- endif %} index if not exists\n \"{{ index_name }}\"\n on {{ relation }} {% if index_config.type -%}\n using {{ index_config.type }}\n {%- endif %}\n ({{ comma_separated_columns }});\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.54603}, "macro.dbt_postgres.postgres__create_schema": {"unique_id": "macro.dbt_postgres.postgres__create_schema", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier().include(database=False) }}\n {%- endcall -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5463731}, "macro.dbt_postgres.postgres__drop_schema": {"unique_id": "macro.dbt_postgres.postgres__drop_schema", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n {%- endcall -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.54672}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from {{ relation.information_schema('columns') }}\n where table_name = '{{ relation.identifier }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5472372}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.547652}, "macro.dbt_postgres.postgres__information_schema_name": {"unique_id": "macro.dbt_postgres.postgres__information_schema_name", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n {% if database_name -%}\n {{ adapter.verify_database(database_name) }}\n {%- endif -%}\n information_schema\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.547842}, "macro.dbt_postgres.postgres__list_schemas": {"unique_id": "macro.dbt_postgres.postgres__list_schemas", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n {% if database -%}\n {{ adapter.verify_database(database) }}\n {%- endif -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct nspname from pg_namespace\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.548227}, "macro.dbt_postgres.postgres__check_schema_exists": {"unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n {% if information_schema.database -%}\n {{ adapter.verify_database(information_schema.database) }}\n {%- endif -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n select count(*) from pg_namespace where nspname = '{{ schema }}'\n {% endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.54866}, "macro.dbt_postgres.postgres__current_timestamp": {"unique_id": "macro.dbt_postgres.postgres__current_timestamp", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5487401}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.548927}, "macro.dbt_postgres.postgres__snapshot_get_time": {"unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.549035}, "macro.dbt_postgres.postgres__make_temp_relation": {"unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix_length = suffix|length + dtstring|length %}\n {% set relation_max_name_length = 63 %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Temp relation suffix is too long (' ~ suffix|length ~ ' characters). Maximum length is ' ~ (relation_max_name_length - dtstring|length) ~ ' characters.') %}\n {% endif %}\n {% set tmp_identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix ~ dtstring %}\n {% do return(base_relation.incorporate(\n path={\n \"identifier\": tmp_identifier,\n \"schema\": none,\n \"database\": none\n })) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.550045}, "macro.dbt_postgres.postgres_escape_comment": {"unique_id": "macro.dbt_postgres.postgres_escape_comment", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n {% if comment is not string %}\n {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n {% endif %}\n {%- set magic = '$dbt_comment_literal_block$' -%}\n {%- if magic in comment -%}\n {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n {%- endif -%}\n {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5505228}, "macro.dbt_postgres.postgres__alter_relation_comment": {"unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on {{ relation.type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5507689}, "macro.dbt_postgres.postgres__alter_column_comment": {"unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% for column_name in column_dict if (column_name in existing_columns) %}\n {% set comment = column_dict[column_name]['description'] %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.551449}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "package_name": "dbt_postgres", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "name": "postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n update {{ target }}\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = {{ target }}.dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n and {{ target }}.dbt_valid_to is null;\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.552298}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5535529}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5537689}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.553925}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5540822}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.554236}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5547059}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.555037}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.555368}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.555902}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5561962}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.559867}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.56005}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.560288}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.560443}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.560549}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5613492}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.561603}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.56179}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n {%- if not target_exists -%}\n {# no table yet -> return whatever the query does #}\n {{ return([false, query_columns]) }}\n {%- endif -%}\n {# handle any schema changes #}\n {%- set target_table = node.get('alias', node.get('name')) -%}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=target_table) -%}\n {%- set existing_cols = get_columns_in_query('select * from ' ~ target_relation) -%}\n {%- set ns = namespace() -%} {# handle for-loop scoping with a namespace #}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(col) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return([ns.column_added, intersection]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.56289}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n \n {% set select_current_time -%}\n select {{ snapshot_get_time() }} as snapshot_start\n {%- endset %}\n\n {#-- don't access the column by name, to avoid dealing with casing issues on snowflake #}\n {%- set now = run_query(select_current_time)[0][0] -%}\n {% if now is none or now is undefined -%}\n {%- do exceptions.raise_compiler_error('Could not get a snapshot start time from the database') -%}\n {%- endif %}\n {% set updated_at = config.get('updated_at', snapshot_string_as_time(now)) %}\n\n {% set column_added = false %}\n\n {% if check_cols_config == 'all' %}\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists) %}\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {% set check_cols = check_cols_config %}\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n TRUE\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.run_query", "macro.dbt.snapshot_string_as_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.564975}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.568501}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.568811}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.568994}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.569085}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.56931}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select \n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n \n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n \n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.570293}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.570501}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.570781}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, tmp_relation, select) }}\n {% endcall %}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5712562}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n\n {% if not adapter.check_schema_exists(model.database, model.schema) %}\n {% do create_schema(model.database, model.schema) %}\n {% endif %}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_sql']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_schema", "macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.577869}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n \n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n \n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n \n {% do relations.append(target_relation) %}\n \n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n \n {{ adapter.commit() }}\n \n {% else %}\n\n {% set main_sql = sql %}\n \n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n \n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.580221}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.580792}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5811598}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.581643}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5820642}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n \n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5830028}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n \n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n \n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.583622}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n \n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }} \n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5843189}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.587446}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{ predicates | join(' and ') }}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.588756}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.58902}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key is not none %}\n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5895019}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5897942}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.590505}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5912662}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n {% set unique_key = config.get('unique_key') %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + \"__dbt_backup\" %}\n\n -- the intermediate_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {% set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) %} \n {% set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {# -- first check whether we want to full refresh for source view or config reasons #}\n {% set trigger_full_refresh = (full_refresh_mode or existing_relation.is_view) %}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n{% elif trigger_full_refresh %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + '__dbt_backup' %}\n {% set intermediate_relation = existing_relation.incorporate(path={\"identifier\": tmp_identifier}) %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n\n {% set build_sql = create_table_as(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %} \n {% do adapter.rename_relation(target_relation, backup_relation) %} \n {% do adapter.rename_relation(intermediate_relation, target_relation) %} \n {% endif %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.5967271}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n \n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n \n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n \n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6020942}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n \n {% set schema_changed = False %}\n \n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n \n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n \n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6034648}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n \n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n \n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %} \n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n \n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n \n {% do log(schema_change_message) %}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.604806}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n \n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n \n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n \n {% if schema_changes_dict['schema_changed'] %}\n \n {% if on_schema_change == 'fail' %}\n \n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways: \n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n {% endset %}\n \n {% do exceptions.raise_compiler_error(fail_msg) %}\n \n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n \n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {% endif %}\n \n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6056151}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.609767}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6102989}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.610501}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.610721}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n \n {{ sql_header if sql_header is not none }}\n \n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6111748}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, database=database, type='view') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"old_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the old_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the old_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema, database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ create_view_as(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_view_as", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.615086}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.61549}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6157382}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.617107}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.617562}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.617738}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.617934}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.618222}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set agate_table = load_agate_table() -%}\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ create_table_sql }};\n -- dbt seed --\n {{ sql }}\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6214762}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.625996}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.627006}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6272619}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.627794}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.627947}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6280708}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6282392}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.62836}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.628882}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6290822}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.63043}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.630913}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.63116}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.631798}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.632087}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6323981}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6328971}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6331708}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.633616}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\nselect *\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.633871}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6342}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6349518}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.636226}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.636867}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6371891}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.639165}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partiton start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6404889}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6413288}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.641582}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.642059}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.642259}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6424372}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.642634}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.643191}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.64334}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6435132}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.643948}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.645746}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {% set tmp_identifier = base_relation.identifier ~ suffix %}\n {% set tmp_relation = base_relation.incorporate(\n path={\"identifier\": tmp_identifier}) -%}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.64608}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6462789}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.646508}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.646705}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6468742}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6471648}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6474712}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6477451}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.648366}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6486201}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6488268}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6493912}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter '+adapter.type()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.649549}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6497972}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.65026}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.651047}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.651231}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.651453}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.651632}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6519291}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.652458}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.654089}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.654369}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.654576}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.654741}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.65494}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.655212}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6554399}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.655843}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.656042}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.656217}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.658127}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.658298}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.658638}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6588538}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.659248}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6595001}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.660164}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_redshift.redshift__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.660442}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n \n {% set sql -%}\n \n alter {{ relation.type }} {{ relation }}\n \n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n \n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n \n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.661312}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.661937}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.662188}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6625001}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.662805}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.663148}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.663224}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.663299}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt_utils') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6637251}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n \n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.663903}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt_utils')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.664237}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6643672}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.665157}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6653068}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "redshift__type_string", "macro_sql": "\n\n{%- macro redshift__type_string() -%}\n varchar\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.665382}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_string", "macro_sql": "{% macro postgres__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.665458}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_string", "macro_sql": "{% macro snowflake__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.665529}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.665705}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.66578}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() %}\n timestamp without time zone\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6658518}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() %}\n timestamp_ntz\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.665924}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6660962}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n float\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.666173}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_float", "macro_sql": "{% macro bigquery__type_float() %}\n float64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.666243}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.666417}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n numeric(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.666493}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_numeric", "macro_sql": "{% macro bigquery__type_numeric() %}\n numeric\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.666564}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6667361}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n bigint\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.666813}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_bigint", "macro_sql": "{% macro bigquery__type_bigint() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6668842}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6670568}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_int", "macro_sql": "{% macro default__type_int() %}\n int\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.66713}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_int", "macro_sql": "{% macro bigquery__type_int() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6672032}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_relation.sql", "original_file_path": "macros/cross_db_utils/_is_relation.sql", "name": "_is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6677508}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.668139}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n \n length(\n {{ expression }}\n )\n \n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.66825}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6683578}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt_utils')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6692579}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.669437}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.66961}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.669777}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "redshift__dateadd", "macro_sql": "{% macro redshift__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ return(dbt_utils.default__dateadd(datepart, interval, from_date_or_timestamp)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6699898}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.670329}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.670424}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6704981}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.670933}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.671083}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "snowflake__escape_single_quotes", "macro_sql": "{% macro snowflake__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6712298}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.671375}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt_utils') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6720178}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.672161}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.672328}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "snowflake__right", "macro_sql": "{% macro snowflake__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n right(\n {{ string_text }},\n {{ length_expression }}\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.672498}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt_utils') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.675016}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6754649}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6757681}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n \n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.676192}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "redshift__listagg", "macro_sql": "{% macro redshift__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n {% set ns = namespace() %}\n {% set ns.delimiter_text_regex = delimiter_text|trim(\"'\") %}\n {% set special_chars %}\\,^,$,.,|,?,*,+,(,),[,],{,}{% endset %} \n {%- for char in special_chars.split(',') -%}\n {% set escape_char %}\\\\{{ char }}{% endset %}\n {% set ns.delimiter_text_regex = ns.delimiter_text_regex|replace(char,escape_char) %}\n {%- endfor -%}\n\n {% set regex %}'([^{{ ns.delimiter_text_regex }}]+{{ ns.delimiter_text_regex }}){1,{{ limit_num - 1}}}[^{{ ns.delimiter_text_regex }}]+'{% endset %}\n regexp_substr(\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,{{ regex }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6773171}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt_utils')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.680162}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6803389}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6805089}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6824331}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "redshift__datediff", "macro_sql": "{% macro redshift__datediff(first_date, second_date, datepart) -%}\n\n {{ return(dbt_utils.default__datediff(first_date, second_date, datepart)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.682658}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt_utils') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6831129}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.683261}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "snowflake__safe_cast", "macro_sql": "{% macro snowflake__safe_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.683396}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.683533}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt_utils') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6839092}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{field}} as {{dbt_utils.type_string()}}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.684055}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt_utils.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6841972}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt_utils') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6846}, "macro.dbt_utils.default__cast_bool_to_text": {"unique_id": "macro.dbt_utils.default__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.684753}, "macro.dbt_utils.redshift__cast_bool_to_text": {"unique_id": "macro.dbt_utils.redshift__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "redshift__cast_bool_to_text", "macro_sql": "{% macro redshift__cast_bool_to_text(field) %}\n case\n when {{ field }} is true then 'true'\n when {{ field }} is false then 'false'\n end::text\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.684885}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "identifier", "macro_sql": "{% macro identifier(value) %}\t\n {%- set error_message = '\n Warning: the `identifier` macro is no longer supported and will be deprecated in a future release of dbt-utils. \\\n Use `adapter.quote` instead. The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {{ return(adapter.dispatch('identifier', 'dbt_utils') (value)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.685462}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "default__identifier", "macro_sql": "{% macro default__identifier(value) -%}\t\n \"{{ value }}\"\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6855738}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "bigquery__identifier", "macro_sql": "{% macro bigquery__identifier(value) -%}\t\n `{{ value }}`\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.685678}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6860511}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n \n any_value({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6861591}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n {#- /*Postgres doesn't support any_value, so we're using min() to get the same result*/ -#}\n min({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.686269}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt_utils') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6867259}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6869419}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n \n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.687084}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt_utils') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6874151}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.687522}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ return(adapter.dispatch('current_timestamp', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.688171}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() %}\n current_timestamp::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.68829}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() %}\n getdate()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.688364}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() %}\n current_timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.688441}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp_in_utc", "macro_sql": "{% macro current_timestamp_in_utc() -%}\n {{ return(adapter.dispatch('current_timestamp_in_utc', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6886148}, "macro.dbt_utils.default__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.default__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp_in_utc", "macro_sql": "{% macro default__current_timestamp_in_utc() %}\n {{dbt_utils.current_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.688734}, "macro.dbt_utils.snowflake__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.snowflake__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "snowflake__current_timestamp_in_utc", "macro_sql": "{% macro snowflake__current_timestamp_in_utc() %}\n convert_timezone('UTC', {{dbt_utils.current_timestamp()}})::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6888902}, "macro.dbt_utils.postgres__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.postgres__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "postgres__current_timestamp_in_utc", "macro_sql": "{% macro postgres__current_timestamp_in_utc() %}\n (current_timestamp at time zone 'utc')::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.689009}, "macro.dbt_utils.redshift__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.redshift__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp_in_utc", "macro_sql": "{% macro redshift__current_timestamp_in_utc() %}\n {{ return(dbt_utils.default__current_timestamp_in_utc()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.689149}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.690721}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }},\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6912398}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is exactly at the bucket edge\n case\n when\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }} %\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.691754}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.691961}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.692384}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n \n bool_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6924958}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "snowflake__bool_or", "macro_sql": "{% macro snowflake__bool_or(expression) -%}\n \n boolor_agg({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6926012}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n \n logical_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.692704}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt_utils') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.redshift__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.693355}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd(datepart, '1', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.693718}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.693874}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd('month', '3', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc", "macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.6943018}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "redshift__last_day", "macro_sql": "{% macro redshift__last_day(date, datepart) %}\n\n {{ return(dbt_utils.default__last_day(date, datepart)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.694495}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt_utils') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.695015}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.695189}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.695379}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt_utils') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.695811}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.695947}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.696086}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_ephemeral.sql", "original_file_path": "macros/cross_db_utils/_is_ephemeral.sql", "name": "_is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.69705}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_boundaries", "macro_sql": "{% macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n {{ return(adapter.dispatch('get_period_boundaries', 'dbt_utils')(target_schema, target_table, timestamp_field, start_date, stop_date, period)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_boundaries"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.703393}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_boundaries", "macro_sql": "{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n\n {% call statement('period_boundaries', fetch_result=True) -%}\n with data as (\n select\n coalesce(max(\"{{timestamp_field}}\"), '{{start_date}}')::timestamp as start_timestamp,\n coalesce(\n {{dbt_utils.dateadd('millisecond',\n -1,\n \"nullif('\" ~ stop_date ~ \"','')::timestamp\")}},\n {{dbt_utils.current_timestamp()}}\n ) as stop_timestamp\n from \"{{target_schema}}\".\"{{target_table}}\"\n )\n\n select\n start_timestamp,\n stop_timestamp,\n {{dbt_utils.datediff('start_timestamp',\n 'stop_timestamp',\n period)}} + 1 as num_periods\n from data\n {%- endcall %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.703956}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_sql", "macro_sql": "{% macro get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n {{ return(adapter.dispatch('get_period_sql', 'dbt_utils')(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.704314}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_sql", "macro_sql": "{% macro default__get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n\n {%- set period_filter -%}\n (\"{{timestamp_field}}\" > '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' and\n \"{{timestamp_field}}\" <= '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' + interval '1 {{period}}' and\n \"{{timestamp_field}}\" < '{{stop_timestamp}}'::timestamp)\n {%- endset -%}\n\n {%- set filtered_sql = sql | replace(\"__PERIOD_FILTER__\", period_filter) -%}\n\n select\n {{target_cols_csv}}\n from (\n {{filtered_sql}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.704858}, "macro.dbt_utils.materialization_insert_by_period_default": {"unique_id": "macro.dbt_utils.materialization_insert_by_period_default", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "materialization_insert_by_period_default", "macro_sql": "{% materialization insert_by_period, default -%}\n {%- set timestamp_field = config.require('timestamp_field') -%}\n {%- set start_date = config.require('start_date') -%}\n {%- set stop_date = config.get('stop_date') or '' -%}\n {%- set period = config.get('period') or 'week' -%}\n\n {%- if sql.find('__PERIOD_FILTER__') == -1 -%}\n {%- set error_message -%}\n Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql\n {%- endset -%}\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- set identifier = model['name'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, type='table') -%}\n\n {%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n\n {%- set should_truncate = (non_destructive_mode and full_refresh_mode and exists_as_table) -%}\n {%- set should_drop = (not should_truncate and (full_refresh_mode or exists_not_as_table)) -%}\n {%- set force_create = (flags.FULL_REFRESH and not flags.NON_DESTRUCTIVE) -%}\n\n -- setup\n {% if old_relation is none -%}\n -- noop\n {%- elif should_truncate -%}\n {{adapter.truncate_relation(old_relation)}}\n {%- elif should_drop -%}\n {{adapter.drop_relation(old_relation)}}\n {%- set old_relation = none -%}\n {%- endif %}\n\n {{run_hooks(pre_hooks, inside_transaction=False)}}\n\n -- `begin` happens here, so `commit` after it to finish the transaction\n {{run_hooks(pre_hooks, inside_transaction=True)}}\n {% call statement() -%}\n begin; -- make extra sure we've closed out the transaction\n commit;\n {%- endcall %}\n\n -- build model\n {% if force_create or old_relation is none -%}\n {# Create an empty target table -#}\n {% call statement('main') -%}\n {%- set empty_sql = sql | replace(\"__PERIOD_FILTER__\", 'false') -%}\n {{create_table_as(False, target_relation, empty_sql)}}\n {%- endcall %}\n {%- endif %}\n\n {% set _ = dbt_utils.get_period_boundaries(schema,\n identifier,\n timestamp_field,\n start_date,\n stop_date,\n period) %}\n {%- set start_timestamp = load_result('period_boundaries')['data'][0][0] | string -%}\n {%- set stop_timestamp = load_result('period_boundaries')['data'][0][1] | string -%}\n {%- set num_periods = load_result('period_boundaries')['data'][0][2] | int -%}\n\n {% set target_columns = adapter.get_columns_in_relation(target_relation) %}\n {%- set target_cols_csv = target_columns | map(attribute='quoted') | join(', ') -%}\n {%- set loop_vars = {'sum_rows_inserted': 0} -%}\n\n -- commit each period as a separate transaction\n {% for i in range(num_periods) -%}\n {%- set msg = \"Running for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}\n {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, type='table') -%}\n {% call statement() -%}\n {% set tmp_table_sql = dbt_utils.get_period_sql(target_cols_csv,\n sql,\n timestamp_field,\n period,\n start_timestamp,\n stop_timestamp,\n i) %}\n {{dbt.create_table_as(True, tmp_relation, tmp_table_sql)}}\n {%- endcall %}\n\n {{adapter.expand_target_column_types(from_relation=tmp_relation,\n to_relation=target_relation)}}\n {%- set name = 'main-' ~ i -%}\n {% call statement(name, fetch_result=True) -%}\n insert into {{target_relation}} ({{target_cols_csv}})\n (\n select\n {{target_cols_csv}}\n from {{tmp_relation.include(schema=False)}}\n );\n {%- endcall %}\n {% set result = load_result('main-' ~ i) %}\n {% if 'response' in result.keys() %} {# added in v0.19.0 #}\n {% set rows_inserted = result['response']['rows_affected'] %}\n {% else %} {# older versions #}\n {% set rows_inserted = result['status'].split(\" \")[2] | int %}\n {% endif %}\n \n {%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}\n {%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}\n\n {%- set msg = \"Ran for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) ~ \"; \" ~ rows_inserted ~ \" records inserted\" -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- endfor %}\n\n {% call statement() -%}\n begin;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=True)}}\n\n {% call statement() -%}\n commit;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=False)}}\n\n {%- set status_string = \"INSERT \" ~ loop_vars['sum_rows_inserted'] -%}\n\n {% call noop_statement('main', status_string) -%}\n -- no-op\n {%- endcall %}\n\n -- Return the relations created in this materialization\n {{ return({'relations': [target_relation]}) }} \n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_utils.get_period_boundaries", "macro.dbt_utils.log_info", "macro.dbt_utils.get_period_sql", "macro.dbt.noop_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.710558}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.711083}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt_utils.split_part(\n dbt_utils.split_part(\n dbt_utils.replace(\n dbt_utils.replace(\n dbt_utils.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt_utils.safe_cast(\n parsed,\n dbt_utils.type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part", "macro.dbt_utils.replace", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.711633}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.712218}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url = \n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{dbt_utils.position(\"'/'\", stripped_url)}}, 0),\n {{dbt_utils.position(\"'?'\", stripped_url)}} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt_utils.split_part(\n dbt_utils.right(\n stripped_url, \n dbt_utils.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ), \n \"'?'\", 1\n )\n -%}\n\n {{ dbt_utils.safe_cast(\n parsed_path,\n dbt_utils.type_string()\n )}}\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt_utils.position", "macro.dbt_utils.split_part", "macro.dbt_utils.right", "macro.dbt_utils.length", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.712943}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7133582}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt_utils.split_part(dbt_utils.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.713709}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7143428}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model) %}\n\n{{ config(fail_calc = 'coalesce(row_count_delta, 0)') }}\n\nwith a as (\n\n select count(*) as count_our_model from {{ model }}\n\n),\nb as (\n\n select count(*) as count_comparison_model from {{ compare_model }}\n\n),\ncounts as (\n\n select\n count_our_model,\n count_comparison_model\n from a\n cross join b\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.714588}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7150662}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'coalesce(diff_count, 0)') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\nwith a as (\n\n select count(*) as count_a from {{ model }}\n\n),\nb as (\n\n select count(*) as count_b from {{ compare_model }}\n\n),\nfinal as (\n\n select\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n from a\n cross join b\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.715392}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7161448}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.716518}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.717016}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval) %}\n\n{% set threshold = dbt_utils.dateadd(datepart, interval * -1, dbt_utils.current_timestamp()) %}\n\nwith recency as (\n\n select max({{field}}) as most_recent\n from {{ model }}\n\n)\n\nselect\n\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.717376}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "test_not_constant", "macro_sql": "{% test not_constant(model, column_name) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.717782}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name) %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.717968}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7186859}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7192051}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.719854}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7203379}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "test_unique_where", "macro_sql": "{% test unique_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.unique_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `unique` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_unique_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7208478}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "default__test_unique_where", "macro_sql": "{% macro default__test_unique_where(model, column_name) %}\r\n {{ return(test_unique(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.72103}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7214432}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name) %}\n\nselect *\nfrom (\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count({{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.721632}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.722352}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.723064}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.72371}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt_utils.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt_utils.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7240891}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.724656}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n *\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.724975}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.725507}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\nwith validation as (\n select\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as numeric) as not_null_proportion\n from {{ model }}\n),\nvalidation_errors as (\n select\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.726096}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart)) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7268748}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\nwith windowed as (\n\n select\n {{ column_name }},\n lag({{ column_name }}) over (\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt_utils.type_timestamp() }})= cast({{ dbt_utils.dateadd(datepart, interval, previous_column_name) }} as {{ dbt_utils.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.727561}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "test_not_null_where", "macro_sql": "{% test not_null_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.not_null_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `not_null` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_not_null_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.728082}, "macro.dbt_utils.default__test_not_null_where": {"unique_id": "macro.dbt_utils.default__test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "default__test_not_null_where", "macro_sql": "{% macro default__test_not_null_where(model, column_name) %}\r\n {{ return(test_not_null(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7282639}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.729093}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.730146}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.733504}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions nore cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.735157}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7355242}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7357051}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.736074}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.736288}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.73663}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7368162}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.737387}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.738184}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{dbt_utils.datediff(start_date, end_date, datepart)}}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.73884}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.739091}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt_utils.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7394931}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.739907}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.740288}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7410738}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.742093}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7430441}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.743501}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.743712}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.744282}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7450712}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.746021}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.746528}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.746838}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.747553}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('*') }}\n {% endif %}\n\n {%- for col in dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n\n {%- endfor -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.748488}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.750428}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n\n {% if table %}\n {%- set error_message = '\n Warning: the `unpivot` macro no longer accepts a `table` parameter. \\\n This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead. \\\n The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {% endif %}\n\n {% if relation and table %}\n {{ exceptions.raise_compiler_error(\"Error: both the `relation` and `table` parameters were provided to `unpivot` macro. Choose one only (we recommend `relation`).\") }}\n {% elif not relation and table %}\n {% set relation=table %}\n {% elif not relation and not table %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt_utils.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt_utils.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.type_string", "macro.dbt_utils.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.752752}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.755282}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt_utils.string_literal(relation) }} as {{ dbt_utils.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7583601}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7587478}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.759017}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, group_by, order_by=order_by, relation_alias=relation_alias)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7598138}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n\n select\n {{ dbt_utils.star(relation, relation_alias='deduped') | indent }}\n from (\n select\n _inner.*,\n row_number() over (\n partition by {{ group_by }}\n {% if order_by is not none -%}\n order by {{ order_by }}\n {%- endif %}\n ) as rn\n from {{ relation if relation_alias is none else relation_alias }} as _inner\n ) as deduped\n where deduped.rn = 1\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7602508}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n\n select\n {{ dbt_utils.star(relation, relation_alias='deduped') | indent }}\n from (\n select\n array_agg (\n original\n {% if order_by is not none -%}\n order by {{ order_by }}\n {%- endif %}\n limit 1\n )[offset(0)] as deduped\n from {{ relation if relation_alias is none else relation_alias }} as original\n group by {{ group_by }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.760687}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.761374}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- if varargs|length >= 1 or field_list is string %}\n\n{%- set error_message = '\nWarning: the `surrogate_key` macro now takes a single list argument instead of \\\nmultiple string arguments. Support for multiple string arguments will be \\\ndeprecated in a future release of dbt-utils. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{# first argument is not included in varargs, so add first element to field_list_xf #}\n{%- set field_list_xf = [field_list] -%}\n\n{%- for field in varargs %}\n{%- set _ = field_list_xf.append(field) -%}\n{%- endfor -%}\n\n{%- else -%}\n\n{# if using list, just set field_list_xf as field_list #}\n{%- set field_list_xf = field_list -%}\n\n{%- endif -%}\n\n\n{%- set fields = [] -%}\n\n{%- for field in field_list_xf -%}\n\n {%- set _ = fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt_utils.type_string() ~ \"), '')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- set _ = fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{dbt_utils.hash(dbt_utils.concat(fields))}}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.hash", "macro.dbt_utils.concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7624059}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add() -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(*varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.762887}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add() -%}\n\n{% set fields = [] %}\n\n{%- for field in varargs -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7631922}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7636218}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7639859}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7656891}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7659872}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.766777}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7674098}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.768515}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.770085}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.771286}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt_utils.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.772227}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.77279}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('') }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.773622}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.774108}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.774764}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.77532}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.775414}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7755089}, "macro.dbt_utils.bigquery__get_table_types_sql": {"unique_id": "macro.dbt_utils.bigquery__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "bigquery__get_table_types_sql", "macro_sql": "{% macro bigquery__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as `table_type`\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.775597}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.776762}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.77708}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.777733}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.778702}, "macro.snowplow_web.web_cluster_by_fields_sessions_lifecycle": {"unique_id": "macro.snowplow_web.web_cluster_by_fields_sessions_lifecycle", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "web_cluster_by_fields_sessions_lifecycle", "macro_sql": "{% macro web_cluster_by_fields_sessions_lifecycle() %}\n\n {{ return(adapter.dispatch('web_cluster_by_fields_sessions_lifecycle', 'snowplow_web')()) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_web.default__web_cluster_by_fields_sessions_lifecycle"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7795231}, "macro.snowplow_web.default__web_cluster_by_fields_sessions_lifecycle": {"unique_id": "macro.snowplow_web.default__web_cluster_by_fields_sessions_lifecycle", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "default__web_cluster_by_fields_sessions_lifecycle", "macro_sql": "{% macro default__web_cluster_by_fields_sessions_lifecycle() %}\n\n {{ return(snowplow_utils.get_cluster_by(bigquery_cols=[\"session_id\"], snowflake_cols=[\"to_date(start_tstamp)\"])) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.779742}, "macro.snowplow_web.web_cluster_by_fields_page_views": {"unique_id": "macro.snowplow_web.web_cluster_by_fields_page_views", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "web_cluster_by_fields_page_views", "macro_sql": "{% macro web_cluster_by_fields_page_views() %}\n\n {{ return(adapter.dispatch('web_cluster_by_fields_page_views', 'snowplow_web')()) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_web.default__web_cluster_by_fields_page_views"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.779926}, "macro.snowplow_web.default__web_cluster_by_fields_page_views": {"unique_id": "macro.snowplow_web.default__web_cluster_by_fields_page_views", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "default__web_cluster_by_fields_page_views", "macro_sql": "{% macro default__web_cluster_by_fields_page_views() %}\n\n {{ return(snowplow_utils.get_cluster_by(bigquery_cols=[\"domain_userid\",\"domain_sessionid\"], snowflake_cols=[\"to_date(start_tstamp)\"])) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.780156}, "macro.snowplow_web.web_cluster_by_fields_sessions": {"unique_id": "macro.snowplow_web.web_cluster_by_fields_sessions", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "web_cluster_by_fields_sessions", "macro_sql": "{% macro web_cluster_by_fields_sessions() %}\n\n {{ return(adapter.dispatch('web_cluster_by_fields_sessions', 'snowplow_web')()) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_web.default__web_cluster_by_fields_sessions"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.780339}, "macro.snowplow_web.default__web_cluster_by_fields_sessions": {"unique_id": "macro.snowplow_web.default__web_cluster_by_fields_sessions", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "default__web_cluster_by_fields_sessions", "macro_sql": "{% macro default__web_cluster_by_fields_sessions() %}\n\n {{ return(snowplow_utils.get_cluster_by(bigquery_cols=[\"domain_userid\"], snowflake_cols=[\"to_date(start_tstamp)\"])) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.780558}, "macro.snowplow_web.web_cluster_by_fields_users": {"unique_id": "macro.snowplow_web.web_cluster_by_fields_users", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "web_cluster_by_fields_users", "macro_sql": "{% macro web_cluster_by_fields_users() %}\n\n {{ return(adapter.dispatch('web_cluster_by_fields_users', 'snowplow_web')()) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_web.default__web_cluster_by_fields_users"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.780739}, "macro.snowplow_web.default__web_cluster_by_fields_users": {"unique_id": "macro.snowplow_web.default__web_cluster_by_fields_users", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/cluster_by_fields.sql", "original_file_path": "macros/cluster_by_fields.sql", "name": "default__web_cluster_by_fields_users", "macro_sql": "{% macro default__web_cluster_by_fields_users() %}\n\n {{ return(snowplow_utils.get_cluster_by(bigquery_cols=[\"user_id\",\"domain_userid\"], snowflake_cols=[\"to_date(start_tstamp)\"])) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_cluster_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7809658}, "macro.snowplow_web.stitch_user_identifiers": {"unique_id": "macro.snowplow_web.stitch_user_identifiers", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/stitch_user_identifiers.sql", "original_file_path": "macros/stitch_user_identifiers.sql", "name": "stitch_user_identifiers", "macro_sql": "{% macro stitch_user_identifiers(enabled, relation=this, user_mapping_relation=ref('snowplow_web_user_mapping')) %} \n \n {% if enabled %}\n \n -- Update sessions table with mapping\n update {{ relation }} as s\n set stitched_user_id = um.user_id\n from {{ user_mapping_relation }} as um\n where s.domain_userid = um.domain_userid;\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.781394}, "macro.snowplow_web.allow_refresh": {"unique_id": "macro.snowplow_web.allow_refresh", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/allow_refresh.sql", "original_file_path": "macros/allow_refresh.sql", "name": "allow_refresh", "macro_sql": "{% macro allow_refresh() %}\n {{ return(adapter.dispatch('allow_refresh', 'snowplow_web')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_web.default__allow_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.781843}, "macro.snowplow_web.default__allow_refresh": {"unique_id": "macro.snowplow_web.default__allow_refresh", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/allow_refresh.sql", "original_file_path": "macros/allow_refresh.sql", "name": "default__allow_refresh", "macro_sql": "{% macro default__allow_refresh() %}\n \n {% set allow_refresh = snowplow_utils.get_value_by_target(\n dev_value=none,\n default_value=var('snowplow__allow_refresh'),\n dev_target_name=var('snowplow__dev_target_name')\n ) %}\n\n {{ return(allow_refresh) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_value_by_target"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.7821498}, "macro.snowplow_web.iab_fields": {"unique_id": "macro.snowplow_web.iab_fields", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/bigquery/page_view_contexts.sql", "original_file_path": "macros/bigquery/page_view_contexts.sql", "name": "iab_fields", "macro_sql": "{% macro iab_fields() %}\n \n {% set iab_fields = [\n {'field':'category', 'dtype':'string'},\n {'field':'primary_impact', 'dtype':'string'},\n {'field':'reason', 'dtype':'string'},\n {'field':'spider_or_robot', 'dtype':'boolean'}\n ] %}\n\n {{ return(iab_fields) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.783807}, "macro.snowplow_web.ua_fields": {"unique_id": "macro.snowplow_web.ua_fields", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/bigquery/page_view_contexts.sql", "original_file_path": "macros/bigquery/page_view_contexts.sql", "name": "ua_fields", "macro_sql": "{% macro ua_fields() %}\n \n {% set ua_fields = [\n {'field': 'useragent_family', 'dtype': 'string'},\n {'field': 'useragent_major', 'dtype': 'string'},\n {'field': 'useragent_minor', 'dtype': 'string'},\n {'field': 'useragent_patch', 'dtype': 'string'},\n {'field': 'useragent_version', 'dtype': 'string'},\n {'field': 'os_family', 'dtype': 'string'},\n {'field': 'os_major', 'dtype': 'string'},\n {'field': 'os_minor', 'dtype': 'string'},\n {'field': 'os_patch', 'dtype': 'string'},\n {'field': 'os_patch_minor', 'dtype': 'string'},\n {'field': 'os_version', 'dtype': 'string'},\n {'field': 'device_family', 'dtype': 'string'}\n ] %}\n\n {{ return(ua_fields) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.784895}, "macro.snowplow_web.yauaa_fields": {"unique_id": "macro.snowplow_web.yauaa_fields", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "macros/bigquery/page_view_contexts.sql", "original_file_path": "macros/bigquery/page_view_contexts.sql", "name": "yauaa_fields", "macro_sql": "{% macro yauaa_fields() %}\n \n {% set yauaa_fields = [\n {'field': 'device_class', 'dtype': 'string'},\n {'field': 'agent_class', 'dtype': 'string'},\n {'field': 'agent_name', 'dtype': 'string'},\n {'field': 'agent_name_version', 'dtype': 'string'},\n {'field': 'agent_name_version_major', 'dtype': 'string'},\n {'field': 'agent_version', 'dtype': 'string'},\n {'field': 'agent_version_major', 'dtype': 'string'},\n {'field': 'device_brand', 'dtype': 'string'},\n {'field': 'device_name', 'dtype': 'string'},\n {'field': 'device_version', 'dtype': 'string'},\n {'field': 'layout_engine_class', 'dtype': 'string'},\n {'field': 'layout_engine_name', 'dtype': 'string'},\n {'field': 'layout_engine_name_version', 'dtype': 'string'},\n {'field': 'layout_engine_name_version_major', 'dtype': 'string'},\n {'field': 'layout_engine_version', 'dtype': 'string'},\n {'field': 'layout_engine_version_major', 'dtype': 'string'},\n {'field': 'operating_system_class', 'dtype': 'string'},\n {'field': 'operating_system_name', 'dtype': 'string'},\n {'field': 'operating_system_name_version', 'dtype': 'string'},\n {'field': 'operating_system_version', 'dtype': 'string'}\n ] %}\n\n {{ return(yauaa_fields) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.786772}, "macro.snowplow_utils.materialization_snowplow_incremental_default": {"unique_id": "macro.snowplow_utils.materialization_snowplow_incremental_default", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/default/snowplow_incremental.sql", "original_file_path": "macros/materializations/snowplow_incremental/default/snowplow_incremental.sql", "name": "materialization_snowplow_incremental_default", "macro_sql": "{% materialization snowplow_incremental, default -%}\n\n {% set full_refresh_mode = flags.FULL_REFRESH %}\n\n {# Required keys. Throws error if not present #}\n {%- set unique_key = config.require('unique_key') -%}\n {%- set upsert_date_key = config.require('upsert_date_key') -%}\n \n {% set disable_upsert_lookback = config.get('disable_upsert_lookback') %}\n\n {% set target_relation = this %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(this) %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif existing_relation.is_view or full_refresh_mode %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set backup_identifier = existing_relation.identifier ~ \"__dbt_backup\" %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n {% do adapter.drop_relation(backup_relation) %}\n\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {%- set dest_columns = adapter.get_columns_in_relation(target_relation) -%}\n {% set build_sql = snowplow_utils.snowplow_delete_insert(\n tmp_relation,\n target_relation,\n unique_key,\n upsert_date_key,\n dest_columns,\n disable_upsert_lookback) %}\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.snowplow_utils.snowplow_delete_insert", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.79053}, "macro.snowplow_utils.materialization_snowplow_incremental_bigquery": {"unique_id": "macro.snowplow_utils.materialization_snowplow_incremental_bigquery", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/bigquery/snowplow_incremental.sql", "original_file_path": "macros/materializations/snowplow_incremental/bigquery/snowplow_incremental.sql", "name": "materialization_snowplow_incremental_bigquery", "macro_sql": "{% materialization snowplow_incremental, adapter='bigquery' -%}\n\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {# Required keys. Throws error if not present #}\n {%- set unique_key = config.require('unique_key') -%}\n {%- set raw_partition_by = config.require('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n\n {# Raise error if dtype is int64. Unsupported. #}\n {% if partition_by.data_type == 'int64' %}\n {%- set wrong_dtype_message -%}\n Datatype int64 is not supported by 'snowplow_incremental'\n Please use one of the following: timestamp | date | datetime\n {%- endset -%}\n {% do exceptions.raise_compiler_error(wrong_dtype_message) %}\n {% endif %}\n\n {% set disable_upsert_lookback = config.get('disable_upsert_lookback') %}\n\n {%- set target_relation = this %}\n {%- set existing_relation = load_relation(this) %}\n {%- set tmp_relation = make_temp_relation(this) %}\n\n {# Validate early so we don't run SQL if the strategy is invalid or missing keys #}\n {% set strategy = snowplow_utils.snowplow_validate_get_incremental_strategy(config) -%}\n\n {%- set cluster_by = config.get('cluster_by', none) -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif existing_relation.is_view %}\n {#-- There's no way to atomically replace a view with a table on BQ --#}\n {{ adapter.drop_relation(existing_relation) }}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {#-- If the partition/cluster config has changed, then we must drop and recreate --#}\n {% if not adapter.is_replaceable(existing_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ existing_relation ~ \" because it is not replaceable\") %}\n {{ adapter.drop_relation(existing_relation) }}\n {% endif %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% else %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n\n {% set build_sql = snowplow_utils.snowplow_merge(\n tmp_relation,\n target_relation,\n unique_key,\n partition_by,\n dest_columns,\n disable_upsert_lookback) %}\n\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.snowplow_utils.snowplow_validate_get_incremental_strategy", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.snowplow_utils.snowplow_merge", "macro.dbt.statement", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.793587}, "macro.snowplow_utils.snowplow_snowflake_get_incremental_sql": {"unique_id": "macro.snowplow_utils.snowplow_snowflake_get_incremental_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/snowflake/snowplow_incremental.sql", "original_file_path": "macros/materializations/snowplow_incremental/snowflake/snowplow_incremental.sql", "name": "snowplow_snowflake_get_incremental_sql", "macro_sql": "{% macro snowplow_snowflake_get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) %}\n {% if strategy == 'merge' %}\n {% do return(snowplow_utils.snowplow_merge(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback)) %}\n {% elif strategy == 'delete+insert' %}\n {% do return(snowplow_utils.snowplow_delete_insert(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback)) %}\n {% else %}\n {% do exceptions.raise_compiler_error('invalid strategy: ' ~ strategy) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.snowplow_merge", "macro.snowplow_utils.snowplow_delete_insert"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.796}, "macro.snowplow_utils.materialization_snowplow_incremental_snowflake": {"unique_id": "macro.snowplow_utils.materialization_snowplow_incremental_snowflake", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/snowflake/snowplow_incremental.sql", "original_file_path": "macros/materializations/snowplow_incremental/snowflake/snowplow_incremental.sql", "name": "materialization_snowplow_incremental_snowflake", "macro_sql": "{% materialization snowplow_incremental, adapter='snowflake' -%}\n\n {% set original_query_tag = set_query_tag() %}\n\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {# Required keys. Throws error if not present #}\n {%- set unique_key = config.require('unique_key') -%}\n {%- set upsert_date_key = config.require('upsert_date_key') -%}\n \n {% set disable_upsert_lookback = config.get('disable_upsert_lookback') %}\n\n {% set target_relation = this %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(this) %}\n\n {# Validate early so we don't run SQL if the strategy is invalid or missing keys #}\n {% set strategy = snowplow_utils.snowplow_validate_get_incremental_strategy(config) -%}\n\n -- setup\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif existing_relation.is_view %}\n {#-- Can't overwrite a view with a table - we must drop --#}\n {{ log(\"Dropping relation \" ~ target_relation ~ \" because it is a view and this model is a table.\") }}\n {% do adapter.drop_relation(existing_relation) %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n \n {%- set dest_columns = adapter.get_columns_in_relation(target_relation) -%}\n\n {% set build_sql = snowplow_utils.snowplow_snowflake_get_incremental_sql(strategy,\n tmp_relation,\n target_relation,\n unique_key,\n upsert_date_key,\n dest_columns,\n disable_upsert_lookback)%}\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {%- endcall -%}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {% set target_relation = target_relation.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.set_query_tag", "macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.snowplow_utils.snowplow_validate_get_incremental_strategy", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.snowplow_utils.snowplow_snowflake_get_incremental_sql", "macro.dbt.statement", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.816878}, "macro.snowplow_utils.snowplow_is_incremental": {"unique_id": "macro.snowplow_utils.snowplow_is_incremental", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_is_incremental.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_is_incremental.sql", "name": "snowplow_is_incremental", "macro_sql": "{% macro snowplow_is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized in ['incremental','snowplow_incremental']\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.817824}, "macro.snowplow_utils.get_snowplow_upsert_limits_sql": {"unique_id": "macro.snowplow_utils.get_snowplow_upsert_limits_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "name": "get_snowplow_upsert_limits_sql", "macro_sql": "{% macro get_snowplow_upsert_limits_sql(tmp_relation, upsert_date_key, disable_upsert_lookback) -%}\n {{ adapter.dispatch('get_snowplow_upsert_limits_sql', 'snowplow_utils')(tmp_relation, upsert_date_key, disable_upsert_lookback) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__get_snowplow_upsert_limits_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.819896}, "macro.snowplow_utils.default__get_snowplow_upsert_limits_sql": {"unique_id": "macro.snowplow_utils.default__get_snowplow_upsert_limits_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "name": "default__get_snowplow_upsert_limits_sql", "macro_sql": "{% macro default__get_snowplow_upsert_limits_sql(tmp_relation, upsert_date_key, disable_upsert_lookback) -%}\n \n {% set upsert_limits_sql -%}\n\n {% if disable_upsert_lookback %}\n with vars as (\n select min({{ upsert_date_key }}) as lower_limit,\n max({{ upsert_date_key }}) as upper_limit\n from {{ tmp_relation }}\n )\n {% else %}\n with vars as (\n select \n {{ dbt_utils.dateadd('day', \n -var(\"snowplow__upsert_lookback_days\", 30),\n 'min('~upsert_date_key~')') }} as lower_limit,\n max({{ upsert_date_key }}) as upper_limit\n from {{ tmp_relation }}\n )\n {% endif %}\n\n {%- endset %}\n\n {{ return(upsert_limits_sql) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.820435}, "macro.snowplow_utils.bigquery__get_snowplow_upsert_limits_sql": {"unique_id": "macro.snowplow_utils.bigquery__get_snowplow_upsert_limits_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "name": "bigquery__get_snowplow_upsert_limits_sql", "macro_sql": "{% macro bigquery__get_snowplow_upsert_limits_sql(tmp_relation, upsert_date_key, disable_upsert_lookback) -%}\n \n {# partition_by supplied as upsert_date_key for BigQuery. Rename for clarity #} \n {%- set partition_by = upsert_date_key -%}\n \n {% set upsert_limits_sql -%}\n\n {% if disable_upsert_lookback %}\n set (dbt_partition_lower_limit, dbt_partition_upper_limit) = (\n select as struct\n min({{ partition_by.field }}) as lower_limit,\n max({{ partition_by.field }}) as upper_limit\n from {{ tmp_relation }}\n );\n {% else %}\n set (dbt_partition_lower_limit, dbt_partition_upper_limit) = (\n select as struct\n cast({{ dbt_utils.dateadd('day', \n -var(\"snowplow__upsert_lookback_days\", 30),\n 'min('~partition_by.field~')') }} as {{ partition_by.data_type }}) as lower_limit,\n max({{ partition_by.field }}) as upper_limit\n from {{ tmp_relation }}\n );\n {% endif %}\n\n {%- endset %}\n\n {{ return(upsert_limits_sql) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.821095}, "macro.snowplow_utils.snowflake__get_snowplow_upsert_limits_sql": {"unique_id": "macro.snowplow_utils.snowflake__get_snowplow_upsert_limits_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_upsert_limits_sql.sql", "name": "snowflake__get_snowplow_upsert_limits_sql", "macro_sql": "{% macro snowflake__get_snowplow_upsert_limits_sql(tmp_relation, upsert_date_key, disable_upsert_lookback) -%}\n \n {% set upsert_limits_sql -%}\n\n {% if disable_upsert_lookback %}\n set (dbt_partition_lower_limit, dbt_partition_upper_limit) = (\n select \n min({{ upsert_date_key }}) as lower_limit,\n max({{ upsert_date_key }}) as upper_limit\n from {{ tmp_relation }}\n );\n {% else %}\n set (dbt_partition_lower_limit, dbt_partition_upper_limit) = (\n select \n {{ dbt_utils.dateadd('day', \n -var(\"snowplow__upsert_lookback_days\", 30),\n 'min('~upsert_date_key~')') }} as lower_limit,\n max({{ upsert_date_key }}) as upper_limit\n from {{ tmp_relation }}\n );\n {% endif %}\n\n {%- endset %}\n\n {{ return(upsert_limits_sql) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.821634}, "macro.snowplow_utils.snowplow_validate_get_incremental_strategy": {"unique_id": "macro.snowplow_utils.snowplow_validate_get_incremental_strategy", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_validate_get_incremental_strategy.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_validate_get_incremental_strategy.sql", "name": "snowplow_validate_get_incremental_strategy", "macro_sql": "{% macro snowplow_validate_get_incremental_strategy(config) -%}\n {{ adapter.dispatch('snowplow_validate_get_incremental_strategy', 'snowplow_utils')(config) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__snowplow_validate_get_incremental_strategy"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.822177}, "macro.snowplow_utils.default__snowplow_validate_get_incremental_strategy": {"unique_id": "macro.snowplow_utils.default__snowplow_validate_get_incremental_strategy", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_validate_get_incremental_strategy.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_validate_get_incremental_strategy.sql", "name": "default__snowplow_validate_get_incremental_strategy", "macro_sql": "{% macro default__snowplow_validate_get_incremental_strategy(config) %}\n \n {# Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"merge\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected 'merge'\n {%- endset %}\n {% if strategy not in ['merge'] %}\n {% do exceptions.raise_compiler_error(invalid_strategy_msg) %}\n {% endif %}\n\n {% do return(strategy) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.822672}, "macro.snowplow_utils.snowflake__snowplow_validate_get_incremental_strategy": {"unique_id": "macro.snowplow_utils.snowflake__snowplow_validate_get_incremental_strategy", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_validate_get_incremental_strategy.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_validate_get_incremental_strategy.sql", "name": "snowflake__snowplow_validate_get_incremental_strategy", "macro_sql": "{% macro snowflake__snowplow_validate_get_incremental_strategy(config) %}\n \n {# Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"merge\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'delete+insert'\n {%- endset %}\n {% if strategy not in ['merge', 'delete+insert'] %}\n {% do exceptions.raise_compiler_error(invalid_strategy_msg) %}\n {% endif %}\n\n {% do return(strategy) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8231711}, "macro.snowplow_utils.snowplow_delete_insert": {"unique_id": "macro.snowplow_utils.snowplow_delete_insert", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_delete_insert.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_delete_insert.sql", "name": "snowplow_delete_insert", "macro_sql": "{% macro snowplow_delete_insert(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) -%}\n {{ adapter.dispatch('snowplow_delete_insert', 'snowplow_utils')(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__snowplow_delete_insert"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.824168}, "macro.snowplow_utils.default__snowplow_delete_insert": {"unique_id": "macro.snowplow_utils.default__snowplow_delete_insert", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_delete_insert.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_delete_insert.sql", "name": "default__snowplow_delete_insert", "macro_sql": "{% macro default__snowplow_delete_insert(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) %}\n \n {% set predicate -%}\n {{ upsert_date_key }} between (select lower_limit from vars) and (select upper_limit from vars)\n {%- endset %}\n\n {%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ') -%}\n\n -- define upsert limits\n {{ snowplow_utils.get_snowplow_upsert_limits_sql(tmp_relation, upsert_date_key, disable_upsert_lookback) }}\n\n -- run the delete+insert statement\n {{ snowplow_utils.get_snowplow_delete_insert_sql(target_relation, tmp_relation, unique_key, dest_cols_csv, [predicate]) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_snowplow_upsert_limits_sql", "macro.snowplow_utils.get_snowplow_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.824712}, "macro.snowplow_utils.snowflake__snowplow_delete_insert": {"unique_id": "macro.snowplow_utils.snowflake__snowplow_delete_insert", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_delete_insert.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_delete_insert.sql", "name": "snowflake__snowplow_delete_insert", "macro_sql": "{% macro snowflake__snowplow_delete_insert(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) %}\n\n {% set predicate -%}\n {{ upsert_date_key }} between $dbt_partition_lower_limit and $dbt_partition_upper_limit\n {%- endset %}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {%- set source_sql -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- endset -%}\n\n -- define upsert limits\n {{ snowplow_utils.get_snowplow_upsert_limits_sql(tmp_relation, upsert_date_key, disable_upsert_lookback) }}\n\n -- run the delete+insert statement\n {{ snowplow_utils.get_snowplow_delete_insert_sql(target_relation, source_sql, unique_key, dest_cols_csv, [predicate]) }}\n \n -- Unset variables\n unset (dbt_partition_lower_limit, dbt_partition_upper_limit);\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.snowplow_utils.get_snowplow_upsert_limits_sql", "macro.snowplow_utils.get_snowplow_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.825322}, "macro.snowplow_utils.get_snowplow_delete_insert_sql": {"unique_id": "macro.snowplow_utils.get_snowplow_delete_insert_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_delete_insert_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_delete_insert_sql.sql", "name": "get_snowplow_delete_insert_sql", "macro_sql": "{% macro get_snowplow_delete_insert_sql(target, source, unique_key, dest_cols_csv, predicates) -%}\n {{ adapter.dispatch('get_snowplow_delete_insert_sql', 'snowplow_utils')(target, source, unique_key, dest_cols_csv, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__get_snowplow_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8259652}, "macro.snowplow_utils.default__get_snowplow_delete_insert_sql": {"unique_id": "macro.snowplow_utils.default__get_snowplow_delete_insert_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_delete_insert_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_delete_insert_sql.sql", "name": "default__get_snowplow_delete_insert_sql", "macro_sql": "{% macro default__get_snowplow_delete_insert_sql(target, source, unique_key, dest_cols_csv, predicates) -%}\n \n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n )\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %};\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n );\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.826383}, "macro.snowplow_utils.snowflake__get_snowplow_delete_insert_sql": {"unique_id": "macro.snowplow_utils.snowflake__get_snowplow_delete_insert_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_delete_insert_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_delete_insert_sql.sql", "name": "snowflake__get_snowplow_delete_insert_sql", "macro_sql": "{% macro snowflake__get_snowplow_delete_insert_sql(target, source, unique_key, dest_cols_csv, predicates) -%}\n \n begin;\n {{ snowplow_utils.default__get_snowplow_delete_insert_sql(target, source, unique_key, dest_cols_csv, predicates) }}\n commit;\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__get_snowplow_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8266351}, "macro.snowplow_utils.snowplow_merge": {"unique_id": "macro.snowplow_utils.snowplow_merge", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_merge.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_merge.sql", "name": "snowplow_merge", "macro_sql": "{% macro snowplow_merge(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) -%}\n {{ adapter.dispatch('snowplow_merge', 'snowplow_utils')(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__snowplow_merge"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.827643}, "macro.snowplow_utils.default__snowplow_merge": {"unique_id": "macro.snowplow_utils.default__snowplow_merge", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_merge.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_merge.sql", "name": "default__snowplow_merge", "macro_sql": "{% macro default__snowplow_merge(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) %}\n \n {# partition_by supplied as upsert_date_key for BigQuery. Rename for clarity #} \n {%- set partition_by = upsert_date_key -%}\n\n {% set predicate -%}\n DBT_INTERNAL_DEST.{{ partition_by.field }} between dbt_partition_lower_limit and dbt_partition_upper_limit\n {%- endset %}\n\n {%- set source_sql -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- endset -%}\n\n declare dbt_partition_lower_limit, dbt_partition_upper_limit {{ partition_by.data_type }};\n\n -- 1. create a temp table\n {{ create_table_as(True, tmp_relation, sql) }}\n\n -- 2. define partitions to update\n {{ snowplow_utils.get_snowplow_upsert_limits_sql(tmp_relation, partition_by, disable_upsert_lookback) }}\n\n {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- 3. run the merge statement\n {{ snowplow_utils.get_snowplow_merge_sql(target_relation, source_sql, unique_key, dest_columns, [predicate], include_sql_header=false) }};\n\n -- 4. clean up the temp table\n drop table if exists {{ tmp_relation }}\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as", "macro.snowplow_utils.get_snowplow_upsert_limits_sql", "macro.snowplow_utils.get_snowplow_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.828437}, "macro.snowplow_utils.snowflake__snowplow_merge": {"unique_id": "macro.snowplow_utils.snowflake__snowplow_merge", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/snowplow_merge.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/snowplow_merge.sql", "name": "snowflake__snowplow_merge", "macro_sql": "{% macro snowflake__snowplow_merge(tmp_relation, target_relation, unique_key, upsert_date_key, dest_columns, disable_upsert_lookback) %}\n\n {% set predicate -%}\n DBT_INTERNAL_DEST.{{ upsert_date_key }} between $dbt_partition_lower_limit and $dbt_partition_upper_limit\n {%- endset %}\n\n {%- set source_sql -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- endset -%}\n\n -- define upsert limits\n {{ snowplow_utils.get_snowplow_upsert_limits_sql(tmp_relation, upsert_date_key, disable_upsert_lookback) }}\n\n {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- run the merge statement\n {{ snowplow_utils.get_snowplow_merge_sql(target_relation, source_sql, unique_key, dest_columns, [predicate], include_sql_header=false) }};\n \n -- Unset variables\n unset (dbt_partition_lower_limit, dbt_partition_upper_limit);\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_snowplow_upsert_limits_sql", "macro.snowplow_utils.get_snowplow_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.828984}, "macro.snowplow_utils.get_snowplow_merge_sql": {"unique_id": "macro.snowplow_utils.get_snowplow_merge_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_merge_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_merge_sql.sql", "name": "get_snowplow_merge_sql", "macro_sql": "{% macro get_snowplow_merge_sql(target, source, unique_key, dest_columns, predicates, include_sql_header) -%}\n {{ adapter.dispatch('get_snowplow_merge_sql', 'snowplow_utils')(target, source, unique_key, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__get_snowplow_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.830094}, "macro.snowplow_utils.default__get_snowplow_merge_sql": {"unique_id": "macro.snowplow_utils.default__get_snowplow_merge_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/materializations/snowplow_incremental/common/get_snowplow_merge_sql.sql", "original_file_path": "macros/materializations/snowplow_incremental/common/get_snowplow_merge_sql.sql", "name": "default__get_snowplow_merge_sql", "macro_sql": "{% macro default__get_snowplow_merge_sql(target, source, unique_key, dest_columns, predicates, include_sql_header) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% else %}\n {% set unique_key_match %}\n false\n {% endset %}\n {% endif %}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{ unique_key_match }}\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.831421}, "macro.snowplow_utils.print_list": {"unique_id": "macro.snowplow_utils.print_list", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/print_list.sql", "original_file_path": "macros/utils/print_list.sql", "name": "print_list", "macro_sql": "{% macro print_list(list) %}\n\n {%- for item in list %} '{{item}}' {%- if not loop.last %},{% endif %} {% endfor -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.831799}, "macro.snowplow_utils.log_message": {"unique_id": "macro.snowplow_utils.log_message", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/log_message.sql", "original_file_path": "macros/utils/log_message.sql", "name": "log_message", "macro_sql": "{% macro log_message(message, is_printed=var('snowplow__has_log_enabled', true)) %}\n {{ return(adapter.dispatch('log_message', 'snowplow_utils')(message, is_printed)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__log_message"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.83224}, "macro.snowplow_utils.default__log_message": {"unique_id": "macro.snowplow_utils.default__log_message", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/log_message.sql", "original_file_path": "macros/utils/log_message.sql", "name": "default__log_message", "macro_sql": "{% macro default__log_message(message, is_printed) %}\n {{ log(dbt_utils.pretty_log_format(message), info=is_printed) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.832444}, "macro.snowplow_utils.post_ci_cleanup": {"unique_id": "macro.snowplow_utils.post_ci_cleanup", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/post_ci_cleanup.sql", "original_file_path": "macros/utils/post_ci_cleanup.sql", "name": "post_ci_cleanup", "macro_sql": "{% macro post_ci_cleanup(schema_pattern=target.schema~'%') %}\n \n {# Get all schemas with the target.schema prefix #}\n {% set get_tables_sql = dbt_utils.get_tables_by_pattern_sql(schema_pattern,table_pattern='%') %}\n {# If no schemas exists then get_tables_sql is empty string so don't query #}\n {% set results = [] if get_tables_sql.isspace() else run_query(get_tables_sql) %}\n {% set schemas = results|map(attribute='table_schema')|unique|list %}\n\n {% if schemas|length %}\n\n {# Generate sql to drop all identified schemas #}\n {% set drop_schema_sql -%}\n\n {% for schema in schemas -%}\n DROP SCHEMA IF EXISTS {{schema}} CASCADE; \n {% endfor %}\n\n {%- endset %}\n\n {# Drop schemas #}\n {% do run_query(drop_schema_sql) %}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8334022}, "macro.snowplow_utils.snowplow_delete_from_manifest": {"unique_id": "macro.snowplow_utils.snowplow_delete_from_manifest", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/snowplow_delete_from_manifest.sql", "original_file_path": "macros/utils/snowplow_delete_from_manifest.sql", "name": "snowplow_delete_from_manifest", "macro_sql": "{% macro snowplow_delete_from_manifest(models, incremental_manifest_table) %}\n\n {%- if models is string -%}\n {%- set models = [models] -%}\n {%- endif -%}\n\n {% if not models|length or not execute %}\n {{ return('') }}\n {% endif %}\n\n {%- set incremental_manifest_table_exists = adapter.get_relation(incremental_manifest_table.database,\n incremental_manifest_table.schema,\n incremental_manifest_table.name) -%}\n\n {%- if not incremental_manifest_table_exists -%}\n {{return(dbt_utils.log_info(\"Snowplow: \"+incremental_manifest_table|string+\" does not exist\"))}}\n {%- endif -%}\n\n {%- set models_in_manifest = dbt_utils.get_column_values(table=incremental_manifest_table, column='model') -%}\n {%- set unmatched_models, matched_models = [], [] -%}\n\n {%- for model in models -%}\n\n {%- if model in models_in_manifest -%}\n {%- do matched_models.append(model) -%}\n {%- else -%}\n {%- do unmatched_models.append(model) -%}\n {%- endif -%}\n\n {%- endfor -%}\n\n {%- if not matched_models|length -%}\n {{return(dbt_utils.log_info(\"Snowplow: None of the supplied models exist in the manifest\"))}}\n {%- endif -%}\n\n {% set delete_statement %}\n -- We don't need transaction but Redshift needs commit statement while BQ does not. By using transaction we cover both.\n begin;\n delete from {{ incremental_manifest_table }} where model in ({{ snowplow_utils.print_list(matched_models) }});\n commit;\n {% endset %}\n\n {%- do run_query(delete_statement) -%}\n\n {%- if matched_models|length -%}\n {% do snowplow_utils.log_message(\"Snowplow: Deleted models \"+snowplow_utils.print_list(matched_models)+\" from the manifest\") %}\n {%- endif -%}\n\n {%- if unmatched_models|length -%}\n {% do snowplow_utils.log_message(\"Snowplow: Models \"+snowplow_utils.print_list(unmatched_models)+\" do not exist in the manifest\") %}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.log_info", "macro.dbt_utils.get_column_values", "macro.snowplow_utils.print_list", "macro.dbt.run_query", "macro.snowplow_utils.log_message"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.836351}, "macro.snowplow_utils.snowplow_web_delete_from_manifest": {"unique_id": "macro.snowplow_utils.snowplow_web_delete_from_manifest", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/snowplow_delete_from_manifest.sql", "original_file_path": "macros/utils/snowplow_delete_from_manifest.sql", "name": "snowplow_web_delete_from_manifest", "macro_sql": "{% macro snowplow_web_delete_from_manifest(models) %}\n\n {{ snowplow_utils.snowplow_delete_from_manifest(models, ref('snowplow_web_incremental_manifest')) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.snowplow_delete_from_manifest"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.836548}, "macro.snowplow_utils.snowplow_mobile_delete_from_manifest": {"unique_id": "macro.snowplow_utils.snowplow_mobile_delete_from_manifest", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/snowplow_delete_from_manifest.sql", "original_file_path": "macros/utils/snowplow_delete_from_manifest.sql", "name": "snowplow_mobile_delete_from_manifest", "macro_sql": "{% macro snowplow_mobile_delete_from_manifest(models) %}\n\n {{ snowplow_utils.snowplow_delete_from_manifest(models, ref('snowplow_mobile_incremental_manifest')) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.snowplow_delete_from_manifest"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.836728}, "macro.snowplow_utils.app_id_filter": {"unique_id": "macro.snowplow_utils.app_id_filter", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/app_id_filter.sql", "original_file_path": "macros/utils/app_id_filter.sql", "name": "app_id_filter", "macro_sql": "{% macro app_id_filter(app_ids) %}\n\n {%- if app_ids|length -%} \n\n app_id in ('{{ app_ids|join(\"','\") }}') --filter on app_id if provided\n\n {%- else -%}\n\n true\n\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.837086}, "macro.snowplow_utils.get_cluster_by": {"unique_id": "macro.snowplow_utils.get_cluster_by", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/get_cluster_by.sql", "original_file_path": "macros/utils/get_cluster_by.sql", "name": "get_cluster_by", "macro_sql": "{% macro get_cluster_by(bigquery_cols=none, snowflake_cols=none) %}\n\n {% if target.type == 'bigquery' %}\n {{ return(bigquery_cols) }}\n {% elif target.type == 'snowflake' %}\n {{ return(snowflake_cols) }}\n {% endif %}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.837588}, "macro.snowplow_utils.get_columns_in_relation_by_column_prefix": {"unique_id": "macro.snowplow_utils.get_columns_in_relation_by_column_prefix", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/get_columns_in_relation_by_column_prefix.sql", "original_file_path": "macros/utils/get_columns_in_relation_by_column_prefix.sql", "name": "get_columns_in_relation_by_column_prefix", "macro_sql": "{% macro get_columns_in_relation_by_column_prefix(relation, column_prefix) %}\n\n {# Prevent introspective queries during parsing #}\n {%- if not execute -%}\n {{ return('') }}\n {% endif %}\n\n {%- set columns = adapter.get_columns_in_relation(relation) -%}\n \n {# get_columns_in_relation returns uppercase cols for snowflake so uppercase column_prefix #}\n {%- set column_prefix = column_prefix.upper() if target.type == 'snowflake' else column_prefix -%}\n\n {%- set matched_columns = [] -%}\n\n {# add columns with matching prefix to matched_columns #}\n {% for column in columns %}\n {% if column.name.startswith(column_prefix) %}\n {% do matched_columns.append(column) %}\n {% endif %}\n {% endfor %}\n\n {% if matched_columns|length %}\n {{ return(matched_columns) }}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Snowplow: No columns found with prefix \"~column_prefix) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.83875}, "macro.snowplow_utils.set_query_tag": {"unique_id": "macro.snowplow_utils.set_query_tag", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/set_query_tag.sql", "original_file_path": "macros/utils/set_query_tag.sql", "name": "set_query_tag", "macro_sql": "{%- macro set_query_tag(statement) -%}\n {{ return(adapter.dispatch('set_query_tag', 'snowplow_utils')(statement)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__set_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.839114}, "macro.snowplow_utils.snowflake__set_query_tag": {"unique_id": "macro.snowplow_utils.snowflake__set_query_tag", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/set_query_tag.sql", "original_file_path": "macros/utils/set_query_tag.sql", "name": "snowflake__set_query_tag", "macro_sql": "{% macro snowflake__set_query_tag(statement) %}\n alter session set query_tag = '{{ statement }}';\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.839225}, "macro.snowplow_utils.default__set_query_tag": {"unique_id": "macro.snowplow_utils.default__set_query_tag", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/set_query_tag.sql", "original_file_path": "macros/utils/set_query_tag.sql", "name": "default__set_query_tag", "macro_sql": "{% macro default__set_query_tag(statement) %}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.839308}, "macro.snowplow_utils.throw_compiler_error": {"unique_id": "macro.snowplow_utils.throw_compiler_error", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/throw_compiler_error.sql", "original_file_path": "macros/utils/throw_compiler_error.sql", "name": "throw_compiler_error", "macro_sql": "{% macro throw_compiler_error(error_message, disable_error=var(\"snowplow__disable_errors\", false)) %}\n\n {% if disable_error %}\n\n {{ return(error_message) }}\n\n {% else %}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.839812}, "macro.snowplow_utils.is_run_with_new_events": {"unique_id": "macro.snowplow_utils.is_run_with_new_events", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/is_run_with_new_events.sql", "original_file_path": "macros/utils/is_run_with_new_events.sql", "name": "is_run_with_new_events", "macro_sql": "{% macro is_run_with_new_events(package_name) %}\n\n {%- set new_event_limits_relation = snowplow_utils.get_new_event_limits_table_relation(package_name) -%}\n {%- set incremental_manifest_relation = snowplow_utils.get_incremental_manifest_table_relation(package_name) -%}\n\n {% if snowplow_utils.snowplow_is_incremental() %}\n\n {%- set node_identifier = this.identifier -%}\n {%- set base_sessions_lifecycle_identifier = package_name+'_base_sessions_lifecycle_manifest' -%}\n\n {# base_sessions_lifecycle not included in manifest so query directly. Otherwise use the manifest for performance #}\n {%- if node_identifier == base_sessions_lifecycle_identifier -%}\n {#Technically should be max(end_tstsamp) but table is partitioned on start_tstamp so cheaper to use.\n Worst case we update the manifest during a backfill when we dont need to, which should be v rare. #}\n {% set has_been_processed_query %}\n select \n case when \n (select upper_limit from {{ new_event_limits_relation }}) <= (select max(start_tstamp) from {{this}}) \n then false \n else true end\n {% endset %}\n\n {%- else -%}\n\n {% set has_been_processed_query %}\n select \n case when \n (select upper_limit from {{ new_event_limits_relation }}) \n <= (select last_success from {{ incremental_manifest_relation }} where model = '{{node_identifier}}') \n then false \n else true end\n {% endset %}\n\n {%- endif -%}\n\n {% set results = run_query(has_been_processed_query) %}\n\n {% if execute %}\n {% set has_new_events = results.columns[0].values()[0] | as_bool() %}\n {# Snowflake: dbt 0.18 returns bools as ints. Ints are not accepted as predicates in Snowflake. Cast to be safe. #}\n {% set has_new_events = 'cast('~has_new_events~' as boolean)' %}\n {% endif %}\n\n {% else %}\n\n {% set has_new_events = true %}\n\n {% endif %}\n\n {{ return(has_new_events) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_new_event_limits_table_relation", "macro.snowplow_utils.get_incremental_manifest_table_relation", "macro.snowplow_utils.snowplow_is_incremental", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.841557}, "macro.snowplow_utils.n_timedeltas_ago": {"unique_id": "macro.snowplow_utils.n_timedeltas_ago", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/n_timedeltas_ago.sql", "original_file_path": "macros/utils/n_timedeltas_ago.sql", "name": "n_timedeltas_ago", "macro_sql": "{% macro n_timedeltas_ago(n, timedelta_attribute) %}\n\n {% set arg_dict = {timedelta_attribute: n} %}\n {% set now = modules.datetime.datetime.now() %}\n {% set n_timedeltas_ago = (now - modules.datetime.timedelta(**arg_dict)) %}\n\n {{ return(n_timedeltas_ago) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.842123}, "macro.snowplow_utils.get_value_by_target": {"unique_id": "macro.snowplow_utils.get_value_by_target", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/get_value_by_target.sql", "original_file_path": "macros/utils/get_value_by_target.sql", "name": "get_value_by_target", "macro_sql": "{% macro get_value_by_target(dev_value, default_value, dev_target_name='dev') %}\n\n {% if target.name == dev_target_name %}\n {% set value = dev_value %}\n {% else %}\n {% set value = default_value %}\n {% endif %}\n\n {{ return(value) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.842635}, "macro.snowplow_utils.return_limits_from_model": {"unique_id": "macro.snowplow_utils.return_limits_from_model", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/return_limits_from_model.sql", "original_file_path": "macros/utils/return_limits_from_model.sql", "name": "return_limits_from_model", "macro_sql": "{% macro return_limits_from_model(model, lower_limit_col, upper_limit_col) -%}\n\n {% if not execute %}\n {{ return(['','']) }}\n {% endif %}\n \n {% set limit_query %} \n select \n min({{lower_limit_col}}) as lower_limit,\n max({{upper_limit_col}}) as upper_limit\n from {{ model }} \n {% endset %}\n\n {% set results = run_query(limit_query) %}\n \n {% if execute %}\n\n {% set lower_limit = snowplow_utils.cast_to_tstamp(results.columns[0].values()[0]) %}\n {% set upper_limit = snowplow_utils.cast_to_tstamp(results.columns[1].values()[0]) %}\n\n {{ return([lower_limit, upper_limit]) }}\n\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.snowplow_utils.cast_to_tstamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8437681}, "macro.snowplow_utils.tstamp_to_str": {"unique_id": "macro.snowplow_utils.tstamp_to_str", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/tstamp_to_str.sql", "original_file_path": "macros/utils/tstamp_to_str.sql", "name": "tstamp_to_str", "macro_sql": "{% macro tstamp_to_str(tstamp) -%}\n '{{ tstamp.strftime(\"%Y-%m-%d %H:%M:%S\") }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.844021}, "macro.snowplow_utils.timestamp_diff": {"unique_id": "macro.snowplow_utils.timestamp_diff", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_tstamp, second_tstamp, datepart) %}\n {{ return(adapter.dispatch('timestamp_diff', 'snowplow_utils')(first_tstamp, second_tstamp, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.84528}, "macro.snowplow_utils.default__timestamp_diff": {"unique_id": "macro.snowplow_utils.default__timestamp_diff", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "default__timestamp_diff", "macro_sql": "{% macro default__timestamp_diff(first_tstamp, second_tstamp, datepart) %}\n {{ return(dbt_utils.datediff(first_tstamp, second_tstamp, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.845502}, "macro.snowplow_utils.bigquery__timestamp_diff": {"unique_id": "macro.snowplow_utils.bigquery__timestamp_diff", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "bigquery__timestamp_diff", "macro_sql": "{% macro bigquery__timestamp_diff(first_tstamp, second_tstamp, datepart) %}\n timestamp_diff({{second_tstamp}}, {{first_tstamp}}, {{datepart}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.845669}, "macro.snowplow_utils.timestamp_add": {"unique_id": "macro.snowplow_utils.timestamp_add", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, tstamp) %}\n {{ return(adapter.dispatch('timestamp_add', 'snowplow_utils')(datepart, interval, tstamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.845917}, "macro.snowplow_utils.default__timestamp_add": {"unique_id": "macro.snowplow_utils.default__timestamp_add", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "default__timestamp_add", "macro_sql": "{% macro default__timestamp_add(datepart, interval, tstamp) %}\n {{ return(dbt_utils.dateadd(datepart, interval, tstamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8461351}, "macro.snowplow_utils.bigquery__timestamp_add": {"unique_id": "macro.snowplow_utils.bigquery__timestamp_add", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "bigquery__timestamp_add", "macro_sql": "{% macro bigquery__timestamp_add(datepart, interval, tstamp) %}\n timestamp_add({{tstamp}}, interval {{interval}} {{datepart}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.846304}, "macro.snowplow_utils.cast_to_tstamp": {"unique_id": "macro.snowplow_utils.cast_to_tstamp", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "cast_to_tstamp", "macro_sql": "{% macro cast_to_tstamp(tstamp_literal) -%}\n {% if tstamp_literal is none or tstamp_literal|lower in ['null',''] %}\n cast(null as {{dbt_utils.type_timestamp()}})\n {% else %}\n cast('{{tstamp_literal}}' as {{dbt_utils.type_timestamp()}})\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.846637}, "macro.snowplow_utils.to_unixtstamp": {"unique_id": "macro.snowplow_utils.to_unixtstamp", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "to_unixtstamp", "macro_sql": "\n\n\n{%- macro to_unixtstamp(tstamp) -%}\n {{ adapter.dispatch('to_unixtstamp', 'snowplow_utils') (tstamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__to_unixtstamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8468108}, "macro.snowplow_utils.default__to_unixtstamp": {"unique_id": "macro.snowplow_utils.default__to_unixtstamp", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "default__to_unixtstamp", "macro_sql": "\n\n\n{%- macro default__to_unixtstamp(tstamp) -%}\n date_part('epoch', {{ tstamp }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8469179}, "macro.snowplow_utils.snowflake__to_unixtstamp": {"unique_id": "macro.snowplow_utils.snowflake__to_unixtstamp", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "snowflake__to_unixtstamp", "macro_sql": "\n\n\n{%- macro snowflake__to_unixtstamp(tstamp) -%}\n date_part('epoch_seconds', {{ tstamp }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.847023}, "macro.snowplow_utils.bigquery__to_unixtstamp": {"unique_id": "macro.snowplow_utils.bigquery__to_unixtstamp", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/timestamp_functions.sql", "original_file_path": "macros/utils/cross_db/timestamp_functions.sql", "name": "bigquery__to_unixtstamp", "macro_sql": "\n\n\n{%- macro bigquery__to_unixtstamp(tstamp) -%}\n unix_seconds({{ tstamp }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.84713}, "macro.snowplow_utils.type_string": {"unique_id": "macro.snowplow_utils.type_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string(max_characters) -%}\n {{ return(adapter.dispatch('type_string', 'snowplow_utils')(max_characters)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8476758}, "macro.snowplow_utils.default__type_string": {"unique_id": "macro.snowplow_utils.default__type_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string(max_characters) %}\n varchar( {{max_characters }} )\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.847786}, "macro.snowplow_utils.bigquery__type_string": {"unique_id": "macro.snowplow_utils.bigquery__type_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "bigquery__type_string", "macro_sql": "{% macro bigquery__type_string(max_characters) %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.847881}, "macro.snowplow_utils.type_max_string": {"unique_id": "macro.snowplow_utils.type_max_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "type_max_string", "macro_sql": "\n\n{%- macro type_max_string() -%}\n {{ return(adapter.dispatch('type_max_string', 'snowplow_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.redshift__type_max_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8480582}, "macro.snowplow_utils.default__type_max_string": {"unique_id": "macro.snowplow_utils.default__type_max_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "default__type_max_string", "macro_sql": "{% macro default__type_max_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.848141}, "macro.snowplow_utils.snowflake__type_max_string": {"unique_id": "macro.snowplow_utils.snowflake__type_max_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "snowflake__type_max_string", "macro_sql": "{% macro snowflake__type_max_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.848213}, "macro.snowplow_utils.redshift__type_max_string": {"unique_id": "macro.snowplow_utils.redshift__type_max_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "redshift__type_max_string", "macro_sql": "{% macro redshift__type_max_string() %}\n varchar(max)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8482869}, "macro.snowplow_utils.postgres__type_max_string": {"unique_id": "macro.snowplow_utils.postgres__type_max_string", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/cross_db/datatypes.sql", "original_file_path": "macros/utils/cross_db/datatypes.sql", "name": "postgres__type_max_string", "macro_sql": "{% macro postgres__type_max_string() %}\n text\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.848423}, "macro.snowplow_utils.get_optional_fields": {"unique_id": "macro.snowplow_utils.get_optional_fields", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/get_optional_fields.sql", "original_file_path": "macros/utils/bigquery/get_optional_fields.sql", "name": "get_optional_fields", "macro_sql": "{% macro get_optional_fields(enabled, fields, col_prefix, relation, relation_alias) -%}\n\n {%- if enabled -%}\n\n {%- set combined_fields = snowplow_utils.combine_column_versions(\n relation=relation,\n column_prefix=col_prefix,\n required_fields=fields|map(attribute='field')|list,\n relation_alias=relation_alias\n ) -%}\n\n {{ combined_fields|join(',\\n') }}\n\n {%- else -%}\n\n {% for field in fields %}\n\n {%- set field_alias = snowplow_utils.get_field_alias(field.field)[1] -%}\n\n cast(null as {{ field.dtype }}) as {{ field_alias }} {%- if not loop.last %}, {% endif %}\n {% endfor %}\n\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.combine_column_versions", "macro.snowplow_utils.get_field_alias"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.849438}, "macro.snowplow_utils.merge_fields_across_col_versions": {"unique_id": "macro.snowplow_utils.merge_fields_across_col_versions", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/combine_column_versions/merge_fields_across_col_versions.sql", "original_file_path": "macros/utils/bigquery/combine_column_versions/merge_fields_across_col_versions.sql", "name": "merge_fields_across_col_versions", "macro_sql": "{% macro merge_fields_across_col_versions(fields_by_col_version) %}\n\n {# Flatten nested list of dicts into single list #}\n {% set all_cols = fields_by_col_version|sum(start=[]) %}\n\n {% set all_field_names = all_cols|map(attribute=\"field_name\")|list %}\n\n {% set unique_field_names = all_field_names|unique|list %}\n\n {% set merged_fields = [] %}\n\n {% for field_name in unique_field_names %}\n\n {# Get all field_paths per field. Returned as array. #}\n {% set field_paths = all_cols|selectattr('field_name','equalto', field_name)|map(attribute='path')|list %}\n \n {# Get nested_level of field. Returned as single element array. #}\n {% set nested_level = all_cols|selectattr('field_name',\"equalto\", field_name)|map(attribute='nested_level')|list%}\n\n {% set merged_field = {\n 'field_name': field_name,\n 'field_paths': field_paths,\n 'nested_level': nested_level[0]\n } %}\n\n {% do merged_fields.append(merged_field) %}\n\n {% endfor %}\n\n {{ return(merged_fields) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.850773}, "macro.snowplow_utils.get_level_limit": {"unique_id": "macro.snowplow_utils.get_level_limit", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/combine_column_versions/get_level_limit.sql", "original_file_path": "macros/utils/bigquery/combine_column_versions/get_level_limit.sql", "name": "get_level_limit", "macro_sql": "{% macro get_level_limit(level, level_filter, required_field_names) %}\n \n {% set accepted_level_filters = ['equalto','lessthan','greaterthan'] %}\n\n {% if level_filter is not in accepted_level_filters %}\n {% set incompatible_level_filter_error_message -%}\n Error: Incompatible level filter arg. Accepted args: {{accepted_level_filters|join(', ')}}\n {%- endset %}\n {{ return(snowplow_utils.throw_compiler_error(incompatible_level_filter_error_message)) }}\n {% endif %}\n\n {% if level is not none and required_field_names|length %}\n {% set double_filter_error_message -%}\n Error: Cannot filter fields by both `required_fields` and `level` arg. Please use only one.\n {%- endset %}\n {{ return(snowplow_utils.throw_compiler_error(double_filter_error_message)) }}\n {% endif %}\n\n {% if required_field_names|length and level_filter != 'equalto' %}\n {% set required_fields_error_message -%}\n Error: To filter fields using `required_fields` arg, `level_filter` must be set to `equalto`\n {%- endset %}\n {{ return(snowplow_utils.throw_compiler_error(required_fields_error_message)) }}\n {% endif %}\n\n {# level_limit is inclusive #}\n\n {% if level is not none %}\n\n {% if level_filter == 'equalto' %}\n\n {% set level_limit = level %}\n\n {% elif level_filter == 'lessthan' %}\n\n {% set level_limit = level -1 %}\n\n {% elif level_filter == 'greaterthan' %}\n\n {% set level_limit = none %}\n\n {% endif %}\n\n {% elif required_field_names|length %}\n\n {% set field_depths = [] %}\n {% for field in required_field_names %}\n {% set field_depth = field.split('.')|length %}\n {% do field_depths.append(field_depth) %}\n {% endfor %}\n\n {% set level_limit = field_depths|max %}\n\n {% else %}\n\n {# Case when selecting all available fields #}\n\n {% set level_limit = none %}\n\n {% endif %}\n\n {{ return(level_limit) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.throw_compiler_error"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.853261}, "macro.snowplow_utils.flatten_fields": {"unique_id": "macro.snowplow_utils.flatten_fields", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/combine_column_versions/flatten_fields.sql", "original_file_path": "macros/utils/bigquery/combine_column_versions/flatten_fields.sql", "name": "flatten_fields", "macro_sql": "{% macro flatten_fields(fields, parent, path, array_index, level_limit=none, level_counter=1, flattened_fields=[], field_name='') %}\n \n {% for field in fields %}\n\n {# Only recurse up-until level_limit #}\n {% if level_limit is not none and level_counter > level_limit %}\n {{ return(flattened_fields) }}\n {% endif %}\n\n {# If parent column is an array then take element [array_index]. #}\n {% set delimiter = '[safe_offset(%s)].'|format(array_index) if parent.mode == 'REPEATED' else '.' %}\n {% set path = path~delimiter~field.name %}\n {% set field_name = field_name~'.'~field.name if field_name != '' else field_name~field.name %}\n\n {% set field_dict = {\n 'field_name': field_name,\n 'path': path,\n 'nested_level': level_counter\n } %}\n\n {% do flattened_fields.append(field_dict) %}\n\n {# If field has nested fields recurse to extract all fields, unless array. #}\n {% if field.dtype == 'RECORD' and field.mode != 'REPEATED' %}\n\n {{ snowplow_utils.flatten_fields(\n fields=field.fields,\n parent=field,\n level_limit=level_limit,\n level_counter=level_counter+1,\n path=path,\n flattened_fields=flattened_fields,\n field_name=field_name\n ) }}\n\n {% endif %}\n\n {% endfor %}\n\n {{ return(flattened_fields) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.flatten_fields"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.855136}, "macro.snowplow_utils.get_field_alias": {"unique_id": "macro.snowplow_utils.get_field_alias", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/combine_column_versions/get_field_alias.sql", "original_file_path": "macros/utils/bigquery/combine_column_versions/get_field_alias.sql", "name": "get_field_alias", "macro_sql": "{% macro get_field_alias(field) %}\n \n {# Check if field is supplied as tuple e.g. (field_name, field_alias) #}\n {% if field is iterable and field is not string %}\n {{ return(field) }}\n {% else %}\n {{ return((field, field|replace('.', '_'))) }}\n {% endif %}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.855686}, "macro.snowplow_utils.get_matched_fields": {"unique_id": "macro.snowplow_utils.get_matched_fields", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/combine_column_versions/get_matched_fields.sql", "original_file_path": "macros/utils/bigquery/combine_column_versions/get_matched_fields.sql", "name": "get_matched_fields", "macro_sql": "{% macro get_matched_fields(fields, required_field_names, nested_level, level_filter) %}\n\n {% if not required_field_names|length %}\n\n {% if nested_level is none %}\n\n {% set matched_fields = fields %}\n\n {% else %}\n\n {% set matched_fields = fields|selectattr('nested_level',level_filter, nested_level)|list %}\n\n {% endif %}\n\n {% else %}\n\n {% set matched_fields = fields|selectattr('field_name','in', required_field_names)|list %}\n\n {% endif %}\n\n {{ return(matched_fields) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8565319}, "macro.snowplow_utils.coalesce_field_paths": {"unique_id": "macro.snowplow_utils.coalesce_field_paths", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/combine_column_versions/coalesce_field_paths.sql", "original_file_path": "macros/utils/bigquery/combine_column_versions/coalesce_field_paths.sql", "name": "coalesce_field_paths", "macro_sql": "{% macro coalesce_field_paths(paths, field_alias, include_field_alias, relation_alias) %}\n \n {% set relation_alias = '' if relation_alias is none else relation_alias~'.' %}\n\n {% set field_alias = '' if not include_field_alias else ' as '~field_alias %}\n\n {% set joined_paths = relation_alias~paths|join(', '~relation_alias) %}\n\n {% set coalesced_field_paths = 'coalesce('~joined_paths~')'~field_alias %}\n\n {{ return(coalesced_field_paths) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.857249}, "macro.snowplow_utils.combine_column_versions": {"unique_id": "macro.snowplow_utils.combine_column_versions", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/utils/bigquery/combine_column_versions/combine_column_versions.sql", "original_file_path": "macros/utils/bigquery/combine_column_versions/combine_column_versions.sql", "name": "combine_column_versions", "macro_sql": "{% macro combine_column_versions(relation, column_prefix, required_fields=[], nested_level=none, level_filter='equalto', relation_alias=none, include_field_alias=true, array_index=0, max_nested_level=15) %}\n \n {# Create field_alias if not supplied i.e. is not tuple #}\n {% set required_fields_tmp = required_fields %}\n {% set required_fields = [] %}\n {% for field in required_fields_tmp %}\n {% set field_tuple = snowplow_utils.get_field_alias(field) %}\n {% do required_fields.append(field_tuple) %}\n {% endfor %}\n\n {% set required_field_names = required_fields|map(attribute=0)|list %}\n\n {# Determines correct level_limit. This limits recursive iterations during unnesting. #}\n {% set level_limit = snowplow_utils.get_level_limit(nested_level, level_filter, required_field_names) %}\n\n {# Limit level_limit to max_nested_level if required #}\n {% set level_limit = max_nested_level if level_limit is none or level_limit > max_nested_level else level_limit %}\n\n {%- set matched_columns = snowplow_utils.get_columns_in_relation_by_column_prefix(relation, column_prefix) -%}\n \n {%- set flattened_fields_by_col_version = [] -%}\n\n {# Flatten fields within each column version. Returns nested arrays of dicts. #}\n {# Dict: {'field_name': str, 'field_alias': str, 'flattened_path': str, 'nested_level': int #}\n {% for column in matched_columns|sort(attribute='name', reverse=true) %}\n\n {% set flattened_fields = snowplow_utils.flatten_fields(fields=column.fields,\n parent=column,\n path=column.name,\n array_index=array_index,\n level_limit=level_limit\n ) %}\n\n {% do flattened_fields_by_col_version.append(flattened_fields) %}\n\n {% endfor %}\n\n {# Flatten nested arrays and merges fields across col version. Returns array of dicts containing all field_paths for field. #}\n {# Dict: {'field_name': str, 'flattened_field_paths': str, 'nested_level': int #}\n {% set merged_fields = snowplow_utils.merge_fields_across_col_versions(flattened_fields_by_col_version) %}\n\n {# Filters merged_fields based on required_fields if provided, or the level filter if provided. Default return all fields. #}\n {% set matched_fields = snowplow_utils.get_matched_fields(fields=merged_fields,\n required_field_names=required_field_names,\n nested_level=nested_level,\n level_filter=level_filter\n ) %}\n\n {% set coalesced_field_paths = [] %}\n\n {% for field in matched_fields %}\n\n {% set passed_field_alias = required_fields|selectattr(0, \"equalto\", field.field_name)|map(attribute=1)|list %}\n {% set default_field_alias = field.field_name|replace('.', '_') %}\n {# Use passed_field_alias from required_fields if supplied #}\n {% set field_alias = default_field_alias if not passed_field_alias|length else passed_field_alias[0] %}\n\n {# Coalesce each field's path across all version of columns, ordered by latest col version. #}\n {% set coalesced_field_path = snowplow_utils.coalesce_field_paths(paths=field.field_paths,\n field_alias=field_alias,\n include_field_alias=include_field_alias,\n relation_alias=relation_alias) %}\n\n {% do coalesced_field_paths.append(coalesced_field_path) %}\n\n {% endfor %}\n\n {# Returns array of all coalesced field paths #}\n {{ return(coalesced_field_paths) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_field_alias", "macro.snowplow_utils.get_level_limit", "macro.snowplow_utils.get_columns_in_relation_by_column_prefix", "macro.snowplow_utils.flatten_fields", "macro.snowplow_utils.merge_fields_across_col_versions", "macro.snowplow_utils.get_matched_fields", "macro.snowplow_utils.coalesce_field_paths"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.860485}, "macro.snowplow_utils.get_incremental_manifest_table_relation": {"unique_id": "macro.snowplow_utils.get_incremental_manifest_table_relation", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_incremental_manifest_table_relation.sql", "original_file_path": "macros/incremental_hooks/get_incremental_manifest_table_relation.sql", "name": "get_incremental_manifest_table_relation", "macro_sql": "{% macro get_incremental_manifest_table_relation(package_name) %}\n\n {%- set incremental_manifest_table = ref(package_name~'_incremental_manifest') -%}\n\n {{ return(incremental_manifest_table) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.860839}, "macro.snowplow_utils.get_run_limits": {"unique_id": "macro.snowplow_utils.get_run_limits", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_run_limits.sql", "original_file_path": "macros/incremental_hooks/get_run_limits.sql", "name": "get_run_limits", "macro_sql": "{% macro get_run_limits(min_last_success, max_last_success, models_matched_from_manifest, has_matched_all_models, start_date) -%}\n\n {% set start_tstamp = snowplow_utils.cast_to_tstamp(start_date) %}\n {% set min_last_success = snowplow_utils.cast_to_tstamp(min_last_success) %}\n {% set max_last_success = snowplow_utils.cast_to_tstamp(max_last_success) %}\n\n {% if not execute %}\n {{ return('') }}\n {% endif %}\n\n {% if models_matched_from_manifest == 0 %}\n {# If no snowplow models are in the manifest, start from start_tstamp #}\n {% do snowplow_utils.log_message(\"Snowplow: No data in manifest. Processing data from start_date\") %}\n\n {% set run_limits_query %}\n select {{start_tstamp}} as lower_limit,\n least({{ snowplow_utils.timestamp_add('day', var(\"snowplow__backfill_limit_days\", 30), start_tstamp) }},\n {{ dbt_utils.current_timestamp_in_utc() }}) as upper_limit\n {% endset %}\n\n {% elif not has_matched_all_models %}\n {# If a new Snowplow model is added which isn't already in the manifest, replay all events up to upper_limit #}\n {% do snowplow_utils.log_message(\"Snowplow: New Snowplow incremental model. Backfilling\") %}\n\n {% set run_limits_query %}\n select {{ start_tstamp }} as lower_limit,\n least({{ max_last_success }},\n {{ snowplow_utils.timestamp_add('day', var(\"snowplow__backfill_limit_days\", 30), start_tstamp) }}) as upper_limit\n {% endset %}\n\n {% elif min_last_success != max_last_success %}\n {# If all models in the run exists in the manifest but are out of sync, replay from the min last success to the max last success #}\n {% do snowplow_utils.log_message(\"Snowplow: Snowplow incremental models out of sync. Syncing\") %}\n\n {% set run_limits_query %}\n select {{ snowplow_utils.timestamp_add('hour', -var(\"snowplow__lookback_window_hours\", 6), min_last_success) }} as lower_limit,\n least({{ max_last_success }},\n {{ snowplow_utils.timestamp_add('day', var(\"snowplow__backfill_limit_days\", 30), min_last_success) }}) as upper_limit\n {% endset %}\n\n {% else %}\n {# Else standard run of the model #}\n {% do snowplow_utils.log_message(\"Snowplow: Standard incremental run\") %}\n\n {% set run_limits_query %}\n select \n {{ snowplow_utils.timestamp_add('hour', -var(\"snowplow__lookback_window_hours\", 6), min_last_success) }} as lower_limit,\n least({{ snowplow_utils.timestamp_add('day', var(\"snowplow__backfill_limit_days\", 30), min_last_success) }}, \n {{ dbt_utils.current_timestamp_in_utc() }}) as upper_limit\n {% endset %}\n\n {% endif %}\n\n {{ return(run_limits_query) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.cast_to_tstamp", "macro.snowplow_utils.log_message", "macro.snowplow_utils.timestamp_add", "macro.dbt_utils.current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.863615}, "macro.snowplow_utils.quarantine_sessions": {"unique_id": "macro.snowplow_utils.quarantine_sessions", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/quarantine_sessions.sql", "original_file_path": "macros/incremental_hooks/quarantine_sessions.sql", "name": "quarantine_sessions", "macro_sql": "{% macro quarantine_sessions(package_name, max_session_length, src_relation=this) %}\n \n {{ return(adapter.dispatch('quarantine_sessions', 'snowplow_utils')(package_name, max_session_length, src_relation=this)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.postgres__quarantine_sessions"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8646579}, "macro.snowplow_utils.default__quarantine_sessions": {"unique_id": "macro.snowplow_utils.default__quarantine_sessions", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/quarantine_sessions.sql", "original_file_path": "macros/incremental_hooks/quarantine_sessions.sql", "name": "default__quarantine_sessions", "macro_sql": "{% macro default__quarantine_sessions(package_name, max_session_length, src_relation=this) %}\n \n {% set quarantined_sessions = ref(package_name~'_base_quarantined_sessions') %}\n \n {% set sessions_to_quarantine_sql = snowplow_utils.get_quarantine_sql(src_relation, max_session_length) %}\n\n merge into {{ quarantined_sessions }} trg\n using ({{ sessions_to_quarantine_sql }}) src\n on trg.session_id = src.session_id\n when not matched then insert (session_id) values(session_id);\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_quarantine_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.86501}, "macro.snowplow_utils.postgres__quarantine_sessions": {"unique_id": "macro.snowplow_utils.postgres__quarantine_sessions", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/quarantine_sessions.sql", "original_file_path": "macros/incremental_hooks/quarantine_sessions.sql", "name": "postgres__quarantine_sessions", "macro_sql": "{% macro postgres__quarantine_sessions(package_name, max_session_length, src_relation=this) %}\n \n {% set quarantined_sessions = ref(package_name~'_base_quarantined_sessions') %}\n {% set sessions_to_quarantine_tmp = 'sessions_to_quarantine_tmp' %}\n\n begin;\n\n create temporary table {{ sessions_to_quarantine_tmp }} as (\n {{ snowplow_utils.get_quarantine_sql(src_relation, max_session_length) }}\n );\n\n delete from {{ quarantined_sessions }}\n where session_id in (select session_id from {{ sessions_to_quarantine_tmp }});\n\n insert into {{ quarantined_sessions }} (\n select session_id from {{ sessions_to_quarantine_tmp }});\n\n drop table {{ sessions_to_quarantine_tmp }};\n\n commit;\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_quarantine_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.865481}, "macro.snowplow_utils.get_quarantine_sql": {"unique_id": "macro.snowplow_utils.get_quarantine_sql", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/quarantine_sessions.sql", "original_file_path": "macros/incremental_hooks/quarantine_sessions.sql", "name": "get_quarantine_sql", "macro_sql": "{% macro get_quarantine_sql(relation, max_session_length) %}\n\n {# Find sessions exceeding max_session_days #}\n {% set quarantine_sql -%}\n\n select\n session_id\n\n from {{ relation }}\n -- '=' since end_tstamp is restricted to start_tstamp + max_session_days\n where end_tstamp = {{ snowplow_utils.timestamp_add(\n 'day',\n max_session_length,\n 'start_tstamp'\n ) }}\n\n {%- endset %}\n\n {{ return(quarantine_sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.865806}, "macro.snowplow_utils.get_enabled_snowplow_models": {"unique_id": "macro.snowplow_utils.get_enabled_snowplow_models", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_enabled_snowplow_models.sql", "original_file_path": "macros/incremental_hooks/get_enabled_snowplow_models.sql", "name": "get_enabled_snowplow_models", "macro_sql": "{% macro get_enabled_snowplow_models(package_name, graph_object=none, models_to_run=var(\"models_to_run\",\"\")) -%}\n \n {# Override dbt graph object if graph_object is passed. Testing purposes #}\n {% if graph_object is not none %}\n {% set graph = graph_object %}\n {% endif %}\n \n {# models_to_run optionally passed using dbt ls command. This returns a string of models to be run. Split into list #}\n {% if models_to_run|length %}\n {% set selected_models = models_to_run.split(\" \") %}\n {% else %}\n {% set selected_models = none %}\n {% endif %}\n\n {% set enabled_models = [] %}\n {% set untagged_snowplow_models = [] %}\n {% set snowplow_model_tag = package_name+'_incremental' %}\n {% set snowplow_events_this_run_path = 'model.'+package_name+'.'+package_name+'_base_events_this_run' %}\n\n {% if execute %}\n \n {% set nodes = graph.nodes.values() | selectattr(\"resource_type\", \"equalto\", \"model\") %}\n \n {% for node in nodes %}\n {# If selected_models is specified, filter for these models #}\n {% if selected_models is none or node.name in selected_models %}\n\n {% if node.config.enabled and snowplow_model_tag not in node.tags and snowplow_events_this_run_path in node.depends_on.nodes %}\n\n {%- do untagged_snowplow_models.append(node.name) -%}\n\n {% endif %}\n\n {% if node.config.enabled and snowplow_model_tag in node.tags %}\n\n {%- do enabled_models.append(node.name) -%}\n\n {% endif %}\n\n {% endif %}\n \n {% endfor %}\n\n {% if untagged_snowplow_models|length %}\n {#\n Prints warning for models that reference snowplow_base_events_this_run but are untagged as 'snowplow_web_incremental'\n Without this tagging these models will not be inserted into the manifest, breaking the incremental logic.\n Only catches first degree dependencies rather than all downstream models\n #}\n {%- do exceptions.raise_compiler_error(\"Snowplow Warning: Untagged models referencing '\"+package_name+\"_base_events_this_run'. Please refer to the Snowplow docs on tagging. \" \n + \"Models: \"+ ', '.join(untagged_snowplow_models)) -%}\n \n {% endif %}\n\n {% endif %}\n\n {{ return(enabled_models) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.868167}, "macro.snowplow_utils.get_incremental_manifest_status": {"unique_id": "macro.snowplow_utils.get_incremental_manifest_status", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_incremental_manifest_status.sql", "original_file_path": "macros/incremental_hooks/get_incremental_manifest_status.sql", "name": "get_incremental_manifest_status", "macro_sql": "{% macro get_incremental_manifest_status(incremental_manifest_table, models_in_run) -%}\n\n {% if not execute %}\n\n {{ return(['', '', '', '']) }}\n\n {% endif %}\n\n {% set last_success_query %}\n select min(last_success) as min_last_success,\n max(last_success) as max_last_success,\n coalesce(count(*), 0) as models\n from {{ incremental_manifest_table }}\n where model in ({{ snowplow_utils.print_list(models_in_run) }})\n {% endset %}\n\n {% set results = run_query(last_success_query) %}\n\n {% if execute %}\n\n {% set min_last_success = results.columns[0].values()[0] %}\n {% set max_last_success = results.columns[1].values()[0] %}\n {% set models_matched_from_manifest = results.columns[2].values()[0] %}\n {% set has_matched_all_models = true if models_matched_from_manifest == models_in_run|length else false %}\n\n {% endif %}\n\n {{ return([min_last_success, max_last_success, models_matched_from_manifest, has_matched_all_models]) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.print_list", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.86983}, "macro.snowplow_utils.print_run_limits": {"unique_id": "macro.snowplow_utils.print_run_limits", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_incremental_manifest_status.sql", "original_file_path": "macros/incremental_hooks/get_incremental_manifest_status.sql", "name": "print_run_limits", "macro_sql": "{% macro print_run_limits(run_limits_relation) -%}\n\n {% set run_limits_query %}\n select lower_limit, upper_limit from {{ run_limits_relation }}\n {% endset %}\n\n {# Derive limits from manifest instead of selecting from limits table since run_query executes during 2nd parse the limits table is yet to be updated. #}\n {% set results = run_query(run_limits_query) %}\n\n {% if execute %}\n\n {% set lower_limit = snowplow_utils.tstamp_to_str(results.columns[0].values()[0]) %}\n {% set upper_limit = snowplow_utils.tstamp_to_str(results.columns[1].values()[0]) %}\n {% set run_limits_message = \"Snowplow: Processing data between \" + lower_limit + \" and \" + upper_limit %}\n\n {% do snowplow_utils.log_message(run_limits_message) %}\n\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.snowplow_utils.tstamp_to_str", "macro.snowplow_utils.log_message"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.870558}, "macro.snowplow_utils.get_session_lookback_limit": {"unique_id": "macro.snowplow_utils.get_session_lookback_limit", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_session_lookback_limit.sql", "original_file_path": "macros/incremental_hooks/get_session_lookback_limit.sql", "name": "get_session_lookback_limit", "macro_sql": "{% macro get_session_lookback_limit(lower_limit) %}\n \n {% if not execute %}\n {{ return('')}}\n {% endif %}\n\n {% set limit_query %}\n select\n {{ snowplow_utils.timestamp_add(\n 'day', \n -var(\"snowplow__session_lookback_days\", 365),\n lower_limit) }} as session_lookback_limit\n\n {% endset %}\n\n {% set results = run_query(limit_query) %}\n \n {% if execute %}\n\n {% set session_lookback_limit = snowplow_utils.cast_to_tstamp(results.columns[0].values()[0]) %}\n\n {{ return(session_lookback_limit) }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.timestamp_add", "macro.dbt.run_query", "macro.snowplow_utils.cast_to_tstamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.871525}, "macro.snowplow_utils.return_base_new_event_limits": {"unique_id": "macro.snowplow_utils.return_base_new_event_limits", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/return_base_new_event_limits.sql", "original_file_path": "macros/incremental_hooks/return_base_new_event_limits.sql", "name": "return_base_new_event_limits", "macro_sql": "{% macro return_base_new_event_limits(base_events_this_run) -%}\n\n {% if not execute %}\n {{ return(['','',''])}}\n {% endif %}\n \n {% set limit_query %} \n select \n lower_limit, \n upper_limit,\n {{ snowplow_utils.timestamp_add('day', \n -var(\"snowplow__max_session_days\", 3),\n 'lower_limit') }} as session_start_limit\n\n from {{ base_events_this_run }} \n {% endset %}\n\n {% set results = run_query(limit_query) %}\n \n {% if execute %}\n\n {% set lower_limit = snowplow_utils.cast_to_tstamp(results.columns[0].values()[0]) %}\n {% set upper_limit = snowplow_utils.cast_to_tstamp(results.columns[1].values()[0]) %}\n {% set session_start_limit = snowplow_utils.cast_to_tstamp(results.columns[2].values()[0]) %}\n\n {{ return([lower_limit, upper_limit, session_start_limit]) }}\n\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.timestamp_add", "macro.dbt.run_query", "macro.snowplow_utils.cast_to_tstamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.873021}, "macro.snowplow_utils.snowplow_incremental_post_hook": {"unique_id": "macro.snowplow_utils.snowplow_incremental_post_hook", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/snowplow_incremental_post_hook.sql", "original_file_path": "macros/incremental_hooks/snowplow_incremental_post_hook.sql", "name": "snowplow_incremental_post_hook", "macro_sql": "{% macro snowplow_incremental_post_hook(package_name) %}\n \n {% set enabled_snowplow_models = snowplow_utils.get_enabled_snowplow_models(package_name) -%}\n\n {% set successful_snowplow_models = snowplow_utils.get_successful_models(models=enabled_snowplow_models) -%}\n\n {% set incremental_manifest_table = snowplow_utils.get_incremental_manifest_table_relation(package_name) -%}\n\n {% set base_events_this_run_table = ref(package_name~'_base_events_this_run') -%}\n \n {{ snowplow_utils.update_incremental_manifest_table(incremental_manifest_table, base_events_this_run_table, successful_snowplow_models) }} \n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.get_enabled_snowplow_models", "macro.snowplow_utils.get_successful_models", "macro.snowplow_utils.get_incremental_manifest_table_relation", "macro.snowplow_utils.update_incremental_manifest_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8737018}, "macro.snowplow_utils.update_incremental_manifest_table": {"unique_id": "macro.snowplow_utils.update_incremental_manifest_table", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/update_incremental_manifest_table.sql", "original_file_path": "macros/incremental_hooks/update_incremental_manifest_table.sql", "name": "update_incremental_manifest_table", "macro_sql": "{% macro update_incremental_manifest_table(manifest_table, base_events_table, models) -%}\n\n {{ return(adapter.dispatch('update_incremental_manifest_table', 'snowplow_utils')(manifest_table, base_events_table, models)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.snowplow_utils.postgres__update_incremental_manifest_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8752892}, "macro.snowplow_utils.default__update_incremental_manifest_table": {"unique_id": "macro.snowplow_utils.default__update_incremental_manifest_table", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/update_incremental_manifest_table.sql", "original_file_path": "macros/incremental_hooks/update_incremental_manifest_table.sql", "name": "default__update_incremental_manifest_table", "macro_sql": "{% macro default__update_incremental_manifest_table(manifest_table, base_events_table, models) -%}\n\n {% if models %}\n\n {% set last_success_query %}\n select \n b.model, \n a.last_success \n\n from \n (select max(collector_tstamp) as last_success from {{ base_events_table }}) a,\n ({% for model in models %} select '{{model}}' as model {%- if not loop.last %} union all {% endif %} {% endfor %}) b\n\n where a.last_success is not null -- if run contains no data don't add to manifest\n {% endset %}\n\n merge into {{ manifest_table }} m\n using ( {{ last_success_query }} ) s\n on m.model = s.model\n when matched then\n update set last_success = greatest(m.last_success, s.last_success)\n when not matched then\n insert (model, last_success) values(model, last_success);\n\n {% if target.type == 'snowflake' %}\n commit;\n {% endif %}\n \n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8758242}, "macro.snowplow_utils.postgres__update_incremental_manifest_table": {"unique_id": "macro.snowplow_utils.postgres__update_incremental_manifest_table", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/update_incremental_manifest_table.sql", "original_file_path": "macros/incremental_hooks/update_incremental_manifest_table.sql", "name": "postgres__update_incremental_manifest_table", "macro_sql": "{% macro postgres__update_incremental_manifest_table(manifest_table, base_events_table, models) -%}\n\n {% if models %}\n\n begin transaction;\n --temp table to find the greatest last_success per model.\n --this protects against partial backfills causing the last_success to move back in time.\n create temporary table snowplow_models_last_success as (\n select\n a.model,\n greatest(a.last_success, b.last_success) as last_success\n\n from (\n\n select\n model,\n last_success\n\n from\n (select max(collector_tstamp) as last_success from {{ base_events_table }}) as ls,\n ({% for model in models %} select '{{model}}' as model {%- if not loop.last %} union all {% endif %} {% endfor %}) as mod\n\n where last_success is not null -- if run contains no data don't add to manifest\n\n ) a\n left join {{ manifest_table }} b\n on a.model = b.model\n );\n\n delete from {{ manifest_table }} where model in (select model from snowplow_models_last_success);\n insert into {{ manifest_table }} (select * from snowplow_models_last_success);\n\n end transaction;\n\n drop table snowplow_models_last_success;\n \n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.876275}, "macro.snowplow_utils.get_new_event_limits_table_relation": {"unique_id": "macro.snowplow_utils.get_new_event_limits_table_relation", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_new_event_limits_table_relation.sql", "original_file_path": "macros/incremental_hooks/get_new_event_limits_table_relation.sql", "name": "get_new_event_limits_table_relation", "macro_sql": "{% macro get_new_event_limits_table_relation(package_name) %}\n\n {%- set new_event_limits_table = ref(package_name~'_base_new_event_limits') -%}\n\n {{ return(new_event_limits_table) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.8766139}, "macro.snowplow_utils.get_successful_models": {"unique_id": "macro.snowplow_utils.get_successful_models", "package_name": "snowplow_utils", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_utils", "path": "macros/incremental_hooks/get_successful_models.sql", "original_file_path": "macros/incremental_hooks/get_successful_models.sql", "name": "get_successful_models", "macro_sql": "{% macro get_successful_models(models=[], run_results=results) -%}\n\n {% set successful_models = [] %}\n {# Remove the patch version from dbt version #}\n {% set dbt_version_trunc = dbt_version.split('.')[0:2]|join('.')|float %}\n\n {% if execute %}\n\n {% for res in run_results -%}\n {# Filter for models #}\n {% if res.node.unique_id.startswith('model.') %}\n\n {% set is_model_to_include = true if not models|length or res.node.name in models else false %}\n\n {# run_results schema changed between dbt v0.18 and v0.19 so different methods to define success #}\n {% if dbt_version_trunc <= 0.18 %}\n {% set skipped = true if res.status is none and res.skip else false %}\n {% set errored = true if res.status == 'ERROR' else false %}\n {% set success = true if not (skipped or errored) else false %}\n {% else %}\n {% set success = true if res.status == 'success' else false %}\n {% endif %}\n\n {% if success and is_model_to_include %}\n\n {%- do successful_models.append(res.node.name) -%}\n\n {% endif %}\n\n {% endif %}\n\n {% endfor %}\n\n {{ return(successful_models) }}\n\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652369619.878505}}, "docs": {"snowplow_media_player.__snowplow_media_player__": {"unique_id": "snowplow_media_player.__snowplow_media_player__", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_overview.md", "original_file_path": "docs/markdown/snowplow_media_player_overview.md", "name": "__snowplow_media_player__", "block_contents": "# Snowplow Media Player Package\n\nWelcome to the documentation site for the Snowplow Media Player dbt package. The package is built as an extension of the [dbt-snowplow-web package][dbt-snowplow-web] that transforms raw media player event data into derived tables for easier querying generated by the Snowplow [JavaScript tracker][javascript-tracker] in combination with media tracking specific plugins such as the [Media Tracking plugin][media-tracking] or the [YouTube Tracking plugin][youtube-tracking].\n\nIn order to keep the documentations separate and less verbose, this guide will assume the reader is already familiar with configuring and running the web model and will only explain how to operate the media-player package in conjunction with the web model as the media model was designed to be run together with it. Please refer to the [snowplow-web dbt doc site][dbt-snowplow-web] for a full breakdown of the package and how to set it up.\n\nPlease note that the media player package is not compatible with the [Flutter tracker][flutter-tracker] as it is reliant on the Snowplow [JavaScript tracker][javascript-tracker].\n\n**Note this doc site is linked to the latest release of the package. If you are not using the latest release, [generate and serve](https://docs.getdbt.com/reference/commands/cmd-docs#dbt-docs-serve) the doc site locally for accurate documentation.**\n\n## Overview\n\nThis package consists of a series of dbt models with the goal to produce the following main aggregated models from the raw media player events and relevant contexts:\n\n - `snowplow_media_player_base`: This derived table summarises the key media player events and metrics of each media element on a media_id and pageview level which is considered as a base aggregation level for media interactions.\n\n - `snowplow_media_player_plays_by_pageview`: This view removes impressions from the '_base' table to summarise media plays on a page_view by media_id level.\n\n - `snowplow_media_player_media_stats`: This derived table aggregates the '_base' table to individual media_id level, calculating the main KPIs and overall video/audio metrics.\n\nThe package is built on top of the [dbt-snowplow-web package][dbt-snowplow-web] taking that as a basis to carry out the incremental update. It is designed to be run together with the web model in a similar manner to how a custom module would run:\n\nThe `_interactions_this_run` table takes the `snowplow_web_base_events_this_run` table generated by the web package as an input then adds the various contexts to enrich the base table with the additional media related fields. It could be used for custom models for more in-depth event level derived tables and further analysis.\n\nThe `_base_this_run` table then aggregates the `_interactions_this_run` table to media_id and pageview level and serves as a basis for the incrementalised derived table `_media_base`.\n\nThe main `_media_stats` derived table will also be updated incrementally based on the `_media_base` derived table, however not through the snowplow_incremental materialization, but using the native dbt incremental materialization on a pageview basis after a set time window passed. This is to prevent complex and expensive queries due to metrics which need to take the whole page_view events into calculation. This way the metrics will only be calculated once per pageview / media, after no new events are expected.\n\nThe additional `_pivot_base` table is there to calculate the percent_progress boundaries and weights that are used to calculate the total play_time and other related media fields.\n\n## Adapter Support\n\nThe Snowplow Media Player v0.1.0 package currently supports Redshift & Postgres.\n\n## Requirements\n\n- A dataset of media-player web events from the [Snowplow JavaScript tracker][javascript-tracker] must be available in the database. In order for this to happen at least one of the JavaScript based media tracking plugins need to be enabled: [Media Tracking plugin][media-tracking] or [YouTube Tracking plugin][youtube-tracking]\n- Have the [`webPage` context][webpage-context] enabled.\n- Have the [media-player event schema][media-player-event-schema] enabled.\n- Have the [media-player context schema][media-player-context-schema] enabled.\n- Depending on the plugin / intention have all the relevant contexts from below enabled:\n - in case of embedded YouTube tracking: Have the [YouTube specific context schema][youtube-specific-context-schema] enabled.\n - in case of HTML5 audio or video tracking: Have the [HTML5 media element context schema][html5-media-element-context-schema] enabled.\n - in case of HTML5 video tracking: Have the [HTML5 video element context schema][html5-video-element-context-schema] enabled.\n\n\n## Installation\n\nCheck [dbt Hub](https://hub.getdbt.com/snowplow/snowplow_media_player/latest/) for the latest installation instructions, or read the [dbt docs][dbt-package-docs] for more information on installing packages. If you already have the web package installed you might need to upgrade it in order for it to be compatible with the media_player package requirements. Otherwise it is enough to install the media_player package as it will add the web package automatically due to the dependencies.\n\n\n## Configuration\n\n### 1. Setting up variables\n\nIn general, when adding new variables to the dbt project we have to be careful around scoping the variables appropriately, especially when using multiple packages, which is the case when running the snowplow media player package. You can read more about variable scoping in dbt's docs around [variable precedence](https://docs.getdbt.com/docs/building-a-dbt-project/building-models/using-variables#variable-precedence).\n\nIn this particular case, despite being separated, running the two packages happens in sync. Although we try and name our package variables uniquely across all Snowplow dbt packages, when making any changes to them it's best to keep them separate in their appropriate scoping level. In other words, variables introduced in the web model should be set under snowplow_web and the same goes for the media_player related variables as illustrated below:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__backfill_limit_days: 60\n snowplow_media_player:\n snowplow__percent_progress_boundaries: [20, 40, 60, 80]\n\n```\n\n**Media Player specific variables:**\n\n\n> `snowplow__percent_progress_boundaries`: [10, 25, 50, 75]\n\nThe default list of percent progress values. It needs to be aligned with the values being tracked by the tracker. It is worth noting that the more these percent progress boundaries are being tracked the more accurate the play time calculations become. Please note that tracking 100% is unnecessary as there is a separate `ended` event which the model equates to achieving 100% and it also gets included automatically to this list, in case it is not added (you can refer to the helper macro `get_percentage_boundaries` ([source](https://snowplow.github.io/dbt-snowplow-media-player/#!/macro/macro.snowplow_media_player.get_percentage_boundaries)) for details).\n\n> `snowplow__valid_play_sec`: 30\n\nThe minimum number of seconds that a media play needs to last to consider that interaction a valid play. The default is 30 seconds (based on the YouTube standard) but it can be modified here, if needed.\n\n> `snowplow__complete_play_rate`: 0.99\n\nThe rate to set what percentage of a media needs to be played in order to consider that complete. 0.99 (=99%) is set as a default value here but it may be increased to 1 (or decreased) depending on the use case.\n\n> `snowplow__max_media_pv_window`: 10\n\nThe number of hours that needs to pass before new page_view level media player metrics from the snowplow_media_palyer_base table are safe to be processed by the model downstream in the snowplow_media_player_media_stats table. Please note that even if new events are added later on ( e.g. new percentprogress events are fired indicading potential replay) and the snowplow_media_player_base table is changed, the model will not update them in the media_stats table, therefore it is safer to set as big of a number as still convenient for analysis and reporting.\n\n### 2. Configuring the web model (in case it has not been run before)\n\nPlease refer to the `Quick Start` guide within the [snowplow-web dbt doc site][dbt-snowplow-web] to make sure you configure the web model appropriately. (e.g.: checking the source data or enabling desired contexts).\n\nOne thing to highlight here: as the package is built onto the snowplow_incremental_materialization logic provided by the web package, please leave the `snowplow__incremental_materialization` variable as is with the default `snowplow_incremental` value.\n\n### 3. Adding the selector.yml file\n\nWithin this package we have provided a suite of suggested selectors to run and test the models within the package together with the web model. This leverages dbt's [selector flag][dbt-selectors].\n\nThe selectors include:\n\n- `snowplow_web`: Recommended way to run the package. This selection includes all models within the Snowplow Web and Media Player package as well as any custom models you have created that are tagged with 'snowplow_web_incremental'. This is the same as in the web package.\n- `snowplow_web_lean_and_media_player_tests`: Recommended way to test the models within the web and media player packages. See the testing section for more details. There are other selectors for testing, please see the Tests section for more details on this.\n\nThese are defined in the `selectors.yml` file ([source](https://github.com/snowplow/dbt-snowplow-media-player/blob/main/selectors.yml)) within the package, however in order to use these selections you will need to copy this file into your own dbt project directory. This is a top-level file and therefore should sit alongside your `dbt_project.yml` file.\n\n## Operation\n\nDue to its unique relationship with the web package, in order to operate the media player package together with the web model there are several considerations to keep in mind. Depending on the use case one of the following scenarios may happen:\n\n1. The web package is already being used and the media tracking package needs to be added at a later time.\n2. The web package has not been used but it needs to be run together with the media player package.\n3. Only the media player package needs to be run.\n------\n### 1. Adding the media player data model to an existing dbt project with web model data already running\n\nSupposing there are months of data being collected using the web package and media tracking is introduced at that later stage there is no need to fully reprocess the web data from the date media tracking was deployed.\n\nAs models from both packages need to be run in sync, first the backfilling of the models from the new package needs to happen. Please note that during backfill no new web data is allowed to be processed and depending on the `snowplow_backfill_limit_days` configured and the period that needs backfilling it can take a while for all models to sync up and new web events to be processed.\n\nTo begin the synching process please run the following script:\n\n```bash\ndbt run -m snowplow_web.base snowplow_media_player --vars 'snowplow__start_date: '\n```\nThis way only the base module is reprocessed which is used as one of the main sources for the media player package. The web model's update logic should recognise the new media player models (as all are tagged with `snowplow_web_incremental`) and backfilling should start between the date you defined within `snowplow_start_date` and the upper limit defined by the variable `snowplow_backfill_limit_days` that is set for the web model.\n\n```bash\nSnowplow: New Snowplow incremental model. Backfilling\n```\n\n You can overwrite this limit for this backfilling process temporarily while it lasts, if needed:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__backfill_limit_days: 1\n```\n\n\nAfter this you should be able to see all media_player models added to the `derived.snowplow_web_incremental_manifest` table. Any subsequent run from this point onwards could be carried out using the recommended web model running method - using the snowplow_web selector - which automatically adds all media_models as they are within the project directory and are all tagged with `snowplow_web_incremental`.\n\n\n```bash\ndbt run --selector snowplow_web\n```\nAs soon as backfilling finishes, running the model results in both the web and the media player models being updated during the same run for the same period, both using the same latest set of data from the `_base_events_this_run` table.\n\n\n### 2. Starting both the media and web model from scratch\n\nThe easiest implementation out of the three scenarios. As the `snowplow_web_incremental_manifest` table is new, all models from both packages (plus any custom modules tagged with `snowplow_web_incremental`) will be processsed using the recommended web model running method - using the snowplow_web selector without any extra step.\n\n```bash\ndbt run --selector snowplow_web\n```\n\n### 3. Only running the media player package from the same dbt project\n\nAlthough the media player package is not designed for standalone useage, there can be scenarios where only the media player models are targeted for the update, not the web model. In such case the web model still has to be configured with the main difference that all modules that the media player model does not rely on need to be disabled. It is essentially only the base model that is needed, so please disable all the rest like so:\n\n```yml\n# dbt_project.yml\n...\nmodels:\n snowplow_web:\n page_views:\n enabled: false\n sessions:\n enabled: false\n user_mapping:\n enabled: false\n users:\n enabled: false\n```\nRunning it, however can still be achieved by running the selector as defined in the web model. In order for it to work, you can copy the selectors.yml file ([source](https://github.com/snowplow/dbt-snowplow-media-player/blob/main/selectors.yml)) from the package to your dbt project's main directory.\n\n```bash\ndbt run --selector snowplow_web\n```\n\nAfter the run finishes, you should only see the media player related models to be present within the snowplow_web_incremental_manifest table.\n## Tests\n\nFollowing the logic defined in the web package, the media player package also contains tests for both the scratch and derived models. Depending on your use case you might not want to run all tests in production, for example to save costs. There are several tags included in the package to help select subsets of tests. Tags:\n\n- `this_run`: Any model with the `_this_run` suffix\n- `scratch`: Any model in the scratch sub directories.\n- `derived`: Any of the derived models i.e. media_stats.\n- `primary-key`: Any test on the primary keys of all models in this package.\n\nThe recommended approach to testing the web model is using the selector flag 'snowplow_web_lean_tests'. When running the web model together with the media_player model, the recommendation is to use the `snowplow_web_lean_and_media_player_tests`. In order for it to work, please copy the selectors.yml file to the main project directory ([source](https://github.com/snowplow/dbt-snowplow-media-player/blob/main/selectors.yml)).\n\n```bash\ndbt test --selector snowplow_web_lean_and_media_player_tests\n```\n\nThis is equivalent to running the lean tests on the web-model as well as all media_player tests and any tests on any custom models tagged 'snowplow_media_player'.\n\nAlternatively, if you wanted to run all available tests in both the Snowplow Web and Media Player package (plus any tests on any custom models tagged 'snowplow_media_player') you can run `snowplow_web_and_media_player_tests`:\n\n```bash\ndbt test --selector snowplow_web_and_media_player_tests\n```\nIn case only the media model's tests (and any custom module tagged with 'snowplow_media_player') need to be run you can use `snowplow_media_player_tests`:\n\n```bash\ndbt test --selector snowplow_media_player_tests\n```\n\n# Custom models\n\nThere are two custom models included in the package which could potentially be used in downstream models:\n\n1. the `snowplow_media_player_session_stats` table, which aggregates the snowplow_media_base table on a session level\n\n2. the `snowplow_media_player_user_stats` table, which aggregates the snowplow_media_player_session_stats to user level\n\nBy default these are disabled, but you can enable them in the project's profiles.yml, if needed.\n\n```yml\n# dbt_project.yml\n...\n models:\n snowplow_media_player:\n custom:\n enabled: true\n```\nJust like in case of the web model, users are encouraged to use the Media Player model and its incremental logic to design their own custom models / modules. The `snowplow_media_player_interactions_this_run` table is designed with this in mind, where a couple of potentially userful fields are generated that the Media Player model does not use downstream but they nonetheless have the potential to be incorporated into users custom models.\n\nOne such example is the `player_current_time`, which is the playback position of a specific media in seconds whenever a media player event is fired, from which more precise time-based calculations could be made.\n\ne.g. subsequent events' `player_current_time` could be used to deduct the `player_end_time` of an event. Subtracting these two would result in calculated play_times instead of taking the percentprogress fields as a base like the Media Player model.\n\n```sql\nwith interaction_ends as (\n\n select\n event_id,\n event_type,\n start_tstamp,\n lead(start_tstamp, 1) over(partition by play_id order by start_tstamp) as end_tstamp,\n player_current_time,\n lead(player_current_time, 1) over(partition by play_id order by start_tstamp) as player_end_time\nfrom scratch.snowplow_media_player_interactions_this_run\n\n)\n\nselect\n\tevent_id,\n\tplayer_end_time - player_current_time as play_time_sec_calculated\n\nfrom interaction_ends\n\nwhere event_type = 'play'\n```\n# Join the Snowplow community\n\nWe welcome all ideas, questions and contributions!\n\nFor support requests, please use our community support [Discourse][discourse] forum.\n\nIf you find a bug, please report an issue on GitHub.\n\n# Copyright and license\n\nThe snowplow-media-player package is Copyright 2022 Snowplow Analytics Ltd.\n\nLicensed under the [Apache License, Version 2.0][license] (the \"License\");\nyou may not use this software except in compliance with the License.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n[license]: http://www.apache.org/licenses/LICENSE-2.0\n[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat\n[tracker-classificiation]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/\n[early-release]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Early%20Release&color=014477&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC\n\n[tracker-docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/\n\n[webpage-context]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/tracker-setup/initialization-options/#Adding_predefined_contexts\n\n[media-player-event-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/media_player_event/jsonschema/1-0-0\n[media-player-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/media_player/jsonschema/1-0-0\n[youtube-specific-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.youtube/youtube/jsonschema/1-0-0\n[html5-media-element-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/org.whatwg/media_element/jsonschema/1-0-0\n[html5-video-element-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/org.whatwg/video_element/jsonschema/1-0-0\n\n[media-tracking]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/plugins/media-tracking/\n\n[javascript-tracker]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3\n\n[youtube-tracking]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/plugins/youtube-tracking/\n\n[dbt-selectors]: https://docs.getdbt.com/reference/node-selection/yaml-selectors\n[selectors-yml-file]: https://github.com/\n\n[dbt-package-docs]: https://docs.getdbt.com/docs/building-a-dbt-project/package-management\n\n[discourse-image]: https://img.shields.io/discourse/posts?server=https%3A%2F%2Fdiscourse.snowplowanalytics.com%2F\n[discourse]: http://discourse.snowplowanalytics.com/\n\n[snowplow-media-player-docs]: https://snowplow.github.io/dbt-snowplow-media-player/#!/overview/snowplow_media_player\n\n[dbt-snowplow-web]: https://snowplow.github.io/dbt-snowplow-web/#!/overview/snowplow_web\n\n[flutter-tracker]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/flutter-tracker/"}, "snowplow_media_player.table_page_view_context": {"unique_id": "snowplow_media_player.table_page_view_context", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_atomic_docs.md", "name": "table_page_view_context", "block_contents": "This context table contains the `page_view_id` associated with an event."}, "snowplow_media_player.table_media_player_event": {"unique_id": "snowplow_media_player.table_media_player_event", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_atomic_docs.md", "name": "table_media_player_event", "block_contents": "The table specifying the media player event type (e.g. playing, seek) and the label given for the media for user friendly identification."}, "snowplow_media_player.table_media_player_context": {"unique_id": "snowplow_media_player.table_media_player_context", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_atomic_docs.md", "name": "table_media_player_context", "block_contents": "This context table contains a set of entities that are common between media events across platforms."}, "snowplow_media_player.table_youtube_context": {"unique_id": "snowplow_media_player.table_youtube_context", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_atomic_docs.md", "name": "table_youtube_context", "block_contents": "The context table with data specific to embedded YouTube videos."}, "snowplow_media_player.table_html_media_element_context": {"unique_id": "snowplow_media_player.table_html_media_element_context", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_atomic_docs.md", "name": "table_html_media_element_context", "block_contents": "This context table contains the entities related to the HTML5 Media Element, adapted from the\u00a0whatwg\u00a0spec."}, "snowplow_media_player.table_html_video_element_context": {"unique_id": "snowplow_media_player.table_html_video_element_context", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_atomic_docs.md", "name": "table_html_video_element_context", "block_contents": "This context table contains the entities related to the HTML5 Video Element, adapted from the\u00a0whatwg\u00a0spec."}, "snowplow_media_player.col_event_id": {"unique_id": "snowplow_media_player.col_event_id", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_event_id", "block_contents": "A UUID for each event e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`."}, "snowplow_media_player.col_media_id": {"unique_id": "snowplow_media_player.col_media_id", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_media_id", "block_contents": "The unique identifier of a specific media element. It is the `player_id` in case of YouTube and `html_id` in case of HTML5."}, "snowplow_media_player.col_play_id": {"unique_id": "snowplow_media_player.col_play_id", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_play_id", "block_contents": "The surrogate key generated from `page_view_id` and `media_id `to create a unique play event identifier."}, "snowplow_media_player.col_page_view_id": {"unique_id": "snowplow_media_player.col_page_view_id", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_page_view_id", "block_contents": "A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`."}, "snowplow_media_player.col_domain_sessionid": {"unique_id": "snowplow_media_player.col_domain_sessionid", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_domain_sessionid", "block_contents": "A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`."}, "snowplow_media_player.col_domain_userid": {"unique_id": "snowplow_media_player.col_domain_userid", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_domain_userid", "block_contents": "User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`."}, "snowplow_media_player.col_event_type": {"unique_id": "snowplow_media_player.col_event_type", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_event_type", "block_contents": "The type of event generated by the media player. e.g. 'ended', 'paused', 'playing'."}, "snowplow_media_player.col_media_type": {"unique_id": "snowplow_media_player.col_media_type", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_media_type", "block_contents": "The type of media content: video or audio."}, "snowplow_media_player.col_media_player_type": {"unique_id": "snowplow_media_player.col_media_player_type", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_media_player_type", "block_contents": "The combination of schema_name and schema_vendor coming from the specific media player context e.g. com.youtube-youtube, org.whatwg-media_element."}, "snowplow_media_player.col_page_referrer": {"unique_id": "snowplow_media_player.col_page_referrer", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_page_referrer", "block_contents": "URL of the referrer e.g. `http://www.referrer.com`."}, "snowplow_media_player.col_page_url": {"unique_id": "snowplow_media_player.col_page_url", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_page_url", "block_contents": "The page URL e.g. `http://www.example.com`."}, "snowplow_media_player.col_source_url": {"unique_id": "snowplow_media_player.col_source_url", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_source_url", "block_contents": "The url which shows the source of the media content. For YouTube it is the `url` context field, for HTML5 it is the `source_url` field."}, "snowplow_media_player.col_geo_region_name": {"unique_id": "snowplow_media_player.col_geo_region_name", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_geo_region_name", "block_contents": "Visitor region name e.g. `Florida`."}, "snowplow_media_player.col_br_name": {"unique_id": "snowplow_media_player.col_br_name", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_br_name", "block_contents": "Browser name e.g. `Firefox 12`."}, "snowplow_media_player.col_dvce_type": {"unique_id": "snowplow_media_player.col_dvce_type", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_dvce_type", "block_contents": "Type of device e.g. `Computer`."}, "snowplow_media_player.col_os_name": {"unique_id": "snowplow_media_player.col_os_name", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_os_name", "block_contents": "Name of operating system e.g. `Android`."}, "snowplow_media_player.col_os_timezone": {"unique_id": "snowplow_media_player.col_os_timezone", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_os_timezone", "block_contents": "Client operating system timezone e.g. `Europe/London`."}, "snowplow_media_player.col_duration": {"unique_id": "snowplow_media_player.col_duration", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_duration", "block_contents": "Total length of media in seconds e.g. it's a 5:32 youtube video so the duration is 332 seconds."}, "snowplow_media_player.col_playback_rate": {"unique_id": "snowplow_media_player.col_playback_rate", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_playback_rate", "block_contents": "Playback rate (1 is normal speed)."}, "snowplow_media_player.col_playback_quality": {"unique_id": "snowplow_media_player.col_playback_quality", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_playback_quality", "block_contents": "Depending on the player it is either the playback quality field or the resolution."}, "snowplow_media_player.col_percent_progress": {"unique_id": "snowplow_media_player.col_percent_progress", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_percent_progress", "block_contents": "The percent of the way through the media. It is based on either the percentprogress event that is fired at specific intervalls as defined during the tracker setup or the 'ended' event, which is equivalent to reaching 100% of the media's total duration (length). e.g. 25, meaning the user passed the 25% mark during play. It does not mean the user watched all the content in between two percentprogress marks, unless there is no seek events happening within the same page_view (`snowplow_media_player_base`)."}, "snowplow_media_player.col_percent_progress_reached": {"unique_id": "snowplow_media_player.col_percent_progress_reached", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_percent_progress_reached", "block_contents": "An array of percent progresses reached by the user while playing the media. In case the same percentprogress event was fired during the same page_view (e.g. due to seeks to rewatch part of the video) the % is added to the array again. e.g. in case of percent_progress_reached = [10, 25, 25, 50, 75] the user replayed part of the media so that the percentprogress event fired twice at the 25% mark."}, "snowplow_media_player.col_is_muted": {"unique_id": "snowplow_media_player.col_is_muted", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_is_muted", "block_contents": "If the media is muted during the event that is fired."}, "snowplow_media_player.col_start_tstamp": {"unique_id": "snowplow_media_player.col_start_tstamp", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_start_tstamp", "block_contents": "The `derived_tstamp` denoting the time when the event started."}, "snowplow_media_player.col_end_tstamp": {"unique_id": "snowplow_media_player.col_end_tstamp", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_end_tstamp", "block_contents": "The `derived_tstamp` denoting the time when the last media player event belonging to the specific level of aggregation (e.g.: page_view by media) started."}, "snowplow_media_player.col_play_time_sec": {"unique_id": "snowplow_media_player.col_play_time_sec", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_play_time_sec", "block_contents": "Estimated duration of play in seconds. It is calculated using the percent_progress events that are fired during play. In case such an event is fired, it is assumed that the total section of the media in between the previous and current percent_progress is played through, even if the user seeks to another point in time within the audio / video. The more often these events are tracked (e.g. every 5% of the media's length) the more accurate the calculation becomes."}, "snowplow_media_player.col_avg_play_time_min": {"unique_id": "snowplow_media_player.col_avg_play_time_min", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_avg_play_time_min", "block_contents": "Estimated average duration of plays in minutes."}, "snowplow_media_player.col_avg_play_time_sec": {"unique_id": "snowplow_media_player.col_avg_play_time_sec", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_avg_play_time_sec", "block_contents": "Estimated average duration of plays in seconds."}, "snowplow_media_player.col_first_play": {"unique_id": "snowplow_media_player.col_first_play", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_first_play", "block_contents": "The `derived_tstamp` of the beginning of the first play of a media element."}, "snowplow_media_player.col_last_play": {"unique_id": "snowplow_media_player.col_last_play", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_last_play", "block_contents": "The `derived_tstamp` of the beginning of the last play of a media element."}, "snowplow_media_player.col_valid_plays": {"unique_id": "snowplow_media_player.col_valid_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_valid_plays", "block_contents": "The sum of all media plays that exceeds the minimum media length set within the variable `snowplow__valid_play_sec`, it is defaulted to 30 (seconds)."}, "snowplow_media_player.col_impressions": {"unique_id": "snowplow_media_player.col_impressions", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_impressions", "block_contents": "The number of pageviews where a media content was rendered regardless of whether the media was actually played or not."}, "snowplow_media_player.col_avg_playback_rate": {"unique_id": "snowplow_media_player.col_avg_playback_rate", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_avg_playback_rate", "block_contents": "Average playback rate (1 is normal speed)."}, "snowplow_media_player.col_play_rate": {"unique_id": "snowplow_media_player.col_play_rate", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_play_rate", "block_contents": "Total plays divided by impressions. Please note that as the base for media plays is pageview / media_id, in case the same video is played multiple times within the same pageview, it will still count as one play."}, "snowplow_media_player.col_complete_plays": {"unique_id": "snowplow_media_player.col_complete_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_complete_plays", "block_contents": "The number of plays where the total percentage played is bigger than or equal to the `snowplow__complete_play_rate`. Default is 0.99, meaning that 99% of the video being watched constitutes a complete play."}, "snowplow_media_player.col_completion_rate_by_plays": {"unique_id": "snowplow_media_player.col_completion_rate_by_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_completion_rate_by_plays", "block_contents": "The number of complete plays divided by the number of pageviews with plays of any duration."}, "snowplow_media_player.col_retention_rate": {"unique_id": "snowplow_media_player.col_retention_rate", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_retention_rate", "block_contents": "The maximum percent progress reached before any seek event."}, "snowplow_media_player.col_avg_percent_played": {"unique_id": "snowplow_media_player.col_avg_percent_played", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_avg_percent_played", "block_contents": "Average of total play_time divided by the media duration."}, "snowplow_media_player.col__percent_reached": {"unique_id": "snowplow_media_player.col__percent_reached", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col__percent_reached", "block_contents": "Field(s) calculated based on the `snowplow_mp_percent_progress` list, which shows how many times a certain percent progress has been reached. Please note that `100_percent_reached` = 1 does not necessarily mean that one user has played the media fully, but that there was either an 'ended' event or a 'percentprogress' event with a value of 100 and the user could still have seeked just before the end. If the same user replays part of the media during the same page_view, it will be counted in the total number."}, "snowplow_media_player.col_derived_tstamp": {"unique_id": "snowplow_media_player.col_derived_tstamp", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_derived_tstamp", "block_contents": "Timestamp making allowance for inaccurate device clock e.g. `2013-11-26 00:02:04`."}, "snowplow_media_player.col_collector_tstamp": {"unique_id": "snowplow_media_player.col_collector_tstamp", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_collector_tstamp", "block_contents": "Time stamp for the event recorded by the collector e.g. `2013-11-26 00:02:05`."}, "snowplow_media_player.col_weight_rate": {"unique_id": "snowplow_media_player.col_weight_rate", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_weight_rate", "block_contents": "The weight given for each percent progress reached used for the calculation of the play_time_sec_estimated field. It is based on the difference of the current and preciding percent_progress rate."}, "snowplow_media_player.col_play_time_sec_muted": {"unique_id": "snowplow_media_player.col_play_time_sec_muted", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_play_time_sec_muted", "block_contents": "Calculated duration of muted play in seconds. It is based on the percent_progress event and whether the user played it on mute during this event or not."}, "snowplow_media_player.col_is_played": {"unique_id": "snowplow_media_player.col_is_played", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_is_played", "block_contents": "Pageviews with at least one play event."}, "snowplow_media_player.col_is_valid_play": {"unique_id": "snowplow_media_player.col_is_valid_play", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_is_valid_play", "block_contents": "A boolean value to show whether the duration of the play (`play_time_sec`) is bigger than or equal to the variable given in `snowplow__valid_play_sec` (defaulted to 30)."}, "snowplow_media_player.col_is_complete_play": {"unique_id": "snowplow_media_player.col_is_complete_play", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_is_complete_play", "block_contents": "A boolean value to show whether the total percentage played is bigger than or equal to the `snowplow__complete_play_rate` (defaulted to 0.99)."}, "snowplow_media_player.col_seeks": {"unique_id": "snowplow_media_player.col_seeks", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_seeks", "block_contents": "The count of seek events within a certain aggregation level. The seek event occurs when a user moves/skips to a new position in the media content."}, "snowplow_media_player.col_videos_played": {"unique_id": "snowplow_media_player.col_videos_played", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_videos_played", "block_contents": "The distinct number of videos that were played during a session."}, "snowplow_media_player.col_audio_played": {"unique_id": "snowplow_media_player.col_audio_played", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_audio_played", "block_contents": "The distinct number of audio files that were played during a session."}, "snowplow_media_player.col_valid_video_plays": {"unique_id": "snowplow_media_player.col_valid_video_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_valid_video_plays", "block_contents": "The sum of all video plays that exceed the limit set within the variable `snowplow__valid_play_sec`, it is defaulted to 30 seconds."}, "snowplow_media_player.col_valid_audio_plays": {"unique_id": "snowplow_media_player.col_valid_audio_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_valid_audio_plays", "block_contents": "The sum of all audio plays that exceeded the limit set within the variable `snowplow__valid_play_sec`, it is defaulted to 30 seconds."}, "snowplow_media_player.col_play_time_min": {"unique_id": "snowplow_media_player.col_play_time_min", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_play_time_min", "block_contents": "Calculated duration of play in minutes."}, "snowplow_media_player.col_play_time_min_muted": {"unique_id": "snowplow_media_player.col_play_time_min_muted", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_play_time_min_muted", "block_contents": "Calculated duration of muted play in minutes. It is based on the percent_progress event and whether the user played it on mute during this event or not."}, "snowplow_media_player.col_avg_retention_rate": {"unique_id": "snowplow_media_player.col_avg_retention_rate", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_avg_retention_rate", "block_contents": "The average percent progress reached that is played before any seek event."}, "snowplow_media_player.col_plays": {"unique_id": "snowplow_media_player.col_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_plays", "block_contents": "The number of pageviews with plays of any duration."}, "snowplow_media_player.col_video_plays": {"unique_id": "snowplow_media_player.col_video_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_video_plays", "block_contents": "The number of pageviews with video plays of any duration."}, "snowplow_media_player.col_audio_plays": {"unique_id": "snowplow_media_player.col_audio_plays", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_audio_plays", "block_contents": "The number of pageviews with audio plays of any duration."}, "snowplow_media_player.col_last_base_tstamp": {"unique_id": "snowplow_media_player.col_last_base_tstamp", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_last_base_tstamp", "block_contents": "The start_tstamp of the last processed page_view across all media_ids to be used as a lower limit for subsequent incremental runs."}, "snowplow_media_player.col_player_current_time": {"unique_id": "snowplow_media_player.col_player_current_time", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_player_current_time", "block_contents": "The playback position of a specific media in seconds whenever a media player event is fired. Could be used in custom models for more detailed analytics or play time calculations."}, "snowplow_media_player.col_media_label": {"unique_id": "snowplow_media_player.col_media_label", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_media_label", "block_contents": "The optional, human readable name given to tracked media content."}, "snowplow_media_player.col_avg_session_play_time_min": {"unique_id": "snowplow_media_player.col_avg_session_play_time_min", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_avg_session_play_time_min", "block_contents": "Estimated average duration of plays in seconds within a session."}, "snowplow_media_player.col_is_live": {"unique_id": "snowplow_media_player.col_is_live", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_is_live", "block_contents": "If the media is live."}, "snowplow_media_player.col_loop": {"unique_id": "snowplow_media_player.col_loop", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_loop", "block_contents": "If the video should restart after ending."}, "snowplow_media_player.col_volume": {"unique_id": "snowplow_media_player.col_volume", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_common_cols.md", "original_file_path": "docs/markdown/snowplow_media_player_common_cols.md", "name": "col_volume", "block_contents": "Volume percent."}, "snowplow_media_player.table_interactions_this_run": {"unique_id": "snowplow_media_player.table_interactions_this_run", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_interactions_this_run", "block_contents": "This staging table shows all media player events within the current incremental run and calculates play_time. It could be used in custom models for more in-depth time based calculations."}, "snowplow_media_player.table_base_this_run": {"unique_id": "snowplow_media_player.table_base_this_run", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_base_this_run", "block_contents": "This staging table aggregates media player interactions within the current run to a pageview level that is considered a base level for media plays."}, "snowplow_media_player.table_base": {"unique_id": "snowplow_media_player.table_base", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_base", "block_contents": "This derived table aggregates media player interactions to a pageview level incrementally."}, "snowplow_media_player.table_plays_by_pageview": {"unique_id": "snowplow_media_player.table_plays_by_pageview", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_plays_by_pageview", "block_contents": "This view removes impressions from the derived snowplow_media_base table for showing pageview level media play events."}, "snowplow_media_player.table_plays_by_session": {"unique_id": "snowplow_media_player.table_plays_by_session", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_plays_by_session", "block_contents": "This table aggregates the pageview level interactions to show session level media stats."}, "snowplow_media_player.table_user_stats": {"unique_id": "snowplow_media_player.table_user_stats", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_user_stats", "block_contents": "This table aggregates the pageview level interactions to show user level media stats."}, "snowplow_media_player.table_media_stats": {"unique_id": "snowplow_media_player.table_media_stats", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_media_stats", "block_contents": "This derived table aggregates the pageview level interactions to show overall media stats."}, "snowplow_media_player.table_pivot_base": {"unique_id": "snowplow_media_player.table_pivot_base", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "markdown/snowplow_media_player_model_docs.md", "original_file_path": "docs/markdown/snowplow_media_player_model_docs.md", "name": "table_pivot_base", "block_contents": "This helper table serves as a base to calculate percent_progress based fields as well as the play_time metrics (by calculating the weight attributed to a percent progress being reached)."}, "dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/Users/agneskiss/Desktop/virt_envs/env-dbt-100/lib/python3.8/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/overview)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}, "snowplow_web.table_users_this_run": {"unique_id": "snowplow_web.table_users_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_users_docs.md", "original_file_path": "docs/markdown/snowplow_web_users_docs.md", "name": "table_users_this_run", "block_contents": "This staging table contains all the users for the given run of the Web model. It possess all the same columns as `snowplow_web_users`. If building a custom module that requires session level data, this is the table you should reference."}, "snowplow_web.table_users": {"unique_id": "snowplow_web.table_users", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_users_docs.md", "original_file_path": "docs/markdown/snowplow_web_users_docs.md", "name": "table_users", "block_contents": "This derived incremental table contains all historic users data and should be the end point for any analysis or BI tools."}, "snowplow_web.table_users_aggs": {"unique_id": "snowplow_web.table_users_aggs", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_users_docs.md", "original_file_path": "docs/markdown/snowplow_web_users_docs.md", "name": "table_users_aggs", "block_contents": "This model aggregates various metrics derived from sessions to a users level."}, "snowplow_web.table_users_lasts": {"unique_id": "snowplow_web.table_users_lasts", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_users_docs.md", "original_file_path": "docs/markdown/snowplow_web_users_docs.md", "name": "table_users_lasts", "block_contents": "This model identifies the last page view for a user and returns various dimensions associated with that page view."}, "snowplow_web.table_users_sessions_this_run": {"unique_id": "snowplow_web.table_users_sessions_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_users_docs.md", "original_file_path": "docs/markdown/snowplow_web_users_docs.md", "name": "table_users_sessions_this_run", "block_contents": "This model contains all sessions data related to users contained in the given run of the Web model"}, "snowplow_web.__snowplow_web__": {"unique_id": "snowplow_web.__snowplow_web__", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_overview.md", "original_file_path": "docs/markdown/snowplow_web_overview.md", "name": "__snowplow_web__", "block_contents": "# Snowplow Web Package\n\nWelcome to the documentation site for the Snowplow web dbt package. The package contains is a fully incremental model, that transforms raw web event data generated by the [Snowplow JavaScript tracker](https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/) into a series of derived tables of varying levels of aggregation.\n\n**Note this doc site is linked to latest release of the package. If you are not using the latest release, [generate and serve](https://docs.getdbt.com/reference/commands/cmd-docs#dbt-docs-serve) the doc site locally for accurate documentation.**\n\n## Overview\n\nThis model consists of a series of modules, each producing a table which serves as the input to the next module. The 'standard' modules are:\n\n- Base: Performs the incremental logic, outputting the table `snowplow_web_base_events_this_run` which contains a de-duped data set of all events required for the current run of the model.\n- Page Views: Aggregates event level data to a page view level, `page_view_id`.\n- Sessions: Aggregates page view level data to a session level, `domain_sessionid`.\n- Users: Aggregates session level data to a users level, `domain_userid`.\n- User Mapping: Provides a mapping between user identifiers, `domain_userid` and `user_id`. This can be used for session stitching.\n\nThe 'standard' modules can be thought of as source code for the core logic of the model, which Snowplow maintains. These modules carry out the incremental logic in such a way as custom modules can be written to plug into the model's structure, without needing to write a parallel incremental logic. We recommend that all customisations are written in this way, which allows us to safely maintain and roll out updates to the model, without impact on dependent custom sql.\n\nEach module produces a table which acts as the input to the subsequent module (the `_this_run` tables), and updates a derived table - with the exception of the Base module, which takes atomic data as its input, and does not update a derived table.\n\n## Adapter Support\n\nThe Snowplow Web v0.6.1 package currently supports BigQuery, Redshift, Snowflake & Postgres.\n\n## Installation\n\nCheck [dbt Hub](https://hub.getdbt.com/snowplow/snowplow_web/latest/) for the latest installation instructions, or read the [dbt docs][dbt-package-docs] for more information on installing packages.\n\n## Quick Start\n\n### 1 - Check source data\n\nThis package will by default will assume your Snowplow events data is contained in the `atomic` schema of your [target.database](https://docs.getdbt.com/docs/running-a-dbt-project/using-the-command-line-interface/configure-your-profile). In order to change this, please add the following to your `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__atomic_schema: schema_with_snowplow_events\n snowplow__database: database_with_snowplow_events\n```\n\n### 2 - Enabled desired contexts\n\nThe web package has the option to join in data from the following 3 Snowplow enrichments:\n\n- [IAB enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/iab-enrichment/)\n- [UA Parser enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/ua-parser-enrichment/)\n- [YAUAA enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/yauaa-enrichment/)\n\nBy default these are **all disabled** in the web package. Assuming you have the enrichments turned on in your Snowplow pipeline, to enable the contexts within the package please add the following to your `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__enable_iab: true\n snowplow__enable_ua: true\n snowplow__enable_yauaa: true\n```\n\n### 3 - Filter your data set\n\nYou can specify both `start_date` at which to start processing events and the `app_id`'s to filter for. By default the `start_date` is set to `2020-01-01` and all `app_id`'s are selected. To change this please add the following to your `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__start_date: 'yyyy-mm-dd'\n snowplow__app_id: ['my_app_1','my_app_2']\n```\n\n#### BigQuery Only\n\nVerify which column your events table is partitioned on. It will likely be partitioned on `collector_tstamp` or `derived_tstamp`. If it is partitioned on `collector_tstamp` you should set `snowplow__derived_tstamp_partitioned` to `false`. This will ensure only the `collector_tstamp` column is used for partition pruning when querying the events table:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__derived_tstamp_partitioned: false\n```\n\n### 4 - Verify page ping variables\n\nThe web package processes page ping events to calculate web page engagement times. If your [tracker configuration](https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/tracking-events/#activity-tracking-page-pings) for `min_visit_length` (default 5) and `heartbeat` (default 10) differs from the defaults provided in this package, you can override by adding to your `dbt_project.yml`:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__min_visit_length: 5 # Default value\n snowplow__heartbeat: 10 # Default value\n```\n\n## Configuration\n\n### Output Schemas\n\nBy default all scratch/staging tables will be created in the `_scratch` schema, the derived tables (`snowplow_web_page_views`, `snowplow_web_sessions`, `snowplow_web_users`) will be created in `_derived` and all manifest tables in `_snowplow_manifest`. To change, please add the following to your `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\n...\nmodels:\n snowplow_web:\n base:\n manifest:\n +schema: my_manifest_schema\n scratch:\n +schema: my_scratch_schema\n page_views:\n +schema: my_derived_schema\n scratch:\n +schema: my_scratch_schema\n sessions:\n +schema: my_derived_schema\n scratch:\n +schema: my_scratch_schema\n users:\n +schema: my_derived_schema\n scratch:\n +schema: my_scratch_schema\n```\n\n### Disabling a standard module\n\nIf you do not require certain modules provided by the package you have the option to disable them. For instance to disable the users module:\n\n```yml\n# dbt_project.yml\n...\nmodels:\n snowplow_web:\n users:\n enabled: false\n```\n\nNote that any dependent modules will also need to be disabled - for instance if you disabled the sessions module, you will also have to disable the users module.\n\n### Further Configuration\n\nThis package makes use of a series of other variables, which are all set to the recommend values for the operation of the web model. Depending on your use case, you might want to override these values by adding to your `dbt_project.yml` file.\n\n`snowplow__lookback_window_hours`: Default 6. The number of hours to look before the latest event processed - to account for late arriving data, which comes out of order.\n\n`snowplow__backfill_limit_days`: Default 30. The maximum numbers of days of new data to be processed since the latest event processed. Please refer to the back-filling section for more details.\n\n`snowplow__session_lookback_days`: Default 365. Number of days to limit scan on snowplow_web_base_sessions_lifecycle_manifest manifest. Exists to improve performance of model when we have a lot of sessions. Should be set to as large a number as practical.\n\n`snowplow__days_late_allowed`: Default 3. The maximum allowed number of days between the event creation and it being sent to the collector. Exists to reduce lengthy table scans that can occur as a result of late arriving data.\n\n`snowplow__max_session_days`: Default 3. The maximum allowed session length in days. For a session exceeding this length, all events after this limit will stop being processed. Exists to reduce lengthy table scans that can occur due to long sessions which are usually a result of bots.\n\n`snowplow__upsert_lookback_days`: Default 30. Number of day to look back over the incremental derived tables during the upsert. Where performance is not a concern, should be set to as long a value as possible. Having too short a period can result in duplicates. Please see the incremental materialization section for more details.\n\n`snowplow__ua_bot_filter`: Default `True`. Configuration to filter out bots via the useragent string pattern match.\n\n`snowplow__sessions_table`: Default `{{ ref('snowplow_web_sessions') }}`. The users module requires data from the derived sessions table. If you choose to disable the standard sessions table in favor of your own custom table, set this to reference your new table e.g. `{{ ref('snowplow_web_sessions_custom') }}`. Please see the [README](https://github.com/snowplow/dbt-snowplow-web/tree/main/custom_example) in the `custom_example` directory for more information on this sort of implementation.\n\n`snowplow__has_log_enabled`: Default `True`. When executed, the package logs information about the current run to the CLI. This can be disabled by setting to `false`.\n\n`snowplow__query_tag`: Default: `snowplow_dbt`. This sets the value of the query_tag for Snowflake database use. This is used internally for metric gathering in Snowflake and its value should not be changed.\n\n`snowplow__incremental_materialization`: Default `snowplow_incremental`. The materialization used for all incremental models within the package. `snowplow_incremental` builds upon the default incremental materialization provided by dbt, improving performance when modeling event data. If however you prefer to use the native dbt incremental materialization, or any other, then adjust accordingly.\n\n`snowplow__allow_refresh`: Default `False`. Used as the default value to return from the `allow_refresh()` macro. This macro determines whether the manifest tables can be refreshed or not, depending on your environment. See the 'Manifest Tables' section for more details.\n\n`snowplow__dev_target_name`: Default: `dev`. The [target name](https://docs.getdbt.com/reference/profiles.yml) of your development environment as defined in your `profiles.yml` file. See the 'Manifest Tables' section for more details.\n\n`snowplow__session_stitching`: Default: `True`. Determines whether to apply the user mapping to the sessions table. Please see the 'User Mapping' section for more details.\n\n## YAML Selectors\n\nWithin this package we have provided a suite of suggested selectors to run and test the models within the package. This leverages dbt's [selector flag][dbt-selectors].\n\nThe selectors include:\n\n- `snowplow_web`: Recommended way to run the package. This selection includes all models within the Snowplow Web as well as any custom models you have created.\n- `snowplow_web_lean_tests`: Recommended way to test the models within the package. See the testing section for more details.\n\nThese are defined in the [`selectors.yml` file][selectors-yml-file] within the package, however in order to use these selections you will need to copy this file into your own dbt project directory. This is a top-level file and therefore should sit alongside your `dbt_project.yml` file.\n\n## Operation\n\nThe Snowplow web model is designed to be run as a whole, which ensures all incremental tables are kept in sync. As such, run the model using:\n\n```bash\ndbt run --models snowplow_web tag:snowplow_web_incremental\n```\n\nThe `snowplow_web` selection will execute all nodes within the Snowplow web package, while the `tag:snowplow_web_incremental` will execute all custom modules that you may have created.\n\nGiven the verbose nature of this command we suggest using the YAML selectors we have provided (see section above). The equivalent command using the selector flag would be:\n\n```bash\ndbt run --selector snowplow_web\n```\n\n### Manifest Tables\n\nThere are 3 manifest tables included in this package:\n\n- `snowplow_web_incremental_manifest`: Records the current state of the package.\n- `snowplow_web_base_sessions_lifecycle_manifest`: Records the start & end timestamp of all sessions.\n- `snowplow_web_base_quarantined_sessions`: Records sessions that have exceeded the maximum allowed session length, defined by `snowplow__max_session_days` (default 3 days).\n\nPlease refer to the 'Incremental Logic' section more details on the purpose of each of these tables.\n\nThese manifest models are critical to the package **and as such are protected from full refreshes, i.e. being dropped, by default when running in production, while in development refreshes are allowed.**\n\nThe `allow_refresh()` macro defines this behavior. As [dbt recommends](https://docs.getdbt.com/faqs/target-names), target names are used here to differentiate between your prod and dev environment. By default, this macro assumes your dev target is named `dev`. This can be changed by setting the `snowplow__dev_target_name` var in your `project.yml` file.\n\nTo full refresh any of the manifest models in production, set the `snowplow__allow_refresh` to `true` at run time (see below).\n\nAlternatively, you can amend the behavior of this macro entirely by overwriting it. See the 'Overwriting Macros' section for more details.\n\n### Complete refresh of Snowplow web package\n\nWhile you can drop and recompute the incremental tables within this package using the standard `--full-refresh` flag, as mentioned above all manifest tables are protected from being dropped in production. Without dropping the manifest during a full refresh, the selected derived incremental tables would be dropped but the processing of events would resume from where the package left off (as captured by the `snowplow_web_incremental_manifest` table) rather than your `snowplow__start_date`.\n\nIn order to drop all the manifest tables and start again set the `snowplow__allow_refresh` var to `true` at run time:\n\n```bash\ndbt run --models snowplow_web tag:snowplow_web_incremental --full-refresh --vars 'snowplow__allow_refresh: true'\n# or using selector flag\ndbt run --selector snowplow_web --full-refresh --vars 'snowplow__allow_refresh: true'\n```\n\n### Back-filling custom modules\n\nOvertime you may wish to add custom modules to extend the functionality of this package. As you introduce new custom modules into your project, assuming they are tagged correctly (see section on custom modules), the web model will automatically replay all events up until the latest event to have been processed by the other modules.\n\nNote that the batch size of this back-fill is limited as outlined in the 'identification of events to process' section. This means it might take several runs to complete the back-fill, **during which time no new events will be processed by the web model**.\n\nDuring back-filling, the derived page views, sessions and users tables are blocked from updating. This is to protect against a batched back-fill temporarily introducing incomplete data into these derived tables.\n\nBack-filling a module can be performed either as part of the entire run of the Snowplow web package, or in isolation to reduce cost (recommended):\n\n```bash\ndbt run --models snowplow_web tag:snowplow_web_incremental # Will execute all Snowplow web modules, as well as custom.\ndbt run --models +my_custom_module # Will execute only your custom module + any upstream nodes.\n```\n\n### Tearing down a subset of models\n\nAs the code base for your custom modules evolves, you will likely need to replay events through a given module. In order to do so, the models within your custom module need to be removed from the `snowplow_web_incremental_manifest` table. See the 'Complete refresh' section for an explanation as to why. This removal can be achieved by passing the model's name to the `models_to_remove'` var at run time. If you want to replay events through a series of dependent models, you only need to pass the name of the endmost model within the run:\n\n```bash\ndbt run --models +snowplow_web_custom_incremental_model --full-refresh --vars 'models_to_remove: snowplow_web_custom_incremental_model'\n```\n\nBy removing the `snowplow_web_custom_incremental_model` model from the manifest the web packages will be in state 2 and will replay all events.\n\n## Tests\n\nThis package contains tests for both the scratch and derived models. Depending on your use case you might not want to run all tests in production, for example to save costs. There are several tags included in the package to help select subsets of tests. Tags:\n\n- `this_run`: Any model with the `_this_run` suffix\n- `scratch`: Any model in the scratch sub directories.\n- `derived`: Any of the derived models i.e. page views, sessions and users.\n- `primary-key`: Any test on the primary keys of all models in this package.\n\nFor example if your derived tables are very large you may want to run the full test suite on the `this_run` tables, which act as the input for the derived tables, but only primary key schema tests on the derived tables to ensure no duplicates. If using such a set up, we would also recommend including the `page_view_in_session_value` data test for the page views derived tables.\n\nThis is our recommended approach to testing and can be implemented using the selector flag (see YAML selectors section for more details) as follows:\n\n```bash\ndbt test --selector snowplow_web_lean_tests\n```\n\nThis is equivalent to:\n\n```bash\ndbt test --models snowplow_web,tag:this_run # Full tests on _this_run models\ndbt test --models snowplow_web,tag:manifest # Full tests on manifest models\ndbt test --models snowplow_web,tag:primary-key,tag:derived # Primary key tests only on derived tables.\ndbt test --models snowplow_web,tag:derived,test_type:data # Include the page_view_in_session_value data test\n```\n\nAlternatively, if you wanted to run all available tests in both the Snowplow web package and your custom modules:\n\n```bash\ndbt test --selector snowplow_web\n```\n\n## Incremental Logic\n\nThe general principle behind an incremental model is to identify new events/rows since the previous run of the model, and then only process these new events. This minimises cost and reduces run times.\n\nFor web event data we typically consider a session to be a complete 'visit' and as such calculate metrics across the entire session. This means that when we have a new event for a previously processed session, we have to reprocess all historic events for that session as well as the new events. The logic followed is:\n\n1. Identify new events since the previous run of the package.\n2. Identify the `session_id` associated with the new events.\n3. Look back over the events table to find all events associated with these `sessions_id`.\n4. Run all these events through the page views, sessions and users modules.\n\nGiven the large nature of event tables, Step 3. can be an expensive operation. To minimise cost ideally we want to:\n\n- Know when any given session started. This would allow us to limit scans on the events table when looking back for previous events.\n - This is achieved by the `snowplow_web_base_sessions_lifecycle_manifest` model, which records the start and end timestamp of all sessions.\n- Limit the maximum allowed session length. Sessions generated by bots can persist for years. This would mean scanning years of data every run of the package.\n - This is achieved by the `snowplow_web_base_quarantined_sessions` model, which stores the `session_id` of any sessions that have exceeded the max allowed session length (`snowplow__max_session_days`).\n - For such sessions, all events are processed up until the max allowed length. Moving forward, no more data is processed for that session.\n\n### snowplow_web_incremental_manifest\n\nThis package uses a centralized manifest table, `snowplow_web_incremental_manifest`, to record what events have already been processed and by which model/node. This allows for easy identification of what events to process in subsequent runs of the package. The manifest table is updated as part of an `on-run-end` hook, which calls the `snowplow_incremental_post_hook()` macro.\n\nExample `snowplow_web_incremental_manifest`:\n\n| model | last_success |\n|----------------------------------|--------------|\n| snowplow_web_page_views_this_run | '2021-06-03' |\n| snowplow_web_page_views | '2021-06-03' |\n| snowplow_web_sessions | '2021-06-02' |\n\n### Identification of events to process\n\nThe identification of which events to process is performed by the `get_run_limits` macro which is called in the `snowplow_web_base_new_event_limits` model. This macro uses the metadata recorded in `snowplow_web_incremental_manifest` to determine the correct events to process next based on the current state of the Snowplow dbt Web model. The selection of these events is done by specifying a range of `collector_tstamp`'s to process, between `lower_limit` and `upper_limit`. The calculation of these limits is as follows.\n\nFirst we query `snowplow_web_incremental_manifest`, filtering for all enabled models tagged with `snowplow_web_incremental` within your dbt project:\n\n```sql\nselect min(last_success) as min_last_success,\n max(last_success) as max_last_success,\n coalesce(count(*), 0) as models\nfrom snowplow_web_incremental_manifest\nwhere model in (array_of_snowplow_tagged_enabled_models)\n```\n\nBased on the results the web model enters 1 of 4 states.\n\n#### State 1: First run of the package\n\nThe query returns `models = 0` indicating that no models exist in the manifest.\n\n`lower_limit: snowplow__start_date` \n`upper_limit: least(current_tstamp, snowplow__start_date + snowplow__backfill_limit_days)` \n\n#### State 2: New model introduced\n\n`models < size(array_of_snowplow_tagged_enabled_models)` and therefore a new model, tagged with `snowplow_web_incremental`, has been added since the last run. The package will replay all previously processed events in order to back-fill the new model.\n\n`lower_limit: snowplow__start_date` \n`upper_limit: least(max_last_success, snowplow__start_date + snowplow__backfill_limit_days)` \n\n#### State 3: Models out of sync\n\n`min_last_success < max_last_success` and therefore the tagged models are out of sync, for example due to a particular model failing to execute successfully during the previous run. The package will attempt to sync all models.\n\n`lower_limit: min_last_success - snowplow__lookback_window_hours` \n`upper_limit: least(max_last_success, min_last_success + snowplow__backfill_limit_days)` \n\n#### State 4: Standard run\n\nIf none of the above criteria are met, then we consider it a 'standard run' and we carry on from the last processed event.\n\n`lower_limit: max_last_success - snowplow__lookback_window_hours` \n`upper_limit: least(current_tstamp, max_last_success + snowplow__backfill_limit_days)` \n\n**Note in all cases the `upper_limit` is limited by the `snowplow__backfill_limit_days` variable. This protects against back-fills with many rows causing very long run times.**\n\nIf you want to check the current state of the web model, run the `snowplow_web_base_new_event_limits` model. This will log the current state to the CLI while causing no disruption to the incremental processing of events.\n\n```bash\ndbt run --models snowplow_web_base_new_event_limits\n...\n00:26:28 | 1 of 1 START table model scratch.snowplow_web_base_new_event_limits.. [RUN]\n00:26:29 + Snowplow: Standard incremental run\n00:26:29 + Snowplow: Processing data between 2021-01-05 17:59:32 and 2021-01-07 23:59:32\n```\n\n## Custom Modules\n\nThis package is designed to be easily customised or extended within your own dbt project, by building your own 'custom modules'. The 'standard modules' we provide (base, page views, sessions and users) are not designed to be modified by you. An example dbt project with custom modules can be seen in the [custom example directory](https://github.com/snowplow/dbt-snowplow-web/tree/main/custom_example) of the snowplow-web repo.\n\n### Guidelines & Best Practice\n\nThe Snowplow web package's modular structure allows for custom SQL modules to leverage the model's incrementalisation logic, and operate as 'plugins' to compliment the standard model. This can be achieved by using the `_this_run` tables as an input, and producing custom tables which may join to the standard model's main derived tables (for example, to aggregate custom contexts to a page_view level), or provide a separate level of aggregation (for example a custom user interaction).\n\nThe standard modules carry out the heavy lifting in establishing an incremental structure and providing the core logic for the most common web aggregation use cases. It also allows custom modules to be plugged in without impeding the maintenance of standard modules.\n\nThe following best practices should be followed to ensure that updates and bug fixes to the model can be rolled out with minimal complication:\n\n- Custom modules should not modify any of the tables generated by the Snowplow web package e.g. the scratch, derived or manifest tables.\n- Customisations should not modify the SQL provided by the package - they should only comprise of a new set of SQL statements, which produce a separate table.\n- The logic for custom SQL should be idempotent, and restart-safe - in other words, it should be written in such a way that a failure mid-way, or a re-run of the model will not change the deterministic output.\n\nIn short, the standard modules can be treated as the source code for a distinct piece of software, and custom modules can be treated as self-maintained, additive plugins - in much the same way as a Java package may permit one to leverage public classes in their own API, and provide an entry point for custom programs to run, but will not permit one to modify the original API.\n\nThe `_this_run` and derived (e.g. `snowplow_web_page_views`, `snowplow_web_sessions`, `snowplow_web_users`) tables are considered part of the 'public' class of tables in this model structure, and so we can give assurances that non-breaking releases won't alter them. The other tables may be used in custom SQL, but their logic and structure may change from release to release, or they may be removed. If one does use a scratch table in custom logic, any breaking changes can be mitigated by either amending the custom logic to suit, or copying the relevant steps from an old version of the model into the custom module. (However this will rarely be necessary).\n\n### What denotes a custom module?\n\n**Does:** \nIn short, anything that plugs into the incremental framework provided by this package. Generally speaking any models you create that reference any of the `_this_run` tables from the standard modules are leveraging this framework and therefore need to be tagged with `snowplow_web_incremental` (see the tagging section). Such models will typically be materialized as incremental, although for more complex custom modules there may be a series of staging models that ultimately produce a derived incremental model. In this case, all staging models also need to be tagged correctly.\n\n**Doesn't:** \nModels that only reference a Snowplow web derived table as their input, rather than a `_this_run` table. Since these derived tables are materialized as incremental they contain all historic events. Any models you build that reference these tables can therefore by written in a drop and recompute manner i.e. materialized as a table. This means they do not leverage the incremental framework of this package and therefore **should not be tagged.**\n\n### Inputs for custom modules\n\nListed below are the recommended tables to reference as your input for a custom module, depending on the level of aggregation required:\n\n- Event level: `snowplow_web_base_events_this_run`\n- Page view level: `snowplow_web_page_views_this_run`\n- Session level: `snowplow_web_sessions_this_run`\n- User level: `snowplow_web_users_this_run`\n\n### Tagging models\n\nAll models within custom modules need to be tagged with `snowplow_web_incremental` in order to leverage the incremental logic of this package. We recommend creating a sub directory of your `/models` directory to contain all your custom modules. In this example we created the sub directory `snowplow_web_custom_modules`. We can then apply the tag to all models in this directory:\n\n```yml\n# dbt_project.yml\nmodels:\n your_dbt_project:\n snowplow_web_custom_modules:\n +tags: snowplow_web_incremental #Adds tag to all models in the 'snowplow_web_custom_modules' directory\n```\n\n### Retiring Custom Modules\n\nIf you want to retire a custom module, you should:\n\n- Delete the models from your project or [disable][dbt-disable-model] the models.\n- Not worry about removing the models from the `snowplow_web_incremental_manifest` manifest table. The package identifies **enabled** models tagged with `snowplow_web_incremental` within your project and selects these models from the manifest in order to calculate the state of the web model as described above.\n- Not simply exclude the retired models from your Snowplow web job in production. Currently the package is unable to identify which models are due to be executed in a given run. As a result, if you exclude a model the package will get stuck in State 3 as outlined in the identification of events to process section and continue to attempt to sync your excluded with the remaining models.\n\n### Backfilling\n\nWe have created a macro `snowplow_utils.is_run_with_new_events(package_name)`, which will evaluate whether the particular model i.e. {{ this }} has already processed the events in the given run of the model. This is returned as a boolean and effectively blocks the upsert to incremental models if the run only contains old data. This protects against your derived incremental tables being temporarily updated with incomplete data during batched back-fills of other models. We recommend including this in the where clause of any incremental models you create within custom modules as follows:\n\n```sql\nselect\n ...\nfrom \nwhere {{ snowplow_utils.is_run_with_new_events(\"snowplow_web\") }}\n```\n\nA full example of this can be seen in the `custom_example` directory.\n\n### Tips for developing custom modules\n\nWhile developing custom modules you may benefit from the following:\n\n- Minimising the amount of data being processed to reduce cost & run time.\n- Use recent events from your events table to ensure you have all the latest contexts and event types available.\n- BigQuery: Automatic handling of evolving schemas for custom contexts and unstructured events.\n\n#### Reducing Costs\n\nBy setting `snowplow__backfill_limit_days` to 1 in your `dbt_project.yml` file you will only process a days worth of data per run.\n\nWe have provided the `get_value_by_target` macro to dynamically switch the backfill limit depending on your environment i.e. dev vs. prod, with your environment determined by your target name:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__backfill_limit_days: \"{{ snowplow_utils.get_value_by_target(\n dev_value=1,\n default_value=30,\n dev_target_name='dev') }}\"\n```\n\n#### Using Recent Data\n\nThis can be achieved by setting `snowplow__start_date` to a recent date. To dynamically change the start date depending on your environment, you can use the following:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__start_date: \"{{ snowplow_utils.get_value_by_target(\n dev_value=snowplow_utils.n_timedeltas_ago(1, 'weeks'),\n default_value='2020-01-01', \n dev_target_name='dev') }}\"\n```\n\n#### Handling of schema evolution\n\nAs your schemas for such custom contexts and unstructured events evolve, multiple versions of the same column will be created in your events table e.g. `custom_context_1_0_0`, `custom_context_1_0_1`. These columns contain nested fields i.e. are of a datatype `RECORD`. When modeling Snowplow data it can be useful to combine or coalesce each nested field across all versions of the column for a continuous view over time.\n\nThe snowplow-utils package provides the [combine_column_versions](https://github.com/snowplow/dbt-snowplow-utils#combine_column_versions-source) macro, which will automatically coalesce the fields within every version of the specified column. This mitigates the need for you to update your models every time a new column version is created.\n\nPlease refer to the [snowplow-utils][snowplow-utils] docs for the full documentation on these macros.\n\n## User Mapping\n\nThis package contains a User Mapping module that aims to link user identifiers, namely `domain_userid` to `user_id`. The logic is to take the latest `user_id` per `domain_userid`.\n\nThe `domain_userid` is cookie based and therefore expires over time, where as `user_id` is typically populated when a user logs in with your own internal identifier (dependent on your tracking implementation).\n\nThis mapping is applied to the sessions table by a post-hook which updates the `stitched_user_id` column with the latest mapping. If no mapping is present, the default value for `stitched_user_id` is the `domain_userid`. This process is known as session stitching, and effectively allows you to attribute logged-in and non-logged-in sessions back to a single user.\n\nIf required, this update operation can be disabled by setting in your `project.yml` file:\n\n```yml\n# dbt_project.yml\n...\nvars:\n snowplow_web:\n snowplow__session_stitching: false\n```\n\nUser mapping is typically not a 'one size fits all' exercise. Depending on your tracking implementation, business needs and desired level of sophistication you may want to write bespoke logic. Please refer to this [blog post][user-mapping-blog] for ideas.\n\n## Incremental Materialization\n\nThis package makes use of the `snowplow_incremental` materialization from the `snowplow_utils` package for the incremental models. This builds upon the out-of-the-box incremental materialization provided by dbt. Its key advantage is that it limits table scans on the target table when updating/inserting based on the new data. This improves performance and reduces cost.\n\nAs is the case with the native incremental materialization, the strategy varies between adapters.\n\nPlease refer to the [snowplow-utils][snowplow-utils] docs for the full documentation on `snowplow_incremental` materialization.\n\n### Notes\n\n- If using this the `snowplow_incremental` materialization, the native dbt `is_incremental()` macro will not recognise the model as incremental. Please use the `snowplow_utils.snowplow_is_incremental()` macro instead, which operates in the same way.\n- If you would rather use an alternative incremental materialization for all incremental models within the package, set the variable `snowplow__incremental_materialization` to your preferred materialization. See the 'Configuration' section for more details.\n\n## Advanced Usage\n\n### Asynchronous Runs\n\nYou may wish to run the modules asynchronously, for instance run the page views module hourly but the sessions and users modules daily. You would assume this could be achieved using:\n\n```bash\ndbt run --models +snowplow_web.page_views\n```\n\nCurrently however it is not possible during a dbt jobs start phase to deduce exactly what models are due to be executed from such a command. This means the package is unable to select the subset of models from the manifest. Instead all models from the standard and custom modules are selected from the manifest and the package will attempt to synchronise all models. This makes the above command unsuitable for asynchronous runs.\n\nWe can leverage dbt's `ls` in conjunction with shell substitution however to explicitly state what models to run, allowing a subset of models to be selected from the manifest and thus run the page views models independently. To run just the page views module asynchronously:\n\n```bash\ndbt run --model +snowplow_web.page_views --vars \"{'models_to_run': '$(dbt ls --m +snowplow_web.page_views --output name)'}\"\n```\n\n### Cluster Keys\n\nAll the incremental models in the Snowplow web package have recommended cluster keys applied to them. Depending on your specific use case, you may want to change or disable these all together. This can be achieved by overriding the following macros with your own version within your project:\n\n- `web_cluster_by_fields_sessions_lifecycle()`\n- `web_cluster_by_fields_page_views()`\n- `web_cluster_by_fields_sessions()`\n- `web_cluster_by_fields_users()`\n\n### Overriding Macros\n\nBoth the cluster key macros (see above) and the `allow_refresh()` macro can be overridden. These are both [dispatched macros](https://docs.getdbt.com/reference/dbt-jinja-functions/dispatch) and can be overridden by creating your own version of the macro and setting a project level dispatch config. More details can be found in [dbt's docs](https://docs.getdbt.com/reference/dbt-jinja-functions/dispatch#overriding-package-macros)\n\n## Duplicates\n\nThis package performs de-duplication on both `event_id`'s and `page_view_id`'s, in the base and page views modules respectively. The de-duplication method for Redshift and Postgres is different to BigQuery & Snowflake due to their federated table design. The key difference between the two methodologies is that for Redshift and Postgres an `event_id` may be removed entirely during de-duplication, where as for BigQuery & Snowflake we keep all `event_id`'s. See below for a detailed explanation.\n\n### Redshift & Postgres\nUsing `event_id` de-duplication as an example, for duplicates we:\n\n- Keep the first row per `event_id` ordered by `collector_tstamp` i.e. the earliest occurring row.\n- If there are multiple rows with the same `collector_tstamp`, *we discard the event all together*. This is done to avoid 1:many joins when joining on context tables such as the page view context.\n\nThe same methodology is applied to `page_view_id`s, however we order by `derived_tstamp`.\n\n### BigQuery & Snowflake\n\nUsing `event_id` de-duplication as an example, for duplicates we:\n\n- Keep the first row per `event_id` ordered by `collector_tstamp` i.e. the earliest occurring row.\n\nThe same methodology is applied to `page_view_id`s, however we order by `derived_tstamp`.\n\n# Join the Snowplow community\n\nWe welcome all ideas, questions and contributions!\n\nFor support requests, please use our community support [Discourse][discourse] forum.\n\nIf you find a bug, please report an issue on GitHub.\n\n# Copyright and license\n\nThe snowplow-web package is Copyright 2021-2022 Snowplow Analytics Ltd.\n\nLicensed under the [Apache License, Version 2.0][license] (the \"License\");\nyou may not use this software except in compliance with the License.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n[license]: http://www.apache.org/licenses/LICENSE-2.0\n[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat\n[tracker-classificiation]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/\n[early-release]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Early%20Release&color=014477&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC\n\n[tracker-docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/\n[docs-what-is-dm]: https://docs.snowplowanalytics.com/docs/modeling-your-data/what-is-data-modeling/\n[docs-data-models]: https://docs.snowplowanalytics.com/docs/modeling-your-data/\n[dbt-disable-model]: https://docs.getdbt.com/reference/resource-configs/enabled#disable-a-model-in-a-package-in-order-to-use-your-own-version-of-the-model\n[dbt-package-docs]: https://docs.getdbt.com/docs/building-a-dbt-project/package-management\n[discourse]: http://discourse.snowplowanalytics.com/\n[dbt-selectors]: https://docs.getdbt.com/reference/node-selection/yaml-selectors\n[selectors-yml-file]: https://github.com/snowplow/dbt-snowplow-web/blob/main/selectors.yml\n[dbt-bq-merge-strategy]: https://docs.getdbt.com/reference/resource-configs/bigquery-configs#the-merge-strategy\n[dbt-snowflake-merge-strategy]: https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n[snowflake-merge-duplicates]: https://docs.snowflake.com/en/sql-reference/sql/merge.html#duplicate-join-behavior\n[snowplow-utils]: https://github.com/snowplow/dbt-snowplow-utils\n[user-mapping-blog]: https://snowplowanalytics.com/blog/2021/02/24/developing-a-single-customer-view-with-snowplow/"}, "snowplow_web.table_page_view_context": {"unique_id": "snowplow_web.table_page_view_context", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_web_atomic_docs.md", "name": "table_page_view_context", "block_contents": "This context table contains the `page_view_id` associated with a given page view."}, "snowplow_web.table_iab_context": {"unique_id": "snowplow_web.table_iab_context", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_web_atomic_docs.md", "name": "table_iab_context", "block_contents": "This context table contains the data generated by the IAB Spiders & Robots enrichment.\n\nThe IAB Spiders & Robots enrichment uses the [IAB/ABC International Spiders and Bots List](https://iabtechlab.com/software/iababc-international-spiders-and-bots-list/) to determine whether an event was produced by a user or a robot/spider based on its\u2019 IP address and user agent."}, "snowplow_web.table_ua_parser_context": {"unique_id": "snowplow_web.table_ua_parser_context", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_web_atomic_docs.md", "name": "table_ua_parser_context", "block_contents": "This context table contains the data generated by the [UA parser enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/ua-parser-enrichment/)."}, "snowplow_web.table_yauaa_context": {"unique_id": "snowplow_web.table_yauaa_context", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_web_atomic_docs.md", "name": "table_yauaa_context", "block_contents": "This context table contains the data generated by the [YAUAA enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/yauaa-enrichment/)."}, "snowplow_web.table_events": {"unique_id": "snowplow_web.table_events", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_atomic_docs.md", "original_file_path": "docs/markdown/snowplow_web_atomic_docs.md", "name": "table_events", "block_contents": "The `events` table contains all canonical events generated by [Snowplow's](https://snowplowanalytics.com/) trackers, including web, mobile and server side events."}, "snowplow_web.col_app_id": {"unique_id": "snowplow_web.col_app_id", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_app_id", "block_contents": "Application ID e.g. \u2018angry-birds\u2019 is used to distinguish different applications that are being tracked by the same Snowplow stack, e.g. production versus dev."}, "snowplow_web.col_platform": {"unique_id": "snowplow_web.col_platform", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_platform", "block_contents": "Platform e.g. \u2018web\u2019"}, "snowplow_web.col_etl_tstamp": {"unique_id": "snowplow_web.col_etl_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_etl_tstamp", "block_contents": "Timestamp event began ETL e.g. \u20182017-01-26 00:01:25.292\u2019"}, "snowplow_web.col_collector_tstamp": {"unique_id": "snowplow_web.col_collector_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_collector_tstamp", "block_contents": "Time stamp for the event recorded by the collector e.g. \u20182013-11-26 00:02:05\u2019"}, "snowplow_web.col_dvce_created_tstamp": {"unique_id": "snowplow_web.col_dvce_created_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_dvce_created_tstamp", "block_contents": "Timestamp event was recorded on the client device e.g. \u20182013-11-26 00:03:57.885\u2019"}, "snowplow_web.col_event": {"unique_id": "snowplow_web.col_event", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_event", "block_contents": "The type of event recorded e.g. \u2018page_view\u2019"}, "snowplow_web.col_event_id": {"unique_id": "snowplow_web.col_event_id", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_event_id", "block_contents": "A UUID for each event e.g. \u2018c6ef3124-b53a-4b13-a233-0088f79dcbcb\u2019"}, "snowplow_web.col_txn_id": {"unique_id": "snowplow_web.col_txn_id", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_txn_id", "block_contents": "Transaction ID set client-side, used to de-dupe records e.g. 421828"}, "snowplow_web.col_name_tracker": {"unique_id": "snowplow_web.col_name_tracker", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_name_tracker", "block_contents": "Tracker namespace e.g. \u2018sp1\u2019"}, "snowplow_web.col_v_tracker": {"unique_id": "snowplow_web.col_v_tracker", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_v_tracker", "block_contents": "Tracker version e.g. \u2018js-3.0.0\u2019"}, "snowplow_web.col_v_collector": {"unique_id": "snowplow_web.col_v_collector", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_v_collector", "block_contents": "Collector version e.g. \u2018ssc-2.1.0-kinesis\u2019"}, "snowplow_web.col_v_etl": {"unique_id": "snowplow_web.col_v_etl", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_v_etl", "block_contents": "ETL version e.g. \u2018snowplow-micro-1.1.0-common-1.4.2\u2019"}, "snowplow_web.col_user_id": {"unique_id": "snowplow_web.col_user_id", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_user_id", "block_contents": "Unique ID set by business e.g. \u2018jon.doe@email.com\u2019"}, "snowplow_web.col_user_ipaddress": {"unique_id": "snowplow_web.col_user_ipaddress", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_user_ipaddress", "block_contents": "User IP address e.g. \u201892.231.54.234\u2019"}, "snowplow_web.col_user_fingerprint": {"unique_id": "snowplow_web.col_user_fingerprint", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_user_fingerprint", "block_contents": "A user fingerprint generated by looking at the individual browser features e.g. 2161814971"}, "snowplow_web.col_domain_userid": {"unique_id": "snowplow_web.col_domain_userid", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_domain_userid", "block_contents": "User ID set by Snowplow using 1st party cookie e.g. \u2018bc2e92ec6c204a14\u2019"}, "snowplow_web.col_domain_sessionidx": {"unique_id": "snowplow_web.col_domain_sessionidx", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_domain_sessionidx", "block_contents": "A visit / session index e.g. 3"}, "snowplow_web.col_network_userid": {"unique_id": "snowplow_web.col_network_userid", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_network_userid", "block_contents": "User ID set by Snowplow using 3rd party cookie e.g. \u2018ecdff4d0-9175-40ac-a8bb-325c49733607\u2019"}, "snowplow_web.col_geo_country": {"unique_id": "snowplow_web.col_geo_country", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_country", "block_contents": "ISO 3166-1 code for the country the visitor is located in e.g. \u2018GB\u2019, \u2018US\u2019"}, "snowplow_web.col_geo_region": {"unique_id": "snowplow_web.col_geo_region", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_region", "block_contents": "ISO-3166-2 code for country region the visitor is in e.g. \u2018I9\u2019, \u2018TX\u2019"}, "snowplow_web.col_geo_city": {"unique_id": "snowplow_web.col_geo_city", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_city", "block_contents": "City the visitor is in e.g. \u2018New York\u2019, \u2018London\u2019"}, "snowplow_web.col_geo_zipcode": {"unique_id": "snowplow_web.col_geo_zipcode", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_zipcode", "block_contents": "Postcode the visitor is in e.g. \u201894109\u2019"}, "snowplow_web.col_geo_latitude": {"unique_id": "snowplow_web.col_geo_latitude", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_latitude", "block_contents": "Visitor location latitude e.g. 37.443604"}, "snowplow_web.col_geo_longitude": {"unique_id": "snowplow_web.col_geo_longitude", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_longitude", "block_contents": "Visitor location longitude e.g. -122.4124"}, "snowplow_web.col_geo_region_name": {"unique_id": "snowplow_web.col_geo_region_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_region_name", "block_contents": "Visitor region name e.g. \u2018Florida\u2019"}, "snowplow_web.col_ip_isp": {"unique_id": "snowplow_web.col_ip_isp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ip_isp", "block_contents": "Visitor\u2019s ISP e.g. \u2018FDN Communications\u2019"}, "snowplow_web.col_ip_organization": {"unique_id": "snowplow_web.col_ip_organization", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ip_organization", "block_contents": "Organization associated with the visitor\u2019s IP address \u2013 defaults to ISP name if none is found e.g. \u2018Bouygues Telecom\u2019"}, "snowplow_web.col_ip_domain": {"unique_id": "snowplow_web.col_ip_domain", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ip_domain", "block_contents": "Second level domain name associated with the visitor\u2019s IP address e.g. \u2018nuvox.net\u2019"}, "snowplow_web.col_ip_netspeed": {"unique_id": "snowplow_web.col_ip_netspeed", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ip_netspeed", "block_contents": "Visitor\u2019s connection type e.g. \u2018Cable/DSL\u2019"}, "snowplow_web.col_page_url": {"unique_id": "snowplow_web.col_page_url", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_url", "block_contents": "The page URL e.g. \u2018http://www.example.com\u2019"}, "snowplow_web.col_page_title": {"unique_id": "snowplow_web.col_page_title", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_title", "block_contents": "Web page title e.g. \u2018Snowplow Docs \u2013 Understanding the structure of Snowplow data\u2019"}, "snowplow_web.col_page_referrer": {"unique_id": "snowplow_web.col_page_referrer", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_referrer", "block_contents": "URL of the referrer e.g. \u2018http://www.referrer.com\u2019"}, "snowplow_web.col_page_urlscheme": {"unique_id": "snowplow_web.col_page_urlscheme", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_urlscheme", "block_contents": "Scheme aka protocol e.g. \u2018https\u2019"}, "snowplow_web.col_page_urlhost": {"unique_id": "snowplow_web.col_page_urlhost", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_urlhost", "block_contents": "Host aka domain e.g. \u2018\u201cwww.snowplowanalytics.com\u2019"}, "snowplow_web.col_page_urlport": {"unique_id": "snowplow_web.col_page_urlport", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_urlport", "block_contents": "Port if specified, 80 if not 80"}, "snowplow_web.col_page_urlpath": {"unique_id": "snowplow_web.col_page_urlpath", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_urlpath", "block_contents": "Path to page e.g. \u2018/product/index.html\u2019"}, "snowplow_web.col_page_urlquery": {"unique_id": "snowplow_web.col_page_urlquery", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_urlquery", "block_contents": "Querystring e.g. \u2018id=GTM-DLRG\u2019"}, "snowplow_web.col_page_urlfragment": {"unique_id": "snowplow_web.col_page_urlfragment", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_urlfragment", "block_contents": "Fragment aka anchor e.g. \u20184-conclusion\u2019"}, "snowplow_web.col_refr_urlscheme": {"unique_id": "snowplow_web.col_refr_urlscheme", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_urlscheme", "block_contents": "Referer scheme e.g. \u2018http\u2019"}, "snowplow_web.col_refr_urlhost": {"unique_id": "snowplow_web.col_refr_urlhost", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_urlhost", "block_contents": "Referer host e.g. \u2018www.bing.com\u2019"}, "snowplow_web.col_refr_urlport": {"unique_id": "snowplow_web.col_refr_urlport", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_urlport", "block_contents": "Referer port e.g. 80"}, "snowplow_web.col_refr_urlpath": {"unique_id": "snowplow_web.col_refr_urlpath", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_urlpath", "block_contents": "Referer page path e.g. \u2018/images/search\u2019"}, "snowplow_web.col_refr_urlquery": {"unique_id": "snowplow_web.col_refr_urlquery", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_urlquery", "block_contents": "Referer URL querystring e.g. \u2018q=psychic+oracle+cards\u2019"}, "snowplow_web.col_refr_urlfragment": {"unique_id": "snowplow_web.col_refr_urlfragment", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_urlfragment", "block_contents": "Referer URL fragment"}, "snowplow_web.col_refr_medium": {"unique_id": "snowplow_web.col_refr_medium", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_medium", "block_contents": "Type of referer e.g. \u2018search\u2019, \u2018internal\u2019"}, "snowplow_web.col_refr_source": {"unique_id": "snowplow_web.col_refr_source", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_source", "block_contents": "Name of referer if recognised e.g. \u2018Bing images\u2019"}, "snowplow_web.col_refr_term": {"unique_id": "snowplow_web.col_refr_term", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_term", "block_contents": "Keywords if source is a search engine e.g. \u2018psychic oracle cards\u2019"}, "snowplow_web.col_mkt_medium": {"unique_id": "snowplow_web.col_mkt_medium", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_mkt_medium", "block_contents": "Type of traffic source e.g. \u2018cpc\u2019, \u2018affiliate\u2019, \u2018organic\u2019, \u2018social\u2019"}, "snowplow_web.col_mkt_source": {"unique_id": "snowplow_web.col_mkt_source", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_mkt_source", "block_contents": "The company / website where the traffic came from e.g. \u2018Google\u2019, \u2018Facebook\u2019"}, "snowplow_web.col_mkt_term": {"unique_id": "snowplow_web.col_mkt_term", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_mkt_term", "block_contents": "Any keywords associated with the referrer e.g. \u2018new age tarot decks\u2019"}, "snowplow_web.col_mkt_content": {"unique_id": "snowplow_web.col_mkt_content", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_mkt_content", "block_contents": "The content of the ad. (Or an ID so that it can be looked up.) e.g. 13894723"}, "snowplow_web.col_mkt_campaign": {"unique_id": "snowplow_web.col_mkt_campaign", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_mkt_campaign", "block_contents": "The campaign ID e.g. \u2018diageo-123\u2019"}, "snowplow_web.col_se_category": {"unique_id": "snowplow_web.col_se_category", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_se_category", "block_contents": "Category of event e.g. \u2018ecomm\u2019, \u2018video\u2019"}, "snowplow_web.col_se_action": {"unique_id": "snowplow_web.col_se_action", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_se_action", "block_contents": "Action performed / event name e.g. \u2018add-to-basket\u2019, \u2018play-video\u2019"}, "snowplow_web.col_se_label": {"unique_id": "snowplow_web.col_se_label", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_se_label", "block_contents": "The object of the action e.g. the ID of the video played or SKU of the product added-to-basket e.g. \u2018pbz00123\u2019"}, "snowplow_web.col_se_property": {"unique_id": "snowplow_web.col_se_property", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_se_property", "block_contents": "A property associated with the object of the action e.g. \u2018HD\u2019, \u2018large\u2019"}, "snowplow_web.col_se_value": {"unique_id": "snowplow_web.col_se_value", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_se_value", "block_contents": "A value associated with the event / action e.g. the value of goods added-to-basket e.g. 9.99"}, "snowplow_web.col_tr_orderid": {"unique_id": "snowplow_web.col_tr_orderid", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_orderid", "block_contents": "Order ID e.g. \u2018#134\u2019"}, "snowplow_web.col_tr_affiliation": {"unique_id": "snowplow_web.col_tr_affiliation", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_affiliation", "block_contents": "Transaction affiliation (e.g. store where sale took place) e.g. \u2018web\u2019"}, "snowplow_web.col_tr_total": {"unique_id": "snowplow_web.col_tr_total", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_total", "block_contents": "Total transaction value e.g. 12.99"}, "snowplow_web.col_tr_tax": {"unique_id": "snowplow_web.col_tr_tax", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_tax", "block_contents": "Total tax included in transaction value e.g. 3.00"}, "snowplow_web.col_tr_shipping": {"unique_id": "snowplow_web.col_tr_shipping", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_shipping", "block_contents": "Delivery cost charged e.g. 0.00"}, "snowplow_web.col_tr_city": {"unique_id": "snowplow_web.col_tr_city", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_city", "block_contents": "Delivery address, city e.g. \u2018London\u2019"}, "snowplow_web.col_tr_state": {"unique_id": "snowplow_web.col_tr_state", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_state", "block_contents": "Delivery address, state e.g. \u2018Washington\u2019"}, "snowplow_web.col_tr_country": {"unique_id": "snowplow_web.col_tr_country", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_country", "block_contents": "Delivery address, country e.g. \u2018France\u2019"}, "snowplow_web.col_ti_orderid": {"unique_id": "snowplow_web.col_ti_orderid", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_orderid", "block_contents": "Order ID e.g. \u2018#134\u2019"}, "snowplow_web.col_ti_sku": {"unique_id": "snowplow_web.col_ti_sku", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_sku", "block_contents": "Product SKU e.g. \u2018pbz00123\u2019"}, "snowplow_web.col_ti_name": {"unique_id": "snowplow_web.col_ti_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_name", "block_contents": "Product name e.g. \u2018Cone pendulum\u2019"}, "snowplow_web.col_ti_category": {"unique_id": "snowplow_web.col_ti_category", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_category", "block_contents": "Product category e.g. \u2018New Age\u2019"}, "snowplow_web.col_ti_price": {"unique_id": "snowplow_web.col_ti_price", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_price", "block_contents": "Product unit price e.g. 9.99"}, "snowplow_web.col_ti_quantity": {"unique_id": "snowplow_web.col_ti_quantity", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_quantity", "block_contents": "Number of product in transaction e.g. 2"}, "snowplow_web.col_pp_xoffset_min": {"unique_id": "snowplow_web.col_pp_xoffset_min", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_pp_xoffset_min", "block_contents": "Minimum page x offset seen in the last ping period e.g. 0"}, "snowplow_web.col_pp_xoffset_max": {"unique_id": "snowplow_web.col_pp_xoffset_max", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_pp_xoffset_max", "block_contents": "Maximum page x offset seen in the last ping period e.g. 100"}, "snowplow_web.col_pp_yoffset_min": {"unique_id": "snowplow_web.col_pp_yoffset_min", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_pp_yoffset_min", "block_contents": "Minimum page y offset seen in the last ping period e.g. 0"}, "snowplow_web.col_pp_yoffset_max": {"unique_id": "snowplow_web.col_pp_yoffset_max", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_pp_yoffset_max", "block_contents": "Maximum page y offset seen in the last ping period e.g. 200"}, "snowplow_web.col_useragent": {"unique_id": "snowplow_web.col_useragent", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_useragent", "block_contents": "Raw useragent"}, "snowplow_web.col_br_name": {"unique_id": "snowplow_web.col_br_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_name", "block_contents": "Browser name e.g. \u2018Firefox 12\u2019"}, "snowplow_web.col_br_family": {"unique_id": "snowplow_web.col_br_family", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_family", "block_contents": "Browser family e.g. \u2018Firefox\u2019"}, "snowplow_web.col_br_version": {"unique_id": "snowplow_web.col_br_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_version", "block_contents": "Browser version e.g. \u201812.0\u2019"}, "snowplow_web.col_br_type": {"unique_id": "snowplow_web.col_br_type", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_type", "block_contents": "Browser type e.g. \u2018Browser\u2019"}, "snowplow_web.col_br_renderengine": {"unique_id": "snowplow_web.col_br_renderengine", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_renderengine", "block_contents": "Browser rendering engine e.g. \u2018GECKO\u2019"}, "snowplow_web.col_br_lang": {"unique_id": "snowplow_web.col_br_lang", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_lang", "block_contents": "Language the browser is set to e.g. \u2018en-GB\u2019"}, "snowplow_web.col_br_features_pdf": {"unique_id": "snowplow_web.col_br_features_pdf", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_pdf", "block_contents": "Whether the browser recognizes PDFs e.g. True"}, "snowplow_web.col_br_features_flash": {"unique_id": "snowplow_web.col_br_features_flash", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_flash", "block_contents": "Whether Flash is installed e.g. True"}, "snowplow_web.col_br_features_java": {"unique_id": "snowplow_web.col_br_features_java", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_java", "block_contents": "Whether Java is installed e.g. True"}, "snowplow_web.col_br_features_director": {"unique_id": "snowplow_web.col_br_features_director", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_director", "block_contents": "Whether Adobe Shockwave is installed e.g. True"}, "snowplow_web.col_br_features_quicktime": {"unique_id": "snowplow_web.col_br_features_quicktime", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_quicktime", "block_contents": "Whether QuickTime is installed e.g. True"}, "snowplow_web.col_br_features_realplayer": {"unique_id": "snowplow_web.col_br_features_realplayer", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_realplayer", "block_contents": "Whether RealPlayer is installed e.g. True"}, "snowplow_web.col_br_features_windowsmedia": {"unique_id": "snowplow_web.col_br_features_windowsmedia", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_windowsmedia", "block_contents": "Whether mplayer2 is installed e.g. True"}, "snowplow_web.col_br_features_gears": {"unique_id": "snowplow_web.col_br_features_gears", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_gears", "block_contents": "Whether Google Gears is installed e.g. True"}, "snowplow_web.col_br_features_silverlight": {"unique_id": "snowplow_web.col_br_features_silverlight", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_features_silverlight", "block_contents": "Whether Microsoft Silverlight is installed e.g. True"}, "snowplow_web.col_br_cookies": {"unique_id": "snowplow_web.col_br_cookies", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_cookies", "block_contents": "Whether cookies are enabled e.g. True"}, "snowplow_web.col_br_colordepth": {"unique_id": "snowplow_web.col_br_colordepth", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_colordepth", "block_contents": "Bit depth of the browser color palette e.g. 24"}, "snowplow_web.col_br_viewwidth": {"unique_id": "snowplow_web.col_br_viewwidth", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_viewwidth", "block_contents": "Viewport width e.g. 1000"}, "snowplow_web.col_br_viewheight": {"unique_id": "snowplow_web.col_br_viewheight", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_br_viewheight", "block_contents": "Viewport height e.g. 1000"}, "snowplow_web.col_os_name": {"unique_id": "snowplow_web.col_os_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_name", "block_contents": "Name of operating system e.g. \u2018Android\u2019"}, "snowplow_web.col_os_family": {"unique_id": "snowplow_web.col_os_family", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_family", "block_contents": "Operating system family e.g. \u2018Linux\u2019"}, "snowplow_web.col_os_manufacturer": {"unique_id": "snowplow_web.col_os_manufacturer", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_manufacturer", "block_contents": "Company responsible for OS e.g. \u2018Apple\u2019"}, "snowplow_web.col_os_timezone": {"unique_id": "snowplow_web.col_os_timezone", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_timezone", "block_contents": "Client operating system timezone e.g. \u2018Europe/London\u2019"}, "snowplow_web.col_dvce_type": {"unique_id": "snowplow_web.col_dvce_type", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_dvce_type", "block_contents": "Type of device e.g. \u2018Computer\u2019"}, "snowplow_web.col_dvce_ismobile": {"unique_id": "snowplow_web.col_dvce_ismobile", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_dvce_ismobile", "block_contents": "Is the device mobile? e.g. True"}, "snowplow_web.col_dvce_screenwidth": {"unique_id": "snowplow_web.col_dvce_screenwidth", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_dvce_screenwidth", "block_contents": "Screen width in pixels e.g. 1900"}, "snowplow_web.col_dvce_screenheight": {"unique_id": "snowplow_web.col_dvce_screenheight", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_dvce_screenheight", "block_contents": "Screen height in pixels e.g. 1024"}, "snowplow_web.col_doc_charset": {"unique_id": "snowplow_web.col_doc_charset", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_doc_charset", "block_contents": "The page\u2019s character encoding e.g. , \u2018UTF-8\u2019"}, "snowplow_web.col_doc_width": {"unique_id": "snowplow_web.col_doc_width", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_doc_width", "block_contents": "The page\u2019s width in pixels e.g. 1024"}, "snowplow_web.col_doc_height": {"unique_id": "snowplow_web.col_doc_height", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_doc_height", "block_contents": "The page\u2019s height in pixels e.g. 3000"}, "snowplow_web.col_tr_currency": {"unique_id": "snowplow_web.col_tr_currency", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_currency", "block_contents": "Currency e.g. \u2018USD\u2019"}, "snowplow_web.col_tr_total_base": {"unique_id": "snowplow_web.col_tr_total_base", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_total_base", "block_contents": "Total in base currency e.g. 12.99"}, "snowplow_web.col_tr_tax_base": {"unique_id": "snowplow_web.col_tr_tax_base", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_tax_base", "block_contents": "Total tax in base currency e.g. 3.00"}, "snowplow_web.col_tr_shipping_base": {"unique_id": "snowplow_web.col_tr_shipping_base", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_tr_shipping_base", "block_contents": "decimal Delivery cost in base currency e.g. 0.00"}, "snowplow_web.col_ti_currency": {"unique_id": "snowplow_web.col_ti_currency", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_currency", "block_contents": "Currency e.g. \u2018EUR\u2019"}, "snowplow_web.col_ti_price_base": {"unique_id": "snowplow_web.col_ti_price_base", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ti_price_base", "block_contents": "decimal Price in base currency e.g. 9.99"}, "snowplow_web.col_base_currency": {"unique_id": "snowplow_web.col_base_currency", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_base_currency", "block_contents": "Reporting currency e.g. \u2018GBP\u2019"}, "snowplow_web.col_geo_timezone": {"unique_id": "snowplow_web.col_geo_timezone", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_geo_timezone", "block_contents": "Visitor timezone name e.g. \u2018Europe/London\u2019"}, "snowplow_web.col_mkt_clickid": {"unique_id": "snowplow_web.col_mkt_clickid", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_mkt_clickid", "block_contents": "The click ID e.g. \u2018ac3d8e459\u2019"}, "snowplow_web.col_mkt_network": {"unique_id": "snowplow_web.col_mkt_network", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_mkt_network", "block_contents": "The ad network to which the click ID belongs e.g. \u2018DoubleClick\u2019"}, "snowplow_web.col_etl_tags": {"unique_id": "snowplow_web.col_etl_tags", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_etl_tags", "block_contents": "JSON of tags for this ETL run e.g. \u201c[\u2018prod\u2019]\u201d"}, "snowplow_web.col_dvce_sent_tstamp": {"unique_id": "snowplow_web.col_dvce_sent_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_dvce_sent_tstamp", "block_contents": "When the event was sent by the client device e.g. \u20182013-11-26 00:03:58.032\u2019"}, "snowplow_web.col_refr_domain_userid": {"unique_id": "snowplow_web.col_refr_domain_userid", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_domain_userid", "block_contents": "The Snowplow domain_userid of the referring website e.g. \u2018bc2e92ec6c204a14\u2019"}, "snowplow_web.col_refr_dvce_tstamp": {"unique_id": "snowplow_web.col_refr_dvce_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_refr_dvce_tstamp", "block_contents": "The time of attaching the domain_userid to the inbound link e.g. \u20182013-11-26 00:02:05\u2019"}, "snowplow_web.col_domain_sessionid": {"unique_id": "snowplow_web.col_domain_sessionid", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_domain_sessionid", "block_contents": "A visit / session UUID e.g. \u2018c6ef3124-b53a-4b13-a233-0088f79dcbcb\u2019"}, "snowplow_web.col_derived_tstamp": {"unique_id": "snowplow_web.col_derived_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_derived_tstamp", "block_contents": "Timestamp making allowance for innaccurate device clock e.g. \u20182013-11-26 00:02:04\u2019"}, "snowplow_web.col_event_vendor": {"unique_id": "snowplow_web.col_event_vendor", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_event_vendor", "block_contents": "Who defined the event e.g. \u2018com.acme\u2019"}, "snowplow_web.col_event_name": {"unique_id": "snowplow_web.col_event_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_event_name", "block_contents": "Event name e.g. \u2018link_click\u2019"}, "snowplow_web.col_event_format": {"unique_id": "snowplow_web.col_event_format", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_event_format", "block_contents": "Format for event e.g. \u2018jsonschema\u2019"}, "snowplow_web.col_event_version": {"unique_id": "snowplow_web.col_event_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_event_version", "block_contents": "Version of event schema e.g. \u20181-0-2\u2019"}, "snowplow_web.col_event_fingerprint": {"unique_id": "snowplow_web.col_event_fingerprint", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_event_fingerprint", "block_contents": "Hash client-set event fields e.g. AADCE520E20C2899F4CED228A79A3083"}, "snowplow_web.col_true_tstamp": {"unique_id": "snowplow_web.col_true_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_true_tstamp", "block_contents": "User-set \u201ctrue timestamp\u201d for the event e.g. \u20182013-11-26 00:02:04\u2019"}, "snowplow_web.col_page_view_id": {"unique_id": "snowplow_web.col_page_view_id", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_page_view_id", "block_contents": "A UUID for each page view e.g. \u2018c6ef3124-b53a-4b13-a233-0088f79dcbcb\u2019"}, "snowplow_web.col_category": {"unique_id": "snowplow_web.col_category", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_category", "block_contents": "Category based on activity if the IP/UA is a spider or robot, BROWSER otherwise"}, "snowplow_web.col_primary_impact": {"unique_id": "snowplow_web.col_primary_impact", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_primary_impact", "block_contents": "Whether the spider or robot would affect page impression measurement, ad impression measurement, both or none"}, "snowplow_web.col_reason": {"unique_id": "snowplow_web.col_reason", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_reason", "block_contents": "Type of failed check if the IP/UA is a spider or robot, PASSED_ALL otherwise"}, "snowplow_web.col_spider_or_robot": {"unique_id": "snowplow_web.col_spider_or_robot", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_spider_or_robot", "block_contents": "True if the IP address or user agent checked against the list is a spider or robot, false otherwise"}, "snowplow_web.col_device_family": {"unique_id": "snowplow_web.col_device_family", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_device_family", "block_contents": "Device type"}, "snowplow_web.col_ua_os_family": {"unique_id": "snowplow_web.col_ua_os_family", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_ua_os_family", "block_contents": "Operation system name"}, "snowplow_web.col_useragent_family": {"unique_id": "snowplow_web.col_useragent_family", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_useragent_family", "block_contents": "Useragent family (browser) name"}, "snowplow_web.col_os_major": {"unique_id": "snowplow_web.col_os_major", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_major", "block_contents": "Operation system major version"}, "snowplow_web.col_os_minor": {"unique_id": "snowplow_web.col_os_minor", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_minor", "block_contents": "Operation system minor version"}, "snowplow_web.col_os_patch": {"unique_id": "snowplow_web.col_os_patch", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_patch", "block_contents": "Operation system patch version"}, "snowplow_web.col_os_patch_minor": {"unique_id": "snowplow_web.col_os_patch_minor", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_patch_minor", "block_contents": "Operation system patch minor version"}, "snowplow_web.col_os_version": {"unique_id": "snowplow_web.col_os_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_os_version", "block_contents": "Operation system full version"}, "snowplow_web.col_useragent_major": {"unique_id": "snowplow_web.col_useragent_major", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_useragent_major", "block_contents": "Useragent major version"}, "snowplow_web.col_useragent_minor": {"unique_id": "snowplow_web.col_useragent_minor", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_useragent_minor", "block_contents": "Useragent minor version"}, "snowplow_web.col_useragent_patch": {"unique_id": "snowplow_web.col_useragent_patch", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_useragent_patch", "block_contents": "Useragent patch version"}, "snowplow_web.col_useragent_version": {"unique_id": "snowplow_web.col_useragent_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_useragent_version", "block_contents": "Full version of the useragent"}, "snowplow_web.col_device_class": {"unique_id": "snowplow_web.col_device_class", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_device_class", "block_contents": "Class of device e.g. phone"}, "snowplow_web.col_agent_class": {"unique_id": "snowplow_web.col_agent_class", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_agent_class", "block_contents": "Class of agent e.g. browser"}, "snowplow_web.col_agent_name": {"unique_id": "snowplow_web.col_agent_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_agent_name", "block_contents": "Name of agent e.g. Chrome"}, "snowplow_web.col_agent_name_version": {"unique_id": "snowplow_web.col_agent_name_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_agent_name_version", "block_contents": "Name and version of agent e.g. Chrome 53.0.2785.124"}, "snowplow_web.col_agent_name_version_major": {"unique_id": "snowplow_web.col_agent_name_version_major", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_agent_name_version_major", "block_contents": "Name and major version of agent e.g. Chrome 53"}, "snowplow_web.col_agent_version": {"unique_id": "snowplow_web.col_agent_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_agent_version", "block_contents": "Version of agent e.g. 53.0.2785.124"}, "snowplow_web.col_agent_version_major": {"unique_id": "snowplow_web.col_agent_version_major", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_agent_version_major", "block_contents": "Major version of agent e.g. 53"}, "snowplow_web.col_device_brand": {"unique_id": "snowplow_web.col_device_brand", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_device_brand", "block_contents": "Brand of device e.g. Google"}, "snowplow_web.col_device_name": {"unique_id": "snowplow_web.col_device_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_device_name", "block_contents": "Name of device e.g. Google Nexus 6"}, "snowplow_web.col_device_version": {"unique_id": "snowplow_web.col_device_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_device_version", "block_contents": "Version of device e.g. 6.0"}, "snowplow_web.col_layout_engine_class": {"unique_id": "snowplow_web.col_layout_engine_class", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_layout_engine_class", "block_contents": "Class of layout engine e.g. Browser"}, "snowplow_web.col_layout_engine_name": {"unique_id": "snowplow_web.col_layout_engine_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_layout_engine_name", "block_contents": "Name of layout engine e.g. Blink"}, "snowplow_web.col_layout_engine_name_version": {"unique_id": "snowplow_web.col_layout_engine_name_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_layout_engine_name_version", "block_contents": "Name and version of layout engine e.g. Blink 53.0"}, "snowplow_web.col_layout_engine_name_version_major": {"unique_id": "snowplow_web.col_layout_engine_name_version_major", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_layout_engine_name_version_major", "block_contents": "Name and major version of layout engine e.g. Blink 53"}, "snowplow_web.col_layout_engine_version": {"unique_id": "snowplow_web.col_layout_engine_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_layout_engine_version", "block_contents": "Version of layout engine e.g. 53.0"}, "snowplow_web.col_layout_engine_version_major": {"unique_id": "snowplow_web.col_layout_engine_version_major", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_layout_engine_version_major", "block_contents": "Major version of layout engine e.g. 53"}, "snowplow_web.col_operating_system_class": {"unique_id": "snowplow_web.col_operating_system_class", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_operating_system_class", "block_contents": "Class of the OS e.g. Mobile"}, "snowplow_web.col_operating_system_name": {"unique_id": "snowplow_web.col_operating_system_name", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_operating_system_name", "block_contents": "Name of the OS e.g. Android"}, "snowplow_web.col_operating_system_name_version": {"unique_id": "snowplow_web.col_operating_system_name_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_operating_system_name_version", "block_contents": "Name and version of the OS e.g. Android 7.0"}, "snowplow_web.col_operating_system_version": {"unique_id": "snowplow_web.col_operating_system_version", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_operating_system_version", "block_contents": "Version of the OS e.g. 7.0"}, "snowplow_web.col_model_tstamp": {"unique_id": "snowplow_web.col_model_tstamp", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_common_cols.md", "original_file_path": "docs/markdown/snowplow_web_common_cols.md", "name": "col_model_tstamp", "block_contents": "The current timestamp when the model processed this row."}, "snowplow_web.table_page_views_this_run": {"unique_id": "snowplow_web.table_page_views_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_page_views_this_run", "block_contents": "This staging table contains all the page views for the given run of the Web model. It possess all the same columns as `snowplow_web_page_views`. If building a custom module that requires page view events, this is the table you should reference."}, "snowplow_web.table_page_views": {"unique_id": "snowplow_web.table_page_views", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_page_views", "block_contents": "This derived incremental table contains all historic page views and should be the end point for any analysis or BI tools."}, "snowplow_web.table_page_view_events": {"unique_id": "snowplow_web.table_page_view_events", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_page_view_events", "block_contents": "This is a staging table containing all the page view events for a given run of the Web model. It is the first step in the page views module and therefore does not contain metrics such as engaged time and scroll depth which are calculated in subsequent models. It is also where the de-duping of `page_view_id`'s occurs"}, "snowplow_web.table_pv_iab": {"unique_id": "snowplow_web.table_pv_iab", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_pv_iab", "block_contents": "**Redshift and Postgres only**. This is a staging table containing context data generated by the [IAB enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/iab-enrichment/) for the events in the given run. The model is disable by default. Refer to the docs to enable.\n\nThe IAB Spiders & Robots enrichment uses the [IAB/ABC International Spiders and Bots List](https://iabtechlab.com/software/iababc-international-spiders-and-bots-list/) to determine whether an event was produced by a user or a robot/spider based on its\u2019 IP address and user agent."}, "snowplow_web.table_pv_ua_parser": {"unique_id": "snowplow_web.table_pv_ua_parser", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_pv_ua_parser", "block_contents": "**Redshift and Postgres only**. This is a staging table containing context data generated by the [UA parser enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/ua-parser-enrichment/) for the events in the given run. The model is disable by default. Refer to the docs to enable."}, "snowplow_web.table_pv_yauaa": {"unique_id": "snowplow_web.table_pv_yauaa", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_pv_yauaa", "block_contents": "**Redshift and Postgres only**. This is a staging table containing context data generated by the [YAUAA enrichment](https://docs.snowplowanalytics.com/docs/enriching-your-data/available-enrichments/yauaa-enrichment/). The model is disable by default. Refer to the docs to enable."}, "snowplow_web.table_pv_engaged_time": {"unique_id": "snowplow_web.table_pv_engaged_time", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_pv_engaged_time", "block_contents": "This model calculates the time a visitor spent engaged on a given page view. This is calculated using the number of page ping events received for that page view."}, "snowplow_web.table_pv_limits": {"unique_id": "snowplow_web.table_pv_limits", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_pv_limits", "block_contents": "This model calculates the lower and upper limit for the page views events in the given run. This is based taking the min and max `collector_tstamp` across all page views. It is used to improve performance when selected rows from the various context tables such as the UA parser table."}, "snowplow_web.table_scroll_depth": {"unique_id": "snowplow_web.table_scroll_depth", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_page_views_docs.md", "original_file_path": "docs/markdown/snowplow_web_page_views_docs.md", "name": "table_scroll_depth", "block_contents": "This model calculates the horizontal and vertical scroll depth of the vistor on a given page view. Such metrics are useful when assessing engagement on a page view."}, "snowplow_web.table_base_sessions_lifecycle_manifest": {"unique_id": "snowplow_web.table_base_sessions_lifecycle_manifest", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_base_docs.md", "original_file_path": "docs/markdown/snowplow_web_base_docs.md", "name": "table_base_sessions_lifecycle_manifest", "block_contents": "This incremental table is a manifest of all sessions that have been processed by the Snowplow dbt web model. For each session, the start and end timestamp is recorded. \n\nBy knowing the lifecycle of a session the model is able to able to determine which sessions and thus events to process for a given timeframe, as well as the complete date range required to reprocess all events of each session."}, "snowplow_web.table_base_incremental_manifest": {"unique_id": "snowplow_web.table_base_incremental_manifest", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_base_docs.md", "original_file_path": "docs/markdown/snowplow_web_base_docs.md", "name": "table_base_incremental_manifest", "block_contents": "This incremental table is a manifest of the timestamp of the latest event consumed per model within the `snowplow-web` package as well as any models leveraging the incremental framework provided by the package. The latest event's timestamp is based off `collector_tstamp`. This table is used to determine what events should be processed in the next run of the model."}, "snowplow_web.table_base_new_event_limits": {"unique_id": "snowplow_web.table_base_new_event_limits", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_base_docs.md", "original_file_path": "docs/markdown/snowplow_web_base_docs.md", "name": "table_base_new_event_limits", "block_contents": "This table contains the lower and upper timestamp limits for the given run of the web model. These limits are used to select new events from the events table."}, "snowplow_web.table_base_events_this_run": {"unique_id": "snowplow_web.table_base_events_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_base_docs.md", "original_file_path": "docs/markdown/snowplow_web_base_docs.md", "name": "table_base_events_this_run", "block_contents": "For any given run, this table contains all required events to be consumed by subsequent nodes in the Snowplow dbt web package. This is a cleaned, deduped dataset, containing all columns from the raw events table as well as having the `page_view_id` joined in from the page view context. \n\n**Note: This table should be used as the input to any custom modules that require event level data, rather than selecting straight from `atomic.events`**"}, "snowplow_web.table_base_sessions_this_run": {"unique_id": "snowplow_web.table_base_sessions_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_base_docs.md", "original_file_path": "docs/markdown/snowplow_web_base_docs.md", "name": "table_base_sessions_this_run", "block_contents": "For any given run, this table contains all the required sessions."}, "snowplow_web.table_base_quarantined_sessions": {"unique_id": "snowplow_web.table_base_quarantined_sessions", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_base_docs.md", "original_file_path": "docs/markdown/snowplow_web_base_docs.md", "name": "table_base_quarantined_sessions", "block_contents": "This table contains any sessions that have been quarantined. Sessions are quarantined once they exceed the maximum allowed session length, defined by `snowplow__max_session_days`.\nOnce quarantined, no further events from these sessions will be processed. Events up until the point of quarantine remain in your derived tables.\nThe reason for removing long sessions is to reduce table scans on both the events table and all derived tables. This improves performance greatly."}, "snowplow_web.table_sessions_this_run": {"unique_id": "snowplow_web.table_sessions_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_sessions_docs.md", "original_file_path": "docs/markdown/snowplow_web_sessions_docs.md", "name": "table_sessions_this_run", "block_contents": "This staging table contains all the sessions for the given run of the Web model. It possess all the same columns as `snowplow_web_sessions`. If building a custom module that requires session level data, this is the table you should reference."}, "snowplow_web.table_sessions": {"unique_id": "snowplow_web.table_sessions", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_sessions_docs.md", "original_file_path": "docs/markdown/snowplow_web_sessions_docs.md", "name": "table_sessions", "block_contents": "This derived incremental table contains all historic sessions and should be the end point for any analysis or BI tools."}, "snowplow_web.table_sessions_aggs": {"unique_id": "snowplow_web.table_sessions_aggs", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_sessions_docs.md", "original_file_path": "docs/markdown/snowplow_web_sessions_docs.md", "name": "table_sessions_aggs", "block_contents": "This model aggregates various metrics derived from page views to a session level."}, "snowplow_web.table_sessions_lasts": {"unique_id": "snowplow_web.table_sessions_lasts", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "markdown/snowplow_web_sessions_docs.md", "original_file_path": "docs/markdown/snowplow_web_sessions_docs.md", "name": "table_sessions_lasts", "block_contents": "This model identifies the last page view within a given session and returns various dimensions associated with that page view."}}, "exposures": {}, "metrics": {}, "selectors": {"snowplow_web_lean_and_media_player_tests": {"name": "snowplow_web_lean_and_media_player_tests", "definition": {"union": [{"intersection": [{"method": "package", "value": "snowplow_web"}, {"method": "tag", "value": "this_run"}]}, {"intersection": [{"method": "package", "value": "snowplow_web"}, {"method": "tag", "value": "manifest"}]}, {"intersection": [{"method": "package", "value": "snowplow_web"}, {"method": "tag", "value": "derived"}, {"method": "tag", "value": "primary-key"}]}, {"intersection": [{"method": "package", "value": "snowplow_web"}, {"method": "tag", "value": "derived"}, {"method": "test_type", "value": "data"}]}, {"intersection": [{"method": "path", "value": "models"}, {"method": "tag", "value": "snowplow_web_incremental"}]}, {"method": "package", "value": "snowplow_media_player"}, {"method": "tag", "value": "snowplow_media_player"}]}}, "snowplow_media_player_tests": {"name": "snowplow_media_player_tests", "definition": {"union": [{"method": "package", "value": "snowplow_media_player"}, {"intersection": [{"method": "path", "value": "models"}, {"method": "tag", "value": "snowplow_media_player"}]}]}}, "snowplow_web_and_media_player_tests": {"name": "snowplow_web_and_media_player_tests", "definition": {"union": [{"method": "package", "value": "snowplow_web"}, {"method": "tag", "value": "snowplow_web_incremental"}, {"method": "package", "value": "snowplow_media_player"}, {"method": "tag", "value": "snowplow_media_player"}]}}, "snowplow_web": {"name": "snowplow_web", "definition": {"union": [{"method": "package", "value": "snowplow_web"}, {"method": "tag", "value": "snowplow_web_incremental"}]}}}, "disabled": {"model.snowplow_media_player.snowplow_media_player_user_stats": [{"raw_sql": "{{\n config(\n materialized = 'table'\n )\n}}\n\nwith prep as (\n\n select\n domain_userid,\n min(case when (video_plays + audio_plays) > 0 then start_tstamp end) as first_play,\n max(case when (video_plays + audio_plays) > 0 then start_tstamp end) as last_play,\n sum(video_plays) as video_plays,\n sum(audio_plays) as audio_plays,\n sum(valid_video_plays) as valid_video_plays,\n sum(valid_audio_plays) as valid_audio_plays,\n sum(complete_plays) as complete_plays,\n sum(seeks) as seeks,\n cast(sum(play_time_min) as {{ dbt_utils.type_int() }}) as play_time_min,\n -- using session and not page_view as the base for average to save cost by not joining on snowplow_media_player_base for calculating on individual page_view level average\n cast(avg(case when (video_plays + audio_plays) > 0 then avg_play_time_min end) as {{ dbt_utils.type_int() }}) as avg_session_play_time_min,\n avg(avg_percent_played) as avg_percent_played\n\n from {{ ref(\"snowplow_media_player_session_stats\") }}\n\n group by 1\n\n)\n\nselect *\n\nfrom prep", "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.type_int"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_media_player", "custom", "snowplow_media_player_user_stats"], "unique_id": "model.snowplow_media_player.snowplow_media_player_user_stats", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "custom/snowplow_media_player_user_stats.sql", "original_file_path": "models/custom/snowplow_media_player_user_stats.sql", "name": "snowplow_media_player_user_stats", "alias": "snowplow_media_player_user_stats", "checksum": {"name": "sha256", "checksum": "0c1c3a0c2322f179d3d55b5f24c3f30acd9315867f5565b1bb06e78fac49655d"}, "tags": ["snowplow_web_incremental"], "refs": [["snowplow_media_player_session_stats"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_media_player://models/custom/snowplow_media_player_custom.yml", "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "table", "schema": "scratch", "tags": "snowplow_web_incremental", "enabled": false}, "created_at": 1652369620.168629}], "model.snowplow_media_player.snowplow_media_player_session_stats": [{"raw_sql": "{{\n config(\n materialized = 'table'\n )\n}}\n\nwith prep as (\n\n select\n domain_sessionid,\n domain_userid,\n count(*) as impressions,\n count(distinct case when media_type = 'video' and is_played then media_id end) as videos_played,\n count(distinct case when media_type = 'audio' and is_played then media_id end) as audio_played,\n sum(case when media_type = 'video' and is_played then 1 else 0 end) as video_plays,\n sum(case when media_type = 'audio' and is_played then 1 else 0 end) as audio_plays,\n sum(case when media_type = 'video' and is_valid_play then 1 else 0 end) as valid_video_plays,\n sum(case when media_type = 'audio' and is_valid_play then 1 else 0 end) as valid_audio_plays,\n min(start_tstamp) start_tstamp,\n max(end_tstamp) as end_tstamp,\n sum(seeks) as seeks,\n sum(play_time_sec / cast(60 as {{ dbt_utils.type_float() }})) as play_time_min,\n sum(play_time_sec_muted / cast(60 as {{ dbt_utils.type_float() }})) as play_time_min_muted,\n avg(case when is_played then play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) end) as avg_play_time_min,\n avg(case when is_played then coalesce(play_time_sec / nullif(duration, 0), 0) end) as avg_percent_played,\n sum(case when is_complete_play then 1 else 0 end) as complete_plays\n\n from {{ ref(\"snowplow_media_player_base\") }}\n\n group by 1,2\n\n)\n\nselect *\n\nfrom prep", "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.type_float"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_media_player", "custom", "snowplow_media_player_session_stats"], "unique_id": "model.snowplow_media_player.snowplow_media_player_session_stats", "package_name": "snowplow_media_player", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player", "path": "custom/snowplow_media_player_session_stats.sql", "original_file_path": "models/custom/snowplow_media_player_session_stats.sql", "name": "snowplow_media_player_session_stats", "alias": "snowplow_media_player_session_stats", "checksum": {"name": "sha256", "checksum": "71233c3bb84ecda87384d146d4ec941af75d6f4dca07b5bf4d009eb93127c30e"}, "tags": ["snowplow_web_incremental"], "refs": [["snowplow_media_player_base"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"bind": false, "materialized": "table", "schema": "scratch", "tags": "snowplow_web_incremental", "enabled": false}, "created_at": 1652369620.171455}], "model.snowplow_web.snowplow_web_pv_ua_parser": [{"raw_sql": "{{ \n config(\n sort='page_view_id',\n dist='page_view_id',\n enabled=(var('snowplow__enable_ua', false) and target.type in ['redshift', 'postgres'] | as_bool())\n ) \n}}\n\nselect\n pv.page_view_id,\n\n ua.useragent_family,\n ua.useragent_major,\n ua.useragent_minor,\n ua.useragent_patch,\n ua.useragent_version,\n ua.os_family,\n ua.os_major,\n ua.os_minor,\n ua.os_patch,\n ua.os_patch_minor,\n ua.os_version,\n ua.device_family\n\nfrom {{ var('snowplow__ua_parser_context') }} as ua\n\ninner join {{ ref('snowplow_web_page_view_events') }} pv\non ua.root_id = pv.event_id\nand ua.root_tstamp = pv.collector_tstamp\n\nwhere ua.root_tstamp >= (select lower_limit from {{ ref('snowplow_web_pv_limits') }})\n and ua.root_tstamp <= (select upper_limit from {{ ref('snowplow_web_pv_limits') }})", "resource_type": "model", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "page_view_id", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "default", "snowplow_web_pv_ua_parser"], "unique_id": "model.snowplow_web.snowplow_web_pv_ua_parser", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/default/snowplow_web_pv_ua_parser.sql", "original_file_path": "models/page_views/scratch/default/snowplow_web_pv_ua_parser.sql", "name": "snowplow_web_pv_ua_parser", "alias": "snowplow_web_pv_ua_parser", "checksum": {"name": "sha256", "checksum": "0090064b7ea382318e02aea033d7c3a6f9b1e185b52749504009c25e08558100"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_page_view_events"], ["snowplow_web_pv_limits"], ["snowplow_web_pv_limits"]], "sources": [["atomic", "com_snowplowanalytics_snowplow_ua_parser_context_1"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "enabled": false, "sort": "page_view_id", "dist": "page_view_id"}, "created_at": 1652369620.222036}], "model.snowplow_web.snowplow_web_pv_iab": [{"raw_sql": "{{ \n config(\n sort='page_view_id',\n dist='page_view_id',\n enabled=(var('snowplow__enable_iab', false) and target.type in ['redshift', 'postgres'] | as_bool())\n ) \n}}\n\nselect\n pv.page_view_id,\n\n iab.category,\n iab.primary_impact,\n iab.reason,\n iab.spider_or_robot\n\nfrom {{ var('snowplow__iab_context') }} iab\n\ninner join {{ ref('snowplow_web_page_view_events') }} pv\non iab.root_id = pv.event_id\nand iab.root_tstamp = pv.collector_tstamp\n\nwhere iab.root_tstamp >= (select lower_limit from {{ ref('snowplow_web_pv_limits') }})\n and iab.root_tstamp <= (select upper_limit from {{ ref('snowplow_web_pv_limits') }})", "resource_type": "model", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "page_view_id", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "default", "snowplow_web_pv_iab"], "unique_id": "model.snowplow_web.snowplow_web_pv_iab", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/default/snowplow_web_pv_iab.sql", "original_file_path": "models/page_views/scratch/default/snowplow_web_pv_iab.sql", "name": "snowplow_web_pv_iab", "alias": "snowplow_web_pv_iab", "checksum": {"name": "sha256", "checksum": "538b846b4959a7a3f63327951ca7ab239fa6d22364ef5f85e2a8f053a5601601"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_page_view_events"], ["snowplow_web_pv_limits"], ["snowplow_web_pv_limits"]], "sources": [["atomic", "com_iab_snowplow_spiders_and_robots_1"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "enabled": false, "sort": "page_view_id", "dist": "page_view_id"}, "created_at": 1652369620.225834}], "model.snowplow_web.snowplow_web_pv_yauaa": [{"raw_sql": "{{ \n config(\n sort='page_view_id',\n dist='page_view_id',\n enabled=(var('snowplow__enable_yauaa', false) and target.type in ['redshift', 'postgres'] | as_bool())\n ) \n}}\n\n\nselect\n pv.page_view_id,\n\n ya.device_class,\n ya.agent_class,\n ya.agent_name,\n ya.agent_name_version,\n ya.agent_name_version_major,\n ya.agent_version,\n ya.agent_version_major,\n ya.device_brand,\n ya.device_name,\n ya.device_version,\n ya.layout_engine_class,\n ya.layout_engine_name,\n ya.layout_engine_name_version,\n ya.layout_engine_name_version_major,\n ya.layout_engine_version,\n ya.layout_engine_version_major,\n ya.operating_system_class,\n ya.operating_system_name,\n ya.operating_system_name_version,\n ya.operating_system_version\n\nfrom {{ var('snowplow__yauaa_context') }} ya\n\ninner join {{ ref('snowplow_web_page_view_events') }} pv\non ya.root_id = pv.event_id\nand ya.root_tstamp = pv.collector_tstamp\n\nwhere ya.root_tstamp >= (select lower_limit from {{ ref('snowplow_web_pv_limits') }})\n and ya.root_tstamp <= (select upper_limit from {{ ref('snowplow_web_pv_limits') }})", "resource_type": "model", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "dist": "page_view_id", "sort": "page_view_id", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "default", "snowplow_web_pv_yauaa"], "unique_id": "model.snowplow_web.snowplow_web_pv_yauaa", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/default/snowplow_web_pv_yauaa.sql", "original_file_path": "models/page_views/scratch/default/snowplow_web_pv_yauaa.sql", "name": "snowplow_web_pv_yauaa", "alias": "snowplow_web_pv_yauaa", "checksum": {"name": "sha256", "checksum": "352543ed007c88c7ecb869057d78b556ed36c559333d2c0ffbdb26b86bc634c3"}, "tags": ["snowplow_web_incremental", "scratch"], "refs": [["snowplow_web_page_view_events"], ["snowplow_web_pv_limits"], ["snowplow_web_pv_limits"]], "sources": [["atomic", "nl_basjes_yauaa_context_1"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "snowplow_web://models/page_views/scratch/page_views_scratch.yml", "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": "scratch", "enabled": false, "sort": "page_view_id", "dist": "page_view_id"}, "created_at": 1652369620.23963}], "model.snowplow_web.snowplow_web_page_views_this_run": [{"raw_sql": "{{ \n config(\n partition_by = {\n \"field\": \"start_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=[\"domain_sessionid\"],\n tags=[\"this_run\"]\n ) \n}}\n\nwith page_view_events as (\nselect\n ev.page_view_id,\n ev.event_id,\n\n ev.app_id,\n\n -- user fields\n ev.user_id,\n ev.domain_userid,\n ev.network_userid,\n\n -- session fields\n ev.domain_sessionid,\n ev.domain_sessionidx,\n\n -- timestamp fields\n ev.dvce_created_tstamp,\n ev.collector_tstamp,\n ev.derived_tstamp,\n ev.derived_tstamp as start_tstamp,\n\n ev.doc_width,\n ev.doc_height,\n\n ev.page_title,\n ev.page_url,\n ev.page_urlscheme,\n ev.page_urlhost,\n ev.page_urlpath,\n ev.page_urlquery,\n ev.page_urlfragment,\n\n ev.mkt_medium,\n ev.mkt_source,\n ev.mkt_term,\n ev.mkt_content,\n ev.mkt_campaign,\n ev.mkt_clickid,\n ev.mkt_network,\n\n ev.page_referrer,\n ev.refr_urlscheme,\n ev.refr_urlhost,\n ev.refr_urlpath,\n ev.refr_urlquery,\n ev.refr_urlfragment,\n ev.refr_medium,\n ev.refr_source,\n ev.refr_term,\n\n ev.geo_country,\n ev.geo_region,\n ev.geo_region_name,\n ev.geo_city,\n ev.geo_zipcode,\n ev.geo_latitude,\n ev.geo_longitude,\n ev.geo_timezone ,\n\n ev.user_ipaddress,\n\n ev.useragent,\n\n ev.br_lang,\n ev.br_viewwidth,\n ev.br_viewheight,\n ev.br_colordepth,\n ev.br_renderengine,\n ev.os_timezone,\n\n row_number() over (partition by ev.domain_sessionid order by ev.derived_tstamp) AS page_view_in_session_index,\n\n -- optional fields, only populated if enabled.\n\n -- iab enrichment fields: set iab variable to true to enable\n {{ snowplow_utils.get_optional_fields(\n enabled=var('snowplow__enable_iab', false),\n fields=iab_fields(),\n col_prefix='contexts_com_iab_snowplow_spiders_and_robots_1',\n relation=ref('snowplow_web_base_events_this_run'),\n relation_alias='ev') }},\n\n -- ua parser enrichment fields: set ua_parser variable to true to enable\n {{ snowplow_utils.get_optional_fields(\n enabled=var('snowplow__enable_ua', false),\n fields=ua_fields(),\n col_prefix='contexts_com_snowplowanalytics_snowplow_ua_parser_context_1',\n relation=ref('snowplow_web_base_events_this_run'),\n relation_alias='ev') }},\n\n -- yauaa enrichment fields: set yauaa variable to true to enable\n {{ snowplow_utils.get_optional_fields(\n enabled=var('snowplow__enable_yauaa', false),\n fields=yauaa_fields(),\n col_prefix='contexts_nl_basjes_yauaa_context_1',\n relation=ref('snowplow_web_base_events_this_run'),\n relation_alias='ev') }}\n\nfrom (\n select\n array_agg(e order by e.derived_tstamp limit 1)[offset(0)] as ev\n -- order by matters here since derived_tstamp determines parts of model logic\n\n from {{ ref('snowplow_web_base_events_this_run') }} as e\n where e.event_name = 'page_view'\n and e.page_view_id is not null\n \n group by e.page_view_id\n)\n\n{% if var(\"snowplow__ua_bot_filter\", true) %}\n where not regexp_contains(ev.useragent, '%(bot|crawl|slurp|spider|archiv|spinn|sniff|seo|audit|survey|pingdom|worm|capture|(browser|screen)shots|analyz|index|thumb|check|facebook|PingdomBot|PhantomJS|YandexBot|Twitterbot|a_archiver|facebookexternalhit|Bingbot|BingPreview|Googlebot|Baiduspider|360(Spider|User-agent)|semalt)%')\n{% endif %}\n)\n\n\nselect\n ev.page_view_id,\n ev.event_id,\n\n ev.app_id,\n\n -- user fields\n ev.user_id,\n ev.domain_userid,\n ev.network_userid,\n\n -- session fields\n ev.domain_sessionid,\n ev.domain_sessionidx,\n\n ev.page_view_in_session_index,\n max(ev.page_view_in_session_index) over (partition by ev.domain_sessionid) as page_views_in_session,\n\n -- timestamp fields\n ev.dvce_created_tstamp,\n ev.collector_tstamp,\n ev.derived_tstamp,\n ev.start_tstamp,\n coalesce(t.end_tstamp, ev.derived_tstamp) as end_tstamp, -- only page views with pings will have a row in table t\n {{ dbt_utils.current_timestamp_in_utc() }} as model_tstamp,\n\n coalesce(t.engaged_time_in_s, 0) as engaged_time_in_s, -- where there are no pings, engaged time is 0.\n timestamp_diff(coalesce(t.end_tstamp, ev.derived_tstamp), ev.derived_tstamp, second) as absolute_time_in_s,\n\n sd.hmax as horizontal_pixels_scrolled,\n sd.vmax as vertical_pixels_scrolled,\n\n sd.relative_hmax as horizontal_percentage_scrolled,\n sd.relative_vmax as vertical_percentage_scrolled,\n\n ev.doc_width,\n ev.doc_height,\n\n ev.page_title,\n ev.page_url,\n ev.page_urlscheme,\n ev.page_urlhost,\n ev.page_urlpath,\n ev.page_urlquery,\n ev.page_urlfragment,\n\n ev.mkt_medium,\n ev.mkt_source,\n ev.mkt_term,\n ev.mkt_content,\n ev.mkt_campaign,\n ev.mkt_clickid,\n ev.mkt_network,\n\n ev.page_referrer,\n ev.refr_urlscheme,\n ev.refr_urlhost,\n ev.refr_urlpath,\n ev.refr_urlquery,\n ev.refr_urlfragment,\n ev.refr_medium,\n ev.refr_source,\n ev.refr_term,\n\n ev.geo_country,\n ev.geo_region,\n ev.geo_region_name,\n ev.geo_city,\n ev.geo_zipcode,\n ev.geo_latitude,\n ev.geo_longitude,\n ev.geo_timezone,\n\n ev.user_ipaddress,\n\n ev.useragent,\n\n ev.br_lang,\n ev.br_viewwidth,\n ev.br_viewheight,\n ev.br_colordepth,\n ev.br_renderengine,\n\n ev.os_timezone,\n\n ev.category,\n ev.primary_impact,\n ev.reason,\n ev.spider_or_robot,\n \n ev.useragent_family,\n ev.useragent_major,\n ev.useragent_minor,\n ev.useragent_patch,\n ev.useragent_version,\n ev.os_family,\n ev.os_major,\n ev.os_minor,\n ev.os_patch,\n ev.os_patch_minor,\n ev.os_version,\n ev.device_family,\n\n ev.device_class,\n ev.agent_class,\n ev.agent_name,\n ev.agent_name_version,\n ev.agent_name_version_major,\n ev.agent_version,\n ev.agent_version_major,\n ev.device_brand,\n ev.device_name,\n ev.device_version,\n ev.layout_engine_class,\n ev.layout_engine_name,\n ev.layout_engine_name_version,\n ev.layout_engine_name_version_major,\n ev.layout_engine_version,\n ev.layout_engine_version_major,\n ev.operating_system_class,\n ev.operating_system_name,\n ev.operating_system_name_version,\n ev.operating_system_version\n\nfrom page_view_events ev\n\nleft join {{ ref('snowplow_web_pv_engaged_time') }} t\non ev.page_view_id = t.page_view_id\n\nleft join {{ ref('snowplow_web_pv_scroll_depth') }} sd\non ev.page_view_id = sd.page_view_id", "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_web.iab_fields", "macro.snowplow_utils.get_optional_fields", "macro.snowplow_web.ua_fields", "macro.snowplow_web.yauaa_fields", "macro.dbt_utils.current_timestamp_in_utc"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": ["domain_sessionid"], "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "bigquery", "snowplow_web_page_views_this_run"], "unique_id": "model.snowplow_web.snowplow_web_page_views_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/bigquery/snowplow_web_page_views_this_run.sql", "original_file_path": "models/page_views/scratch/bigquery/snowplow_web_page_views_this_run.sql", "name": "snowplow_web_page_views_this_run", "alias": "snowplow_web_page_views_this_run", "checksum": {"name": "sha256", "checksum": "e3869e7d1a549c873716ee99407cfeaeb85e0fd7683bed992b4ed03eba0e716d"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_web_base_events_this_run"], ["snowplow_web_base_events_this_run"], ["snowplow_web_base_events_this_run"], ["snowplow_web_base_events_this_run"], ["snowplow_web_pv_engaged_time"], ["snowplow_web_pv_scroll_depth"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "enabled": "{{ target.type == 'bigquery' | as_bool() }}", "partition_by": {"field": "start_tstamp", "data_type": "timestamp"}, "cluster_by": ["domain_sessionid"]}, "created_at": 1652369620.2477078}, {"raw_sql": "{{ \n config(\n tags=[\"this_run\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\nwith prep as (\nselect\n ev.page_view_id,\n ev.event_id,\n\n ev.app_id,\n\n -- user fields\n ev.user_id,\n ev.domain_userid,\n ev.network_userid,\n\n -- session fields\n ev.domain_sessionid,\n ev.domain_sessionidx,\n\n -- timestamp fields\n ev.dvce_created_tstamp,\n ev.collector_tstamp,\n ev.derived_tstamp,\n ev.derived_tstamp as start_tstamp,\n\n ev.doc_width,\n ev.doc_height,\n\n ev.page_title,\n ev.page_url,\n ev.page_urlscheme,\n ev.page_urlhost,\n ev.page_urlpath,\n ev.page_urlquery,\n ev.page_urlfragment,\n\n ev.mkt_medium,\n ev.mkt_source,\n ev.mkt_term,\n ev.mkt_content,\n ev.mkt_campaign,\n ev.mkt_clickid,\n ev.mkt_network,\n\n ev.page_referrer,\n ev.refr_urlscheme,\n ev.refr_urlhost,\n ev.refr_urlpath,\n ev.refr_urlquery,\n ev.refr_urlfragment,\n ev.refr_medium,\n ev.refr_source,\n ev.refr_term,\n\n ev.geo_country,\n ev.geo_region,\n ev.geo_region_name,\n ev.geo_city,\n ev.geo_zipcode,\n ev.geo_latitude,\n ev.geo_longitude,\n ev.geo_timezone ,\n\n ev.user_ipaddress,\n\n ev.useragent,\n\n ev.br_lang,\n ev.br_viewwidth,\n ev.br_viewheight,\n ev.br_colordepth,\n ev.br_renderengine,\n ev.os_timezone,\n\n -- optional fields, only populated if enabled.\n\n -- iab enrichment fields: set iab variable to true to enable\n {% if var('snowplow__enable_iab', false) %}\n\n ev.contexts_com_iab_snowplow_spiders_and_robots_1[0]:category::VARCHAR AS category,\n ev.contexts_com_iab_snowplow_spiders_and_robots_1[0]:primaryImpact::VARCHAR AS primary_impact,\n ev.contexts_com_iab_snowplow_spiders_and_robots_1[0]:reason::VARCHAR AS reason,\n ev.contexts_com_iab_snowplow_spiders_and_robots_1[0]:spiderOrRobot::BOOLEAN AS spider_or_robot,\n\n {% else %}\n\n cast(null as {{ dbt_utils.type_string() }}) as category,\n cast(null as {{ dbt_utils.type_string() }}) as primary_impact,\n cast(null as {{ dbt_utils.type_string() }}) as reason,\n cast(null as boolean) as spider_or_robot,\n\n {% endif %}\n\n -- ua parser enrichment fields: set ua_parser variable to true to enable\n {% if var('snowplow__enable_ua', false) %}\n\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:useragentFamily::VARCHAR AS useragent_family,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:useragentMajor::VARCHAR AS useragent_major,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:useragentMinor::VARCHAR AS useragent_minor,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:useragentPatch::VARCHAR AS useragent_patch,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:useragentVersion::VARCHAR AS useragent_version,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:osFamily::VARCHAR AS os_family,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:osMajor::VARCHAR AS os_major,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:osMinor::VARCHAR AS os_minor,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:osPatch::VARCHAR AS os_patch,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:osPatchMinor::VARCHAR AS os_patch_minor,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:osVersion::VARCHAR AS os_version,\n ev.contexts_com_snowplowanalytics_snowplow_ua_parser_context_1[0]:deviceFamily::VARCHAR AS device_family,\n\n {% else %}\n\n cast(null as {{ dbt_utils.type_string() }}) as useragent_family,\n cast(null as {{ dbt_utils.type_string() }}) as useragent_major,\n cast(null as {{ dbt_utils.type_string() }}) as useragent_minor,\n cast(null as {{ dbt_utils.type_string() }}) as useragent_patch,\n cast(null as {{ dbt_utils.type_string() }}) as useragent_version,\n cast(null as {{ dbt_utils.type_string() }}) as os_family,\n cast(null as {{ dbt_utils.type_string() }}) as os_major,\n cast(null as {{ dbt_utils.type_string() }}) as os_minor,\n cast(null as {{ dbt_utils.type_string() }}) as os_patch,\n cast(null as {{ dbt_utils.type_string() }}) as os_patch_minor,\n cast(null as {{ dbt_utils.type_string() }}) as os_version,\n cast(null as {{ dbt_utils.type_string() }}) as device_family,\n\n {% endif %}\n\n -- yauaa enrichment fields: set yauaa variable to true to enable\n {% if var('snowplow__enable_yauaa', false) %}\n\n ev.contexts_nl_basjes_yauaa_context_1[0]:deviceClass::VARCHAR AS device_class,\n ev.contexts_nl_basjes_yauaa_context_1[0]:agentClass::VARCHAR AS agent_class,\n ev.contexts_nl_basjes_yauaa_context_1[0]:agentName::VARCHAR AS agent_name,\n ev.contexts_nl_basjes_yauaa_context_1[0]:agentNameVersion::VARCHAR AS agent_name_version,\n ev.contexts_nl_basjes_yauaa_context_1[0]:agentNameVersionMajor::VARCHAR AS agent_name_version_major,\n ev.contexts_nl_basjes_yauaa_context_1[0]:agentVersion::VARCHAR AS agent_version,\n ev.contexts_nl_basjes_yauaa_context_1[0]:agentVersionMajor::VARCHAR AS agent_version_major,\n ev.contexts_nl_basjes_yauaa_context_1[0]:deviceBrand::VARCHAR AS device_brand,\n ev.contexts_nl_basjes_yauaa_context_1[0]:deviceName::VARCHAR AS device_name,\n ev.contexts_nl_basjes_yauaa_context_1[0]:deviceVersion::VARCHAR AS device_version,\n ev.contexts_nl_basjes_yauaa_context_1[0]:layoutEngineClass::VARCHAR AS layout_engine_class,\n ev.contexts_nl_basjes_yauaa_context_1[0]:layoutEngineName::VARCHAR AS layout_engine_name,\n ev.contexts_nl_basjes_yauaa_context_1[0]:layoutEngineNameVersion::VARCHAR AS layout_engine_name_version,\n ev.contexts_nl_basjes_yauaa_context_1[0]:layoutEngineNameVersionMajor::VARCHAR AS layout_engine_name_version_major,\n ev.contexts_nl_basjes_yauaa_context_1[0]:layoutEngineVersion::VARCHAR AS layout_engine_version,\n ev.contexts_nl_basjes_yauaa_context_1[0]:layoutEngineVersionMajor::VARCHAR AS layout_engine_version_major,\n ev.contexts_nl_basjes_yauaa_context_1[0]:operatingSystemClass::VARCHAR AS operating_system_class,\n ev.contexts_nl_basjes_yauaa_context_1[0]:operatingSystemName::VARCHAR AS operating_system_name,\n ev.contexts_nl_basjes_yauaa_context_1[0]:operatingSystemNameVersion::VARCHAR AS operating_system_name_version,\n ev.contexts_nl_basjes_yauaa_context_1[0]:operatingSystemVersion::VARCHAR AS operating_system_version\n\n {% else %}\n\n cast(null as {{ dbt_utils.type_string() }}) as device_class,\n cast(null as {{ dbt_utils.type_string() }}) as agent_class,\n cast(null as {{ dbt_utils.type_string() }}) as agent_name,\n cast(null as {{ dbt_utils.type_string() }}) as agent_name_version,\n cast(null as {{ dbt_utils.type_string() }}) as agent_name_version_major,\n cast(null as {{ dbt_utils.type_string() }}) as agent_version,\n cast(null as {{ dbt_utils.type_string() }}) as agent_version_major,\n cast(null as {{ dbt_utils.type_string() }}) as device_brand,\n cast(null as {{ dbt_utils.type_string() }}) as device_name,\n cast(null as {{ dbt_utils.type_string() }}) as device_version,\n cast(null as {{ dbt_utils.type_string() }}) as layout_engine_class,\n cast(null as {{ dbt_utils.type_string() }}) as layout_engine_name,\n cast(null as {{ dbt_utils.type_string() }}) as layout_engine_name_version,\n cast(null as {{ dbt_utils.type_string() }}) as layout_engine_name_version_major,\n cast(null as {{ dbt_utils.type_string() }}) as layout_engine_version,\n cast(null as {{ dbt_utils.type_string() }}) as layout_engine_version_major,\n cast(null as {{ dbt_utils.type_string() }}) as operating_system_class,\n cast(null as {{ dbt_utils.type_string() }}) as operating_system_name,\n cast(null as {{ dbt_utils.type_string() }}) as operating_system_name_version,\n cast(null as {{ dbt_utils.type_string() }}) as operating_system_version\n\n {% endif %}\n\n from {{ ref('snowplow_web_base_events_this_run') }} as ev\n \n where ev.event_name = 'page_view'\n and ev.page_view_id is not null\n\n {% if var(\"snowplow__ua_bot_filter\", true) %}\n and not rlike(ev.useragent, '.*(bot|crawl|slurp|spider|archiv|spinn|sniff|seo|audit|survey|pingdom|worm|capture|(browser|screen)shots|analyz|index|thumb|check|facebook|PingdomBot|PhantomJS|YandexBot|Twitterbot|a_archiver|facebookexternalhit|Bingbot|BingPreview|Googlebot|Baiduspider|360(Spider|User-agent)|semalt).*')\n {% endif %}\n\n qualify row_number() over (partition by ev.page_view_id order by ev.derived_tstamp) = 1\n)\n\n, page_view_events as (\n select\n p.page_view_id,\n p.event_id,\n\n p.app_id,\n\n -- user fields\n p.user_id,\n p.domain_userid,\n p.network_userid,\n\n -- session fields\n p.domain_sessionid,\n p.domain_sessionidx,\n\n row_number() over (partition by p.domain_sessionid order by p.derived_tstamp) AS page_view_in_session_index,\n\n -- timestamp fields\n p.dvce_created_tstamp,\n p.collector_tstamp,\n p.derived_tstamp,\n p.start_tstamp,\n coalesce(t.end_tstamp, p.derived_tstamp) as end_tstamp, -- only page views with pings will have a row in table t\n {{ dbt_utils.current_timestamp_in_utc() }} as model_tstamp,\n\n coalesce(t.engaged_time_in_s, 0) as engaged_time_in_s, -- where there are no pings, engaged time is 0.\n timediff(second, p.derived_tstamp, coalesce(t.end_tstamp, p.derived_tstamp)) as absolute_time_in_s,\n\n sd.hmax as horizontal_pixels_scrolled,\n sd.vmax as vertical_pixels_scrolled,\n\n sd.relative_hmax as horizontal_percentage_scrolled,\n sd.relative_vmax as vertical_percentage_scrolled,\n\n p.doc_width,\n p.doc_height,\n\n p.page_title,\n p.page_url,\n p.page_urlscheme,\n p.page_urlhost,\n p.page_urlpath,\n p.page_urlquery,\n p.page_urlfragment,\n\n p.mkt_medium,\n p.mkt_source,\n p.mkt_term,\n p.mkt_content,\n p.mkt_campaign,\n p.mkt_clickid,\n p.mkt_network,\n\n p.page_referrer,\n p.refr_urlscheme,\n p.refr_urlhost,\n p.refr_urlpath,\n p.refr_urlquery,\n p.refr_urlfragment,\n p.refr_medium,\n p.refr_source,\n p.refr_term,\n\n p.geo_country,\n p.geo_region,\n p.geo_region_name,\n p.geo_city,\n p.geo_zipcode,\n p.geo_latitude,\n p.geo_longitude,\n p.geo_timezone,\n\n p.user_ipaddress,\n\n p.useragent,\n\n p.br_lang,\n p.br_viewwidth,\n p.br_viewheight,\n p.br_colordepth,\n p.br_renderengine,\n\n p.os_timezone,\n\n p.category,\n p.primary_impact,\n p.reason,\n p.spider_or_robot,\n\n p.useragent_family,\n p.useragent_major,\n p.useragent_minor,\n p.useragent_patch,\n p.useragent_version,\n p.os_family,\n p.os_major,\n p.os_minor,\n p.os_patch,\n p.os_patch_minor,\n p.os_version,\n p.device_family,\n\n p.device_class,\n p.agent_class,\n p.agent_name,\n p.agent_name_version,\n p.agent_name_version_major,\n p.agent_version,\n p.agent_version_major,\n p.device_brand,\n p.device_name,\n p.device_version,\n p.layout_engine_class,\n p.layout_engine_name,\n p.layout_engine_name_version,\n p.layout_engine_name_version_major,\n p.layout_engine_version,\n p.layout_engine_version_major,\n p.operating_system_class,\n p.operating_system_name,\n p.operating_system_name_version,\n p.operating_system_version\n\n from prep p\n\n left join {{ ref('snowplow_web_pv_engaged_time') }} t\n on p.page_view_id = t.page_view_id\n\n left join {{ ref('snowplow_web_pv_scroll_depth') }} sd\n on p.page_view_id = sd.page_view_id\n)\n\nselect\n pve.page_view_id,\n pve.event_id,\n\n pve.app_id,\n\n -- user fields\n pve.user_id,\n pve.domain_userid,\n pve.network_userid,\n\n -- session fields\n pve.domain_sessionid,\n pve.domain_sessionidx,\n\n pve.page_view_in_session_index,\n max(pve.page_view_in_session_index) over (partition by pve.domain_sessionid) as page_views_in_session,\n\n -- timestamp fields\n pve.dvce_created_tstamp,\n pve.collector_tstamp,\n pve.derived_tstamp,\n pve.start_tstamp,\n pve.end_tstamp,\n pve.model_tstamp,\n\n pve.engaged_time_in_s,\n pve.absolute_time_in_s,\n\n pve.horizontal_pixels_scrolled,\n pve.vertical_pixels_scrolled,\n\n pve.horizontal_percentage_scrolled,\n pve.vertical_percentage_scrolled,\n\n pve.doc_width,\n pve.doc_height,\n\n pve.page_title,\n pve.page_url,\n pve.page_urlscheme,\n pve.page_urlhost,\n pve.page_urlpath,\n pve.page_urlquery,\n pve.page_urlfragment,\n\n pve.mkt_medium,\n pve.mkt_source,\n pve.mkt_term,\n pve.mkt_content,\n pve.mkt_campaign,\n pve.mkt_clickid,\n pve.mkt_network,\n\n pve.page_referrer,\n pve.refr_urlscheme,\n pve.refr_urlhost,\n pve.refr_urlpath,\n pve.refr_urlquery,\n pve.refr_urlfragment,\n pve.refr_medium,\n pve.refr_source,\n pve.refr_term,\n\n pve.geo_country,\n pve.geo_region,\n pve.geo_region_name,\n pve.geo_city,\n pve.geo_zipcode,\n pve.geo_latitude,\n pve.geo_longitude,\n pve.geo_timezone,\n\n pve.user_ipaddress,\n\n pve.useragent,\n\n pve.br_lang,\n pve.br_viewwidth,\n pve.br_viewheight,\n pve.br_colordepth,\n pve.br_renderengine,\n\n pve.os_timezone,\n\n pve.category,\n pve.primary_impact,\n pve.reason,\n pve.spider_or_robot,\n\n pve.useragent_family,\n pve.useragent_major,\n pve.useragent_minor,\n pve.useragent_patch,\n pve.useragent_version,\n pve.os_family,\n pve.os_major,\n pve.os_minor,\n pve.os_patch,\n pve.os_patch_minor,\n pve.os_version,\n pve.device_family,\n\n pve.device_class,\n pve.agent_class,\n pve.agent_name,\n pve.agent_name_version,\n pve.agent_name_version_major,\n pve.agent_version,\n pve.agent_version_major,\n pve.device_brand,\n pve.device_name,\n pve.device_version,\n pve.layout_engine_class,\n pve.layout_engine_name,\n pve.layout_engine_name_version,\n pve.layout_engine_name_version_major,\n pve.layout_engine_version,\n pve.layout_engine_version_major,\n pve.operating_system_class,\n pve.operating_system_name,\n pve.operating_system_name_version,\n pve.operating_system_version\n\nfrom page_view_events pve", "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.set_query_tag", "macro.dbt_utils.type_string", "macro.dbt_utils.current_timestamp_in_utc"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "page_views", "scratch", "snowflake", "snowplow_web_page_views_this_run"], "unique_id": "model.snowplow_web.snowplow_web_page_views_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "page_views/scratch/snowflake/snowplow_web_page_views_this_run.sql", "original_file_path": "models/page_views/scratch/snowflake/snowplow_web_page_views_this_run.sql", "name": "snowplow_web_page_views_this_run", "alias": "snowplow_web_page_views_this_run", "checksum": {"name": "sha256", "checksum": "cd62bae0df89d3f5c1c6fa015bfac4afea823913b455cfd68f5863ec5e5a907e"}, "tags": ["snowplow_web_incremental", "scratch", "this_run"], "refs": [["snowplow_web_base_events_this_run"], ["snowplow_web_pv_engaged_time"], ["snowplow_web_pv_scroll_depth"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "enabled": "{{ target.type == 'snowflake' | as_bool() }}", "sql_header": "\n \n"}, "created_at": 1652369620.2638772}], "model.snowplow_web.snowplow_web_base_events_this_run": [{"raw_sql": "{{ \n config(\n partition_by = {\n \"field\": \"collector_tstamp\",\n \"data_type\": \"timestamp\"\n },\n cluster_by=[\"event_name\",\"page_view_id\"],\n tags=[\"this_run\"]\n ) \n}}\n\n{%- set lower_limit, upper_limit = snowplow_utils.return_limits_from_model(ref('snowplow_web_base_sessions_this_run'),\n 'start_tstamp',\n 'end_tstamp') %}\n\n-- without downstream joins, it's safe to dedupe by picking the first event_id found.\nselect\n array_agg(e order by e.collector_tstamp limit 1)[offset(0)].*\n\nfrom (\n\n select\n a.contexts_com_snowplowanalytics_snowplow_web_page_1_0_0[safe_offset(0)].id as page_view_id,\n b.domain_userid, -- take domain_userid from manifest. This ensures only 1 domain_userid per session.\n a.* except(contexts_com_snowplowanalytics_snowplow_web_page_1_0_0, domain_userid)\n\n from {{ var('snowplow__events') }} as a\n inner join {{ ref('snowplow_web_base_sessions_this_run') }} as b\n on a.domain_sessionid = b.session_id\n\n where a.collector_tstamp <= {{ snowplow_utils.timestamp_add('day', var(\"snowplow__max_session_days\", 3), 'b.start_tstamp') }}\n and a.dvce_sent_tstamp <= {{ snowplow_utils.timestamp_add('day', var(\"snowplow__days_late_allowed\", 3), 'a.dvce_created_tstamp') }}\n and a.collector_tstamp >= {{ lower_limit }}\n and a.collector_tstamp <= {{ upper_limit }}\n {% if var('snowplow__derived_tstamp_partitioned', true) and target.type == 'bigquery' | as_bool() %}\n and a.derived_tstamp >= {{ lower_limit }}\n and a.derived_tstamp <= {{ upper_limit }}\n {% endif %}\n and {{ snowplow_utils.app_id_filter(var(\"snowplow__app_id\",[])) }}\n\n) e\ngroup by e.event_id", "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.return_limits_from_model", "macro.snowplow_utils.timestamp_add", "macro.snowplow_utils.app_id_filter"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "partition_by": {"field": "collector_tstamp", "data_type": "timestamp"}, "cluster_by": ["event_name", "page_view_id"], "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "base", "scratch", "bigquery", "snowplow_web_base_events_this_run"], "unique_id": "model.snowplow_web.snowplow_web_base_events_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/scratch/bigquery/snowplow_web_base_events_this_run.sql", "original_file_path": "models/base/scratch/bigquery/snowplow_web_base_events_this_run.sql", "name": "snowplow_web_base_events_this_run", "alias": "snowplow_web_base_events_this_run", "checksum": {"name": "sha256", "checksum": "22a36711dc716a6fb3594ca1f29932176f57d723391349fd8cd81e234a5198f8"}, "tags": ["scratch", "this_run"], "refs": [["snowplow_web_base_sessions_this_run"], ["snowplow_web_base_sessions_this_run"]], "sources": [["atomic", "events"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "enabled": "{{ target.type == 'bigquery' | as_bool() }}", "partition_by": {"field": "collector_tstamp", "data_type": "timestamp"}, "cluster_by": ["event_name", "page_view_id"]}, "created_at": 1652369620.387616}, {"raw_sql": "{{ \n config(\n tags=[\"this_run\"],\n sql_header=snowplow_utils.set_query_tag(var('snowplow__query_tag', 'snowplow_dbt'))\n ) \n}}\n\n{%- set lower_limit, upper_limit = snowplow_utils.return_limits_from_model(ref('snowplow_web_base_sessions_this_run'),\n 'start_tstamp',\n 'end_tstamp') %}\n\n{%- set columns = adapter.get_columns_in_relation(var('snowplow__events'))|map(attribute='column')|map('lower')|list -%}\n{# No 'EXCEPT' to exclude cols in Snowflake. Remove domain_userid and page view context from returned columns then render. #}\n{%- set filtered_columns = columns|reject(\"equalto\",\"domain_userid\")|reject(\"equalto\",\"contexts_com_snowplowanalytics_snowplow_web_page_1\") -%}\n\n\nselect\n a.contexts_com_snowplowanalytics_snowplow_web_page_1[0]:id::varchar as page_view_id,\n b.domain_userid, -- take domain_userid from manifest. This ensures only 1 domain_userid per session.\n {{ 'a.'~filtered_columns|join(',\\n\\ta.') }}\n\nfrom {{ var('snowplow__events') }} as a\ninner join {{ ref('snowplow_web_base_sessions_this_run') }} as b\non a.domain_sessionid = b.session_id\n\nwhere a.collector_tstamp <= {{ snowplow_utils.timestamp_add('day', var(\"snowplow__max_session_days\", 3), 'b.start_tstamp') }}\nand a.dvce_sent_tstamp <= {{ snowplow_utils.timestamp_add('day', var(\"snowplow__days_late_allowed\", 3), 'a.dvce_created_tstamp') }}\nand a.collector_tstamp >= {{ lower_limit }}\nand a.collector_tstamp <= {{ upper_limit }}\nand {{ snowplow_utils.app_id_filter(var(\"snowplow__app_id\",[])) }}\n\nqualify row_number() over (partition by a.event_id order by a.collector_tstamp) = 1", "resource_type": "model", "depends_on": {"macros": ["macro.snowplow_utils.set_query_tag", "macro.snowplow_utils.return_limits_from_model", "macro.snowplow_utils.timestamp_add", "macro.snowplow_utils.app_id_filter"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "scratch", "database": null, "tags": ["scratch", "this_run"], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "bind": false, "sql_header": "\n \n", "post-hook": [], "pre-hook": []}, "database": "dev1", "schema": "dbt_agnes_scratch", "fqn": ["snowplow_web", "base", "scratch", "snowflake", "snowplow_web_base_events_this_run"], "unique_id": "model.snowplow_web.snowplow_web_base_events_this_run", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "base/scratch/snowflake/snowplow_web_base_events_this_run.sql", "original_file_path": "models/base/scratch/snowflake/snowplow_web_base_events_this_run.sql", "name": "snowplow_web_base_events_this_run", "alias": "snowplow_web_base_events_this_run", "checksum": {"name": "sha256", "checksum": "9c940a9973dd17c96c0860d325cecb90c032cd2cfca8beb2e8d72d594ef71083"}, "tags": ["scratch", "this_run"], "refs": [["snowplow_web_base_sessions_this_run"], ["snowplow_web_base_sessions_this_run"]], "sources": [["atomic", "events"], ["atomic", "events"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "bind": false, "schema": "scratch", "tags": ["this_run"], "enabled": "{{ target.type == 'snowflake' | as_bool() }}", "sql_header": "\n \n"}, "created_at": 1652369620.393043}], "test.snowplow_web.unique_snowplow_web_pv_iab_page_view_id.adb6919c79": [{"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(enabled=False) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_iab')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_pv_iab_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_pv_iab_page_view_id.adb6919c79", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_pv_iab_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_pv_iab_page_view_id", "alias": "unique_snowplow_web_pv_iab_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_iab"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"enabled": false}, "created_at": 1652369620.657054, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_iab"}], "test.snowplow_web.not_null_snowplow_web_pv_iab_page_view_id.858bd03daa": [{"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=False) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_iab')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_pv_iab_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_pv_iab_page_view_id.858bd03daa", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_pv_iab_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_pv_iab_page_view_id", "alias": "not_null_snowplow_web_pv_iab_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_iab"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"enabled": false}, "created_at": 1652369620.6587121, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_iab"}], "test.snowplow_web.unique_snowplow_web_pv_ua_parser_page_view_id.21e671a30d": [{"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(enabled=False) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_ua_parser')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_pv_ua_parser_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_pv_ua_parser_page_view_id.21e671a30d", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_pv_ua_parser_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_pv_ua_parser_page_view_id", "alias": "unique_snowplow_web_pv_ua_parser_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_ua_parser"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"enabled": false}, "created_at": 1652369620.66021, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_ua_parser"}], "test.snowplow_web.not_null_snowplow_web_pv_ua_parser_page_view_id.552f7f68af": [{"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=False) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_ua_parser')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_pv_ua_parser_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_pv_ua_parser_page_view_id.552f7f68af", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_pv_ua_parser_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_pv_ua_parser_page_view_id", "alias": "not_null_snowplow_web_pv_ua_parser_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_ua_parser"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"enabled": false}, "created_at": 1652369620.6617222, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_ua_parser"}], "test.snowplow_web.unique_snowplow_web_pv_yauaa_page_view_id.30db82959f": [{"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(enabled=False) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_yauaa')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "unique_snowplow_web_pv_yauaa_page_view_id"], "unique_id": "test.snowplow_web.unique_snowplow_web_pv_yauaa_page_view_id.30db82959f", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "unique_snowplow_web_pv_yauaa_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "unique_snowplow_web_pv_yauaa_page_view_id", "alias": "unique_snowplow_web_pv_yauaa_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_yauaa"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"enabled": false}, "created_at": 1652369620.663381, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_yauaa"}], "test.snowplow_web.not_null_snowplow_web_pv_yauaa_page_view_id.003da133a0": [{"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=False) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "page_view_id", "model": "{{ get_where_subquery(ref('snowplow_web_pv_yauaa')) }}"}, "namespace": null}, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dev1", "schema": "dbt_agnes_dbt_test__audit", "fqn": ["snowplow_web", "page_views", "scratch", "not_null_snowplow_web_pv_yauaa_page_view_id"], "unique_id": "test.snowplow_web.not_null_snowplow_web_pv_yauaa_page_view_id.003da133a0", "package_name": "snowplow_web", "root_path": "/Users/agneskiss/Desktop/Repos/dbt-snowplow-media-player/dbt_packages/snowplow_web", "path": "not_null_snowplow_web_pv_yauaa_page_view_id.sql", "original_file_path": "models/page_views/scratch/page_views_scratch.yml", "name": "not_null_snowplow_web_pv_yauaa_page_view_id", "alias": "not_null_snowplow_web_pv_yauaa_page_view_id", "checksum": {"name": "none", "checksum": ""}, "tags": ["primary-key"], "refs": [["snowplow_web_pv_yauaa"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"enabled": false}, "created_at": 1652369620.664883, "column_name": "page_view_id", "file_key_name": "models.snowplow_web_pv_yauaa"}]}, "parent_map": {"model.snowplow_media_player.snowplow_media_player_base": ["model.snowplow_media_player.snowplow_media_player_base_this_run", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest"], "model.snowplow_media_player.snowplow_media_player_media_stats": ["model.snowplow_media_player.snowplow_media_player_base", "model.snowplow_media_player.snowplow_media_player_base", "model.snowplow_media_player.snowplow_media_player_pivot_base"], "model.snowplow_media_player.snowplow_media_player_plays_by_pageview": ["model.snowplow_media_player.snowplow_media_player_base"], "model.snowplow_media_player.snowplow_media_player_base_this_run": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run", "model.snowplow_media_player.snowplow_media_player_interactions_this_run", "model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "model.snowplow_media_player.snowplow_media_player_pivot_base": [], "model.snowplow_media_player.snowplow_media_player_interactions_this_run": ["model.snowplow_media_player.snowplow_media_player_pivot_base", "model.snowplow_web.snowplow_web_base_events_this_run", "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1", "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1", "source.snowplow_media_player.atomic.com_youtube_youtube_1", "source.snowplow_media_player.atomic.org_whatwg_media_element_1", "source.snowplow_media_player.atomic.org_whatwg_video_element_1"], "model.snowplow_web.snowplow_web_page_views": ["model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest", "model.snowplow_web.snowplow_web_page_views_this_run"], "model.snowplow_web.snowplow_web_pv_scroll_depth": ["model.snowplow_web.snowplow_web_base_events_this_run"], "model.snowplow_web.snowplow_web_pv_engaged_time": ["model.snowplow_web.snowplow_web_base_events_this_run"], "model.snowplow_web.snowplow_web_page_views_this_run": ["model.snowplow_web.snowplow_web_page_view_events", "model.snowplow_web.snowplow_web_pv_engaged_time", "model.snowplow_web.snowplow_web_pv_scroll_depth"], "model.snowplow_web.snowplow_web_pv_limits": ["model.snowplow_web.snowplow_web_base_events_this_run"], "model.snowplow_web.snowplow_web_page_view_events": ["model.snowplow_web.snowplow_web_base_events_this_run"], "model.snowplow_web.snowplow_web_user_mapping": ["model.snowplow_web.snowplow_web_base_events_this_run", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest"], "model.snowplow_web.snowplow_web_sessions": ["model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest", "model.snowplow_web.snowplow_web_sessions_this_run", "model.snowplow_web.snowplow_web_user_mapping"], "model.snowplow_web.snowplow_web_sessions_lasts": ["model.snowplow_web.snowplow_web_page_views_this_run", "model.snowplow_web.snowplow_web_sessions_aggs"], "model.snowplow_web.snowplow_web_sessions_this_run": ["model.snowplow_web.snowplow_web_page_views_this_run", "model.snowplow_web.snowplow_web_sessions_aggs", "model.snowplow_web.snowplow_web_sessions_lasts"], "model.snowplow_web.snowplow_web_sessions_aggs": ["model.snowplow_web.snowplow_web_page_views_this_run"], "model.snowplow_web.snowplow_web_users": ["model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_incremental_manifest", "model.snowplow_web.snowplow_web_users_this_run"], "model.snowplow_web.snowplow_web_users_sessions_this_run": ["model.snowplow_web.snowplow_web_base_sessions_this_run", "model.snowplow_web.snowplow_web_sessions"], "model.snowplow_web.snowplow_web_users_this_run": ["model.snowplow_web.snowplow_web_users_aggs", "model.snowplow_web.snowplow_web_users_lasts", "model.snowplow_web.snowplow_web_users_sessions_this_run"], "model.snowplow_web.snowplow_web_users_aggs": ["model.snowplow_web.snowplow_web_users_sessions_this_run"], "model.snowplow_web.snowplow_web_users_lasts": ["model.snowplow_web.snowplow_web_users_aggs", "model.snowplow_web.snowplow_web_users_sessions_this_run"], "model.snowplow_web.snowplow_web_incremental_manifest": [], "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest": ["model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_base_quarantined_sessions", "model.snowplow_web.snowplow_web_incremental_manifest", "source.snowplow_web.atomic.events"], "model.snowplow_web.snowplow_web_base_quarantined_sessions": [], "model.snowplow_web.snowplow_web_base_new_event_limits": ["model.snowplow_web.snowplow_web_incremental_manifest"], "model.snowplow_web.snowplow_web_base_sessions_this_run": ["model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_base_quarantined_sessions", "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"], "model.snowplow_web.snowplow_web_base_events_this_run": ["model.snowplow_web.snowplow_web_base_sessions_this_run", "model.snowplow_web.snowplow_web_base_sessions_this_run", "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1", "source.snowplow_web.atomic.events"], "test.snowplow_web.snowplow_tests_page_view_in_session_values": ["model.snowplow_web.snowplow_web_page_views"], "operation.snowplow_web.snowplow_web-on-run-start-0": ["model.snowplow_web.snowplow_web_incremental_manifest"], "operation.snowplow_web.snowplow_web-on-run-end-0": ["model.snowplow_web.snowplow_web_base_events_this_run", "model.snowplow_web.snowplow_web_incremental_manifest"], "test.snowplow_media_player.unique_snowplow_media_player_base_play_id.42806fdcfc": ["model.snowplow_media_player.snowplow_media_player_base"], "test.snowplow_media_player.not_null_snowplow_media_player_base_play_id.75c3e8e087": ["model.snowplow_media_player.snowplow_media_player_base"], "test.snowplow_media_player.unique_snowplow_media_player_plays_by_pageview_play_id.f38ea98226": ["model.snowplow_media_player.snowplow_media_player_plays_by_pageview"], "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_pageview_play_id.f9c8ecdb6d": ["model.snowplow_media_player.snowplow_media_player_plays_by_pageview"], "test.snowplow_media_player.unique_snowplow_media_player_media_stats_media_id.02472f49b3": ["model.snowplow_media_player.snowplow_media_player_media_stats"], "test.snowplow_media_player.not_null_snowplow_media_player_media_stats_media_id.4af247e237": ["model.snowplow_media_player.snowplow_media_player_media_stats"], "test.snowplow_media_player.unique_snowplow_media_player_interactions_this_run_event_id.ec39d65876": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "test.snowplow_media_player.not_null_snowplow_media_player_interactions_this_run_event_id.64c07fa266": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "test.snowplow_media_player.unique_snowplow_media_player_base_this_run_play_id.1480904280": ["model.snowplow_media_player.snowplow_media_player_base_this_run"], "test.snowplow_media_player.not_null_snowplow_media_player_base_this_run_play_id.e59aaaef71": ["model.snowplow_media_player.snowplow_media_player_base_this_run"], "test.snowplow_media_player.unique_snowplow_media_player_pivot_base_percent_progress.f340fd7fc8": ["model.snowplow_media_player.snowplow_media_player_pivot_base"], "test.snowplow_media_player.not_null_snowplow_media_player_pivot_base_percent_progress.2c08f44ca8": ["model.snowplow_media_player.snowplow_media_player_pivot_base"], "test.snowplow_media_player.unique_snowplow_media_player_plays_by_session_domain_sessionid.dcd2199aa4": [], "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_session_domain_sessionid.641be5fa6d": [], "test.snowplow_media_player.unique_snowplow_media_player_user_stats_domain_userid.fc18fd22a4": [], "test.snowplow_media_player.not_null_snowplow_media_player_user_stats_domain_userid.c9f3d3c94e": [], "test.snowplow_web.unique_snowplow_web_page_views_page_view_id.d0551e11d8": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_page_view_id.ed9780c9ab": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.unique_snowplow_web_page_views_event_id.874efe18e1": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_event_id.af9403c39f": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_domain_userid.c4dc145a92": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_network_userid.b5bb0baa9b": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionid.d171abf764": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionidx.e2c23f3f73": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_page_view_in_session_index.a624a66afc": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_page_views_in_session.90627e03fd": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_dvce_created_tstamp.f9ef0a90e4": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_collector_tstamp.eebfc2e362": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_derived_tstamp.936b5957b7": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_start_tstamp.f0205359bb": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_end_tstamp.49df31f6f5": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_engaged_time_in_s.3e4b8848b3": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_absolute_time_in_s.b0bdaac0aa": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.not_null_snowplow_web_page_views_page_url.8dddde87ba": ["model.snowplow_web.snowplow_web_page_views"], "test.snowplow_web.unique_snowplow_web_page_views_this_run_page_view_id.265385eac0": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_id.cc0f0d96b3": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.unique_snowplow_web_page_views_this_run_event_id.42096b7aa3": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_event_id.8f03269031": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_userid.77f79e80dd": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_network_userid.9dfe18559d": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionid.8c6f26a143": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionidx.69a8717c74": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_in_session_index.c7826944c8": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_views_in_session.8d647c2332": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.40e528d602": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_collector_tstamp.3382a3c260": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_derived_tstamp.c845283a13": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_start_tstamp.f397976d5e": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_end_tstamp.56229099fe": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_engaged_time_in_s.347bdb2071": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_absolute_time_in_s.54893adc18": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_url.5d2cf56a0b": ["model.snowplow_web.snowplow_web_page_views_this_run"], "test.snowplow_web.unique_snowplow_web_page_view_events_page_view_id.79b1b7c6c9": ["model.snowplow_web.snowplow_web_page_view_events"], "test.snowplow_web.not_null_snowplow_web_page_view_events_page_view_id.c0a6fd5093": ["model.snowplow_web.snowplow_web_page_view_events"], "test.snowplow_web.unique_snowplow_web_pv_engaged_time_page_view_id.ccfb493466": ["model.snowplow_web.snowplow_web_pv_engaged_time"], "test.snowplow_web.not_null_snowplow_web_pv_engaged_time_page_view_id.21b1a00326": ["model.snowplow_web.snowplow_web_pv_engaged_time"], "test.snowplow_web.unique_snowplow_web_pv_scroll_depth_page_view_id.bea0dbc29e": ["model.snowplow_web.snowplow_web_pv_scroll_depth"], "test.snowplow_web.not_null_snowplow_web_pv_scroll_depth_page_view_id.5e70f95d64": ["model.snowplow_web.snowplow_web_pv_scroll_depth"], "test.snowplow_web.unique_snowplow_web_user_mapping_domain_userid.3f9b26384c": ["model.snowplow_web.snowplow_web_user_mapping"], "test.snowplow_web.not_null_snowplow_web_user_mapping_domain_userid.5ce237cee5": ["model.snowplow_web.snowplow_web_user_mapping"], "test.snowplow_web.not_null_snowplow_web_user_mapping_user_id.9002d9e31c": ["model.snowplow_web.snowplow_web_user_mapping"], "test.snowplow_web.not_null_snowplow_web_user_mapping_end_tstamp.e6f41e2335": ["model.snowplow_web.snowplow_web_user_mapping"], "test.snowplow_web.unique_snowplow_web_sessions_domain_sessionid.cc08fe64cd": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionid.77c850bf50": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionidx.4658289a96": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_start_tstamp.46c3284a01": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_end_tstamp.a01aba32a9": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_domain_userid.71f8f1725c": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_network_userid.d8e7074d8d": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_page_views.cadd000967": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_engaged_time_in_s.474d223b0e": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_absolute_time_in_s.f0ab4554bf": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_first_page_url.6f41b28018": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.not_null_snowplow_web_sessions_last_page_url.3d31ff89a0": ["model.snowplow_web.snowplow_web_sessions"], "test.snowplow_web.unique_snowplow_web_sessions_this_run_domain_sessionid.69a930bc20": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionid.e339e9d10c": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionidx.63be165793": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_start_tstamp.124debede7": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_end_tstamp.0863cb9826": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_userid.5edc0e4b52": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_network_userid.68ca052c7b": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_page_views.4c2da8e445": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_engaged_time_in_s.d6cbebbd9d": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_absolute_time_in_s.dee7fcd472": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_first_page_url.1b7eaa462c": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_last_page_url.08695f7040": ["model.snowplow_web.snowplow_web_sessions_this_run"], "test.snowplow_web.unique_snowplow_web_sessions_aggs_domain_sessionid.bd890ff72e": ["model.snowplow_web.snowplow_web_sessions_aggs"], "test.snowplow_web.not_null_snowplow_web_sessions_aggs_domain_sessionid.89fbe02a91": ["model.snowplow_web.snowplow_web_sessions_aggs"], "test.snowplow_web.unique_snowplow_web_sessions_lasts_domain_sessionid.5825bca1f2": ["model.snowplow_web.snowplow_web_sessions_lasts"], "test.snowplow_web.not_null_snowplow_web_sessions_lasts_domain_sessionid.2a80ea96a7": ["model.snowplow_web.snowplow_web_sessions_lasts"], "test.snowplow_web.unique_snowplow_web_users_domain_userid.382879ad4d": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_domain_userid.1ccdf3a506": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_network_userid.4bed7aba0e": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_start_tstamp.27d53ec51b": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_end_tstamp.a557857240": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_page_views.0e04d20dbc": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_sessions.158e1154ee": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_engaged_time_in_s.3cb774c56b": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_first_page_url.04ab06a553": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.not_null_snowplow_web_users_last_page_url.5cc3990f51": ["model.snowplow_web.snowplow_web_users"], "test.snowplow_web.unique_snowplow_web_users_this_run_domain_userid.098d3c27e7": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_domain_userid.2fe7d698b6": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_network_userid.cd5d1e9429": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_start_tstamp.1aa7174fca": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_end_tstamp.e5321dde8b": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_page_views.bdfc6538a5": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_sessions.701f1778bf": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_engaged_time_in_s.ab5559e6a8": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_first_page_url.1742180bd0": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.not_null_snowplow_web_users_this_run_last_page_url.4917b11840": ["model.snowplow_web.snowplow_web_users_this_run"], "test.snowplow_web.unique_snowplow_web_users_aggs_domain_userid.6bf5f8306b": ["model.snowplow_web.snowplow_web_users_aggs"], "test.snowplow_web.not_null_snowplow_web_users_aggs_domain_userid.418de3f818": ["model.snowplow_web.snowplow_web_users_aggs"], "test.snowplow_web.unique_snowplow_web_users_lasts_domain_userid.1c0deae6ac": ["model.snowplow_web.snowplow_web_users_lasts"], "test.snowplow_web.not_null_snowplow_web_users_lasts_domain_userid.5a3966b2e0": ["model.snowplow_web.snowplow_web_users_lasts"], "test.snowplow_web.unique_snowplow_web_users_sessions_this_run_domain_sessionid.dd827f20ca": ["model.snowplow_web.snowplow_web_users_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_users_sessions_this_run_domain_sessionid.a0be268f54": ["model.snowplow_web.snowplow_web_users_sessions_this_run"], "test.snowplow_web.unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.98156c1d39": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"], "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id.319366317f": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"], "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp.19f9724e3e": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"], "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp.de91d8a021": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"], "test.snowplow_web.unique_snowplow_web_incremental_manifest_model.225591dff7": ["model.snowplow_web.snowplow_web_incremental_manifest"], "test.snowplow_web.not_null_snowplow_web_incremental_manifest_model.1abc13aaeb": ["model.snowplow_web.snowplow_web_incremental_manifest"], "test.snowplow_web.unique_snowplow_web_base_quarantined_sessions_session_id.eef9115def": ["model.snowplow_web.snowplow_web_base_quarantined_sessions"], "test.snowplow_web.not_null_snowplow_web_base_quarantined_sessions_session_id.862c7621b8": ["model.snowplow_web.snowplow_web_base_quarantined_sessions"], "test.snowplow_web.unique_snowplow_web_base_sessions_this_run_session_id.daa62a6c5c": ["model.snowplow_web.snowplow_web_base_sessions_this_run"], "test.snowplow_web.not_null_snowplow_web_base_sessions_this_run_session_id.56273da92b": ["model.snowplow_web.snowplow_web_base_sessions_this_run"], "test.snowplow_web.unique_snowplow_web_base_events_this_run_event_id.9ad59b967e": ["model.snowplow_web.snowplow_web_base_events_this_run"], "test.snowplow_web.not_null_snowplow_web_base_events_this_run_event_id.0fc80e3549": ["model.snowplow_web.snowplow_web_base_events_this_run"], "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1": [], "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1": [], "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1": [], "source.snowplow_media_player.atomic.com_youtube_youtube_1": [], "source.snowplow_media_player.atomic.org_whatwg_media_element_1": [], "source.snowplow_media_player.atomic.org_whatwg_video_element_1": [], "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_web_page_1": [], "source.snowplow_web.atomic.com_iab_snowplow_spiders_and_robots_1": [], "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_ua_parser_context_1": [], "source.snowplow_web.atomic.nl_basjes_yauaa_context_1": [], "source.snowplow_web.atomic.events": []}, "child_map": {"model.snowplow_media_player.snowplow_media_player_base": ["model.snowplow_media_player.snowplow_media_player_media_stats", "model.snowplow_media_player.snowplow_media_player_media_stats", "model.snowplow_media_player.snowplow_media_player_plays_by_pageview", "test.snowplow_media_player.not_null_snowplow_media_player_base_play_id.75c3e8e087", "test.snowplow_media_player.unique_snowplow_media_player_base_play_id.42806fdcfc"], "model.snowplow_media_player.snowplow_media_player_media_stats": ["test.snowplow_media_player.not_null_snowplow_media_player_media_stats_media_id.4af247e237", "test.snowplow_media_player.unique_snowplow_media_player_media_stats_media_id.02472f49b3"], "model.snowplow_media_player.snowplow_media_player_plays_by_pageview": ["test.snowplow_media_player.not_null_snowplow_media_player_plays_by_pageview_play_id.f9c8ecdb6d", "test.snowplow_media_player.unique_snowplow_media_player_plays_by_pageview_play_id.f38ea98226"], "model.snowplow_media_player.snowplow_media_player_base_this_run": ["model.snowplow_media_player.snowplow_media_player_base", "test.snowplow_media_player.not_null_snowplow_media_player_base_this_run_play_id.e59aaaef71", "test.snowplow_media_player.unique_snowplow_media_player_base_this_run_play_id.1480904280"], "model.snowplow_media_player.snowplow_media_player_pivot_base": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run", "model.snowplow_media_player.snowplow_media_player_media_stats", "test.snowplow_media_player.not_null_snowplow_media_player_pivot_base_percent_progress.2c08f44ca8", "test.snowplow_media_player.unique_snowplow_media_player_pivot_base_percent_progress.f340fd7fc8"], "model.snowplow_media_player.snowplow_media_player_interactions_this_run": ["model.snowplow_media_player.snowplow_media_player_base_this_run", "model.snowplow_media_player.snowplow_media_player_base_this_run", "model.snowplow_media_player.snowplow_media_player_base_this_run", "test.snowplow_media_player.not_null_snowplow_media_player_interactions_this_run_event_id.64c07fa266", "test.snowplow_media_player.unique_snowplow_media_player_interactions_this_run_event_id.ec39d65876"], "model.snowplow_web.snowplow_web_page_views": ["test.snowplow_web.not_null_snowplow_web_page_views_absolute_time_in_s.b0bdaac0aa", "test.snowplow_web.not_null_snowplow_web_page_views_collector_tstamp.eebfc2e362", "test.snowplow_web.not_null_snowplow_web_page_views_derived_tstamp.936b5957b7", "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionid.d171abf764", "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionidx.e2c23f3f73", "test.snowplow_web.not_null_snowplow_web_page_views_domain_userid.c4dc145a92", "test.snowplow_web.not_null_snowplow_web_page_views_dvce_created_tstamp.f9ef0a90e4", "test.snowplow_web.not_null_snowplow_web_page_views_end_tstamp.49df31f6f5", "test.snowplow_web.not_null_snowplow_web_page_views_engaged_time_in_s.3e4b8848b3", "test.snowplow_web.not_null_snowplow_web_page_views_event_id.af9403c39f", "test.snowplow_web.not_null_snowplow_web_page_views_network_userid.b5bb0baa9b", "test.snowplow_web.not_null_snowplow_web_page_views_page_url.8dddde87ba", "test.snowplow_web.not_null_snowplow_web_page_views_page_view_id.ed9780c9ab", "test.snowplow_web.not_null_snowplow_web_page_views_page_view_in_session_index.a624a66afc", "test.snowplow_web.not_null_snowplow_web_page_views_page_views_in_session.90627e03fd", "test.snowplow_web.not_null_snowplow_web_page_views_start_tstamp.f0205359bb", "test.snowplow_web.snowplow_tests_page_view_in_session_values", "test.snowplow_web.unique_snowplow_web_page_views_event_id.874efe18e1", "test.snowplow_web.unique_snowplow_web_page_views_page_view_id.d0551e11d8"], "model.snowplow_web.snowplow_web_pv_scroll_depth": ["model.snowplow_web.snowplow_web_page_views_this_run", "test.snowplow_web.not_null_snowplow_web_pv_scroll_depth_page_view_id.5e70f95d64", "test.snowplow_web.unique_snowplow_web_pv_scroll_depth_page_view_id.bea0dbc29e"], "model.snowplow_web.snowplow_web_pv_engaged_time": ["model.snowplow_web.snowplow_web_page_views_this_run", "test.snowplow_web.not_null_snowplow_web_pv_engaged_time_page_view_id.21b1a00326", "test.snowplow_web.unique_snowplow_web_pv_engaged_time_page_view_id.ccfb493466"], "model.snowplow_web.snowplow_web_page_views_this_run": ["model.snowplow_web.snowplow_web_page_views", "model.snowplow_web.snowplow_web_sessions_aggs", "model.snowplow_web.snowplow_web_sessions_lasts", "model.snowplow_web.snowplow_web_sessions_this_run", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_absolute_time_in_s.54893adc18", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_collector_tstamp.3382a3c260", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_derived_tstamp.c845283a13", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionid.8c6f26a143", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionidx.69a8717c74", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_userid.77f79e80dd", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.40e528d602", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_end_tstamp.56229099fe", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_engaged_time_in_s.347bdb2071", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_event_id.8f03269031", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_network_userid.9dfe18559d", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_url.5d2cf56a0b", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_id.cc0f0d96b3", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_in_session_index.c7826944c8", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_views_in_session.8d647c2332", "test.snowplow_web.not_null_snowplow_web_page_views_this_run_start_tstamp.f397976d5e", "test.snowplow_web.unique_snowplow_web_page_views_this_run_event_id.42096b7aa3", "test.snowplow_web.unique_snowplow_web_page_views_this_run_page_view_id.265385eac0"], "model.snowplow_web.snowplow_web_pv_limits": [], "model.snowplow_web.snowplow_web_page_view_events": ["model.snowplow_web.snowplow_web_page_views_this_run", "test.snowplow_web.not_null_snowplow_web_page_view_events_page_view_id.c0a6fd5093", "test.snowplow_web.unique_snowplow_web_page_view_events_page_view_id.79b1b7c6c9"], "model.snowplow_web.snowplow_web_user_mapping": ["model.snowplow_web.snowplow_web_sessions", "test.snowplow_web.not_null_snowplow_web_user_mapping_domain_userid.5ce237cee5", "test.snowplow_web.not_null_snowplow_web_user_mapping_end_tstamp.e6f41e2335", "test.snowplow_web.not_null_snowplow_web_user_mapping_user_id.9002d9e31c", "test.snowplow_web.unique_snowplow_web_user_mapping_domain_userid.3f9b26384c"], "model.snowplow_web.snowplow_web_sessions": ["model.snowplow_web.snowplow_web_users_sessions_this_run", "test.snowplow_web.not_null_snowplow_web_sessions_absolute_time_in_s.f0ab4554bf", "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionid.77c850bf50", "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionidx.4658289a96", "test.snowplow_web.not_null_snowplow_web_sessions_domain_userid.71f8f1725c", "test.snowplow_web.not_null_snowplow_web_sessions_end_tstamp.a01aba32a9", "test.snowplow_web.not_null_snowplow_web_sessions_engaged_time_in_s.474d223b0e", "test.snowplow_web.not_null_snowplow_web_sessions_first_page_url.6f41b28018", "test.snowplow_web.not_null_snowplow_web_sessions_last_page_url.3d31ff89a0", "test.snowplow_web.not_null_snowplow_web_sessions_network_userid.d8e7074d8d", "test.snowplow_web.not_null_snowplow_web_sessions_page_views.cadd000967", "test.snowplow_web.not_null_snowplow_web_sessions_start_tstamp.46c3284a01", "test.snowplow_web.unique_snowplow_web_sessions_domain_sessionid.cc08fe64cd"], "model.snowplow_web.snowplow_web_sessions_lasts": ["model.snowplow_web.snowplow_web_sessions_this_run", "test.snowplow_web.not_null_snowplow_web_sessions_lasts_domain_sessionid.2a80ea96a7", "test.snowplow_web.unique_snowplow_web_sessions_lasts_domain_sessionid.5825bca1f2"], "model.snowplow_web.snowplow_web_sessions_this_run": ["model.snowplow_web.snowplow_web_sessions", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_absolute_time_in_s.dee7fcd472", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionid.e339e9d10c", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionidx.63be165793", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_userid.5edc0e4b52", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_end_tstamp.0863cb9826", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_engaged_time_in_s.d6cbebbd9d", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_first_page_url.1b7eaa462c", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_last_page_url.08695f7040", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_network_userid.68ca052c7b", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_page_views.4c2da8e445", "test.snowplow_web.not_null_snowplow_web_sessions_this_run_start_tstamp.124debede7", "test.snowplow_web.unique_snowplow_web_sessions_this_run_domain_sessionid.69a930bc20"], "model.snowplow_web.snowplow_web_sessions_aggs": ["model.snowplow_web.snowplow_web_sessions_lasts", "model.snowplow_web.snowplow_web_sessions_this_run", "test.snowplow_web.not_null_snowplow_web_sessions_aggs_domain_sessionid.89fbe02a91", "test.snowplow_web.unique_snowplow_web_sessions_aggs_domain_sessionid.bd890ff72e"], "model.snowplow_web.snowplow_web_users": ["test.snowplow_web.not_null_snowplow_web_users_domain_userid.1ccdf3a506", "test.snowplow_web.not_null_snowplow_web_users_end_tstamp.a557857240", "test.snowplow_web.not_null_snowplow_web_users_engaged_time_in_s.3cb774c56b", "test.snowplow_web.not_null_snowplow_web_users_first_page_url.04ab06a553", "test.snowplow_web.not_null_snowplow_web_users_last_page_url.5cc3990f51", "test.snowplow_web.not_null_snowplow_web_users_network_userid.4bed7aba0e", "test.snowplow_web.not_null_snowplow_web_users_page_views.0e04d20dbc", "test.snowplow_web.not_null_snowplow_web_users_sessions.158e1154ee", "test.snowplow_web.not_null_snowplow_web_users_start_tstamp.27d53ec51b", "test.snowplow_web.unique_snowplow_web_users_domain_userid.382879ad4d"], "model.snowplow_web.snowplow_web_users_sessions_this_run": ["model.snowplow_web.snowplow_web_users_aggs", "model.snowplow_web.snowplow_web_users_lasts", "model.snowplow_web.snowplow_web_users_this_run", "test.snowplow_web.not_null_snowplow_web_users_sessions_this_run_domain_sessionid.a0be268f54", "test.snowplow_web.unique_snowplow_web_users_sessions_this_run_domain_sessionid.dd827f20ca"], "model.snowplow_web.snowplow_web_users_this_run": ["model.snowplow_web.snowplow_web_users", "test.snowplow_web.not_null_snowplow_web_users_this_run_domain_userid.2fe7d698b6", "test.snowplow_web.not_null_snowplow_web_users_this_run_end_tstamp.e5321dde8b", "test.snowplow_web.not_null_snowplow_web_users_this_run_engaged_time_in_s.ab5559e6a8", "test.snowplow_web.not_null_snowplow_web_users_this_run_first_page_url.1742180bd0", "test.snowplow_web.not_null_snowplow_web_users_this_run_last_page_url.4917b11840", "test.snowplow_web.not_null_snowplow_web_users_this_run_network_userid.cd5d1e9429", "test.snowplow_web.not_null_snowplow_web_users_this_run_page_views.bdfc6538a5", "test.snowplow_web.not_null_snowplow_web_users_this_run_sessions.701f1778bf", "test.snowplow_web.not_null_snowplow_web_users_this_run_start_tstamp.1aa7174fca", "test.snowplow_web.unique_snowplow_web_users_this_run_domain_userid.098d3c27e7"], "model.snowplow_web.snowplow_web_users_aggs": ["model.snowplow_web.snowplow_web_users_lasts", "model.snowplow_web.snowplow_web_users_this_run", "test.snowplow_web.not_null_snowplow_web_users_aggs_domain_userid.418de3f818", "test.snowplow_web.unique_snowplow_web_users_aggs_domain_userid.6bf5f8306b"], "model.snowplow_web.snowplow_web_users_lasts": ["model.snowplow_web.snowplow_web_users_this_run", "test.snowplow_web.not_null_snowplow_web_users_lasts_domain_userid.5a3966b2e0", "test.snowplow_web.unique_snowplow_web_users_lasts_domain_userid.1c0deae6ac"], "model.snowplow_web.snowplow_web_incremental_manifest": ["model.snowplow_media_player.snowplow_media_player_base", "model.snowplow_web.snowplow_web_base_new_event_limits", "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest", "model.snowplow_web.snowplow_web_page_views", "model.snowplow_web.snowplow_web_sessions", "model.snowplow_web.snowplow_web_user_mapping", "model.snowplow_web.snowplow_web_users", "operation.snowplow_web.snowplow_web-on-run-end-0", "operation.snowplow_web.snowplow_web-on-run-start-0", "test.snowplow_web.not_null_snowplow_web_incremental_manifest_model.1abc13aaeb", "test.snowplow_web.unique_snowplow_web_incremental_manifest_model.225591dff7"], "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest": ["model.snowplow_web.snowplow_web_base_sessions_this_run", "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp.de91d8a021", "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id.319366317f", "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp.19f9724e3e", "test.snowplow_web.unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.98156c1d39"], "model.snowplow_web.snowplow_web_base_quarantined_sessions": ["model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest", "model.snowplow_web.snowplow_web_base_sessions_this_run", "test.snowplow_web.not_null_snowplow_web_base_quarantined_sessions_session_id.862c7621b8", "test.snowplow_web.unique_snowplow_web_base_quarantined_sessions_session_id.eef9115def"], "model.snowplow_web.snowplow_web_base_new_event_limits": ["model.snowplow_media_player.snowplow_media_player_base", "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest", "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest", "model.snowplow_web.snowplow_web_base_sessions_this_run", "model.snowplow_web.snowplow_web_page_views", "model.snowplow_web.snowplow_web_sessions", "model.snowplow_web.snowplow_web_user_mapping", "model.snowplow_web.snowplow_web_users"], "model.snowplow_web.snowplow_web_base_sessions_this_run": ["model.snowplow_web.snowplow_web_base_events_this_run", "model.snowplow_web.snowplow_web_base_events_this_run", "model.snowplow_web.snowplow_web_users_sessions_this_run", "test.snowplow_web.not_null_snowplow_web_base_sessions_this_run_session_id.56273da92b", "test.snowplow_web.unique_snowplow_web_base_sessions_this_run_session_id.daa62a6c5c"], "model.snowplow_web.snowplow_web_base_events_this_run": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run", "model.snowplow_web.snowplow_web_page_view_events", "model.snowplow_web.snowplow_web_pv_engaged_time", "model.snowplow_web.snowplow_web_pv_limits", "model.snowplow_web.snowplow_web_pv_scroll_depth", "model.snowplow_web.snowplow_web_user_mapping", "operation.snowplow_web.snowplow_web-on-run-end-0", "test.snowplow_web.not_null_snowplow_web_base_events_this_run_event_id.0fc80e3549", "test.snowplow_web.unique_snowplow_web_base_events_this_run_event_id.9ad59b967e"], "test.snowplow_web.snowplow_tests_page_view_in_session_values": [], "operation.snowplow_web.snowplow_web-on-run-start-0": [], "operation.snowplow_web.snowplow_web-on-run-end-0": [], "test.snowplow_media_player.unique_snowplow_media_player_base_play_id.42806fdcfc": [], "test.snowplow_media_player.not_null_snowplow_media_player_base_play_id.75c3e8e087": [], "test.snowplow_media_player.unique_snowplow_media_player_plays_by_pageview_play_id.f38ea98226": [], "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_pageview_play_id.f9c8ecdb6d": [], "test.snowplow_media_player.unique_snowplow_media_player_media_stats_media_id.02472f49b3": [], "test.snowplow_media_player.not_null_snowplow_media_player_media_stats_media_id.4af247e237": [], "test.snowplow_media_player.unique_snowplow_media_player_interactions_this_run_event_id.ec39d65876": [], "test.snowplow_media_player.not_null_snowplow_media_player_interactions_this_run_event_id.64c07fa266": [], "test.snowplow_media_player.unique_snowplow_media_player_base_this_run_play_id.1480904280": [], "test.snowplow_media_player.not_null_snowplow_media_player_base_this_run_play_id.e59aaaef71": [], "test.snowplow_media_player.unique_snowplow_media_player_pivot_base_percent_progress.f340fd7fc8": [], "test.snowplow_media_player.not_null_snowplow_media_player_pivot_base_percent_progress.2c08f44ca8": [], "test.snowplow_media_player.unique_snowplow_media_player_plays_by_session_domain_sessionid.dcd2199aa4": [], "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_session_domain_sessionid.641be5fa6d": [], "test.snowplow_media_player.unique_snowplow_media_player_user_stats_domain_userid.fc18fd22a4": [], "test.snowplow_media_player.not_null_snowplow_media_player_user_stats_domain_userid.c9f3d3c94e": [], "test.snowplow_web.unique_snowplow_web_page_views_page_view_id.d0551e11d8": [], "test.snowplow_web.not_null_snowplow_web_page_views_page_view_id.ed9780c9ab": [], "test.snowplow_web.unique_snowplow_web_page_views_event_id.874efe18e1": [], "test.snowplow_web.not_null_snowplow_web_page_views_event_id.af9403c39f": [], "test.snowplow_web.not_null_snowplow_web_page_views_domain_userid.c4dc145a92": [], "test.snowplow_web.not_null_snowplow_web_page_views_network_userid.b5bb0baa9b": [], "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionid.d171abf764": [], "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionidx.e2c23f3f73": [], "test.snowplow_web.not_null_snowplow_web_page_views_page_view_in_session_index.a624a66afc": [], "test.snowplow_web.not_null_snowplow_web_page_views_page_views_in_session.90627e03fd": [], "test.snowplow_web.not_null_snowplow_web_page_views_dvce_created_tstamp.f9ef0a90e4": [], "test.snowplow_web.not_null_snowplow_web_page_views_collector_tstamp.eebfc2e362": [], "test.snowplow_web.not_null_snowplow_web_page_views_derived_tstamp.936b5957b7": [], "test.snowplow_web.not_null_snowplow_web_page_views_start_tstamp.f0205359bb": [], "test.snowplow_web.not_null_snowplow_web_page_views_end_tstamp.49df31f6f5": [], "test.snowplow_web.not_null_snowplow_web_page_views_engaged_time_in_s.3e4b8848b3": [], "test.snowplow_web.not_null_snowplow_web_page_views_absolute_time_in_s.b0bdaac0aa": [], "test.snowplow_web.not_null_snowplow_web_page_views_page_url.8dddde87ba": [], "test.snowplow_web.unique_snowplow_web_page_views_this_run_page_view_id.265385eac0": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_id.cc0f0d96b3": [], "test.snowplow_web.unique_snowplow_web_page_views_this_run_event_id.42096b7aa3": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_event_id.8f03269031": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_userid.77f79e80dd": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_network_userid.9dfe18559d": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionid.8c6f26a143": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionidx.69a8717c74": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_in_session_index.c7826944c8": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_views_in_session.8d647c2332": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.40e528d602": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_collector_tstamp.3382a3c260": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_derived_tstamp.c845283a13": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_start_tstamp.f397976d5e": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_end_tstamp.56229099fe": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_engaged_time_in_s.347bdb2071": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_absolute_time_in_s.54893adc18": [], "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_url.5d2cf56a0b": [], "test.snowplow_web.unique_snowplow_web_page_view_events_page_view_id.79b1b7c6c9": [], "test.snowplow_web.not_null_snowplow_web_page_view_events_page_view_id.c0a6fd5093": [], "test.snowplow_web.unique_snowplow_web_pv_engaged_time_page_view_id.ccfb493466": [], "test.snowplow_web.not_null_snowplow_web_pv_engaged_time_page_view_id.21b1a00326": [], "test.snowplow_web.unique_snowplow_web_pv_scroll_depth_page_view_id.bea0dbc29e": [], "test.snowplow_web.not_null_snowplow_web_pv_scroll_depth_page_view_id.5e70f95d64": [], "test.snowplow_web.unique_snowplow_web_user_mapping_domain_userid.3f9b26384c": [], "test.snowplow_web.not_null_snowplow_web_user_mapping_domain_userid.5ce237cee5": [], "test.snowplow_web.not_null_snowplow_web_user_mapping_user_id.9002d9e31c": [], "test.snowplow_web.not_null_snowplow_web_user_mapping_end_tstamp.e6f41e2335": [], "test.snowplow_web.unique_snowplow_web_sessions_domain_sessionid.cc08fe64cd": [], "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionid.77c850bf50": [], "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionidx.4658289a96": [], "test.snowplow_web.not_null_snowplow_web_sessions_start_tstamp.46c3284a01": [], "test.snowplow_web.not_null_snowplow_web_sessions_end_tstamp.a01aba32a9": [], "test.snowplow_web.not_null_snowplow_web_sessions_domain_userid.71f8f1725c": [], "test.snowplow_web.not_null_snowplow_web_sessions_network_userid.d8e7074d8d": [], "test.snowplow_web.not_null_snowplow_web_sessions_page_views.cadd000967": [], "test.snowplow_web.not_null_snowplow_web_sessions_engaged_time_in_s.474d223b0e": [], "test.snowplow_web.not_null_snowplow_web_sessions_absolute_time_in_s.f0ab4554bf": [], "test.snowplow_web.not_null_snowplow_web_sessions_first_page_url.6f41b28018": [], "test.snowplow_web.not_null_snowplow_web_sessions_last_page_url.3d31ff89a0": [], "test.snowplow_web.unique_snowplow_web_sessions_this_run_domain_sessionid.69a930bc20": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionid.e339e9d10c": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionidx.63be165793": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_start_tstamp.124debede7": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_end_tstamp.0863cb9826": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_userid.5edc0e4b52": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_network_userid.68ca052c7b": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_page_views.4c2da8e445": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_engaged_time_in_s.d6cbebbd9d": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_absolute_time_in_s.dee7fcd472": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_first_page_url.1b7eaa462c": [], "test.snowplow_web.not_null_snowplow_web_sessions_this_run_last_page_url.08695f7040": [], "test.snowplow_web.unique_snowplow_web_sessions_aggs_domain_sessionid.bd890ff72e": [], "test.snowplow_web.not_null_snowplow_web_sessions_aggs_domain_sessionid.89fbe02a91": [], "test.snowplow_web.unique_snowplow_web_sessions_lasts_domain_sessionid.5825bca1f2": [], "test.snowplow_web.not_null_snowplow_web_sessions_lasts_domain_sessionid.2a80ea96a7": [], "test.snowplow_web.unique_snowplow_web_users_domain_userid.382879ad4d": [], "test.snowplow_web.not_null_snowplow_web_users_domain_userid.1ccdf3a506": [], "test.snowplow_web.not_null_snowplow_web_users_network_userid.4bed7aba0e": [], "test.snowplow_web.not_null_snowplow_web_users_start_tstamp.27d53ec51b": [], "test.snowplow_web.not_null_snowplow_web_users_end_tstamp.a557857240": [], "test.snowplow_web.not_null_snowplow_web_users_page_views.0e04d20dbc": [], "test.snowplow_web.not_null_snowplow_web_users_sessions.158e1154ee": [], "test.snowplow_web.not_null_snowplow_web_users_engaged_time_in_s.3cb774c56b": [], "test.snowplow_web.not_null_snowplow_web_users_first_page_url.04ab06a553": [], "test.snowplow_web.not_null_snowplow_web_users_last_page_url.5cc3990f51": [], "test.snowplow_web.unique_snowplow_web_users_this_run_domain_userid.098d3c27e7": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_domain_userid.2fe7d698b6": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_network_userid.cd5d1e9429": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_start_tstamp.1aa7174fca": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_end_tstamp.e5321dde8b": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_page_views.bdfc6538a5": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_sessions.701f1778bf": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_engaged_time_in_s.ab5559e6a8": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_first_page_url.1742180bd0": [], "test.snowplow_web.not_null_snowplow_web_users_this_run_last_page_url.4917b11840": [], "test.snowplow_web.unique_snowplow_web_users_aggs_domain_userid.6bf5f8306b": [], "test.snowplow_web.not_null_snowplow_web_users_aggs_domain_userid.418de3f818": [], "test.snowplow_web.unique_snowplow_web_users_lasts_domain_userid.1c0deae6ac": [], "test.snowplow_web.not_null_snowplow_web_users_lasts_domain_userid.5a3966b2e0": [], "test.snowplow_web.unique_snowplow_web_users_sessions_this_run_domain_sessionid.dd827f20ca": [], "test.snowplow_web.not_null_snowplow_web_users_sessions_this_run_domain_sessionid.a0be268f54": [], "test.snowplow_web.unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.98156c1d39": [], "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id.319366317f": [], "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp.19f9724e3e": [], "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp.de91d8a021": [], "test.snowplow_web.unique_snowplow_web_incremental_manifest_model.225591dff7": [], "test.snowplow_web.not_null_snowplow_web_incremental_manifest_model.1abc13aaeb": [], "test.snowplow_web.unique_snowplow_web_base_quarantined_sessions_session_id.eef9115def": [], "test.snowplow_web.not_null_snowplow_web_base_quarantined_sessions_session_id.862c7621b8": [], "test.snowplow_web.unique_snowplow_web_base_sessions_this_run_session_id.daa62a6c5c": [], "test.snowplow_web.not_null_snowplow_web_base_sessions_this_run_session_id.56273da92b": [], "test.snowplow_web.unique_snowplow_web_base_events_this_run_event_id.9ad59b967e": [], "test.snowplow_web.not_null_snowplow_web_base_events_this_run_event_id.0fc80e3549": [], "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_web_page_1": ["model.snowplow_web.snowplow_web_base_events_this_run"], "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_event_1": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "source.snowplow_media_player.atomic.com_snowplowanalytics_snowplow_media_player_1": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "source.snowplow_media_player.atomic.com_youtube_youtube_1": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "source.snowplow_media_player.atomic.org_whatwg_media_element_1": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "source.snowplow_media_player.atomic.org_whatwg_video_element_1": ["model.snowplow_media_player.snowplow_media_player_interactions_this_run"], "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_web_page_1": [], "source.snowplow_web.atomic.com_iab_snowplow_spiders_and_robots_1": [], "source.snowplow_web.atomic.com_snowplowanalytics_snowplow_ua_parser_context_1": [], "source.snowplow_web.atomic.nl_basjes_yauaa_context_1": [], "source.snowplow_web.atomic.events": ["model.snowplow_web.snowplow_web_base_events_this_run", "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"]}} diff --git a/docs/markdown/snowplow_media_player_atomic_docs.md b/docs/markdown/snowplow_media_player_atomic_docs.md new file mode 100644 index 0000000..b329e42 --- /dev/null +++ b/docs/markdown/snowplow_media_player_atomic_docs.md @@ -0,0 +1,23 @@ +{% docs table_page_view_context %} +This context table contains the `page_view_id` associated with an event. +{% enddocs %} + +{% docs table_media_player_event %} +The table specifying the media player event type (e.g. playing, seek) and the label given for the media for user friendly identification. +{% enddocs %} + +{% docs table_media_player_context %} +This context table contains a set of entities that are common between media events across platforms. +{% enddocs %} + +{% docs table_youtube_context %} +The context table with data specific to embedded YouTube videos. +{% enddocs %} + +{% docs table_html_media_element_context %} +This context table contains the entities related to the HTML5 Media Element, adapted from the whatwg spec. +{% enddocs %} + +{% docs table_html_video_element_context %} +This context table contains the entities related to the HTML5 Video Element, adapted from the whatwg spec. +{% enddocs %} diff --git a/docs/markdown/snowplow_media_player_common_cols.md b/docs/markdown/snowplow_media_player_common_cols.md new file mode 100644 index 0000000..7d7762e --- /dev/null +++ b/docs/markdown/snowplow_media_player_common_cols.md @@ -0,0 +1,255 @@ +{% docs col_event_id %} +A UUID for each event e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`. +{% enddocs %} + +{% docs col_media_id %} +The unique identifier of a specific media element. It is the `player_id` in case of YouTube and `html_id` in case of HTML5. +{% enddocs %} + +{% docs col_play_id %} +The surrogate key generated from `page_view_id` and `media_id `to create a unique play event identifier. +{% enddocs %} + +{% docs col_page_view_id %} +A UUID for each page view e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`. +{% enddocs %} + +{% docs col_domain_sessionid %} +A visit / session UUID e.g. `c6ef3124-b53a-4b13-a233-0088f79dcbcb`. +{% enddocs %} + +{% docs col_domain_userid %} +User ID set by Snowplow using 1st party cookie e.g. `bc2e92ec6c204a14`. +{% enddocs %} + +{% docs col_event_type %} +The type of event generated by the media player. e.g. 'ended', 'paused', 'playing'. +{% enddocs %} + +{% docs col_media_type %} +The type of media content: video or audio. +{% enddocs %} + +{% docs col_media_player_type %} +The combination of schema_name and schema_vendor coming from the specific media player context e.g. com.youtube-youtube, org.whatwg-media_element. +{% enddocs %} + +{% docs col_page_referrer %} +URL of the referrer e.g. `http://www.referrer.com`. +{% enddocs %} + +{% docs col_page_url %} +The page URL e.g. `http://www.example.com`. +{% enddocs %} + +{% docs col_source_url %} +The url which shows the source of the media content. For YouTube it is the `url` context field, for HTML5 it is the `source_url` field. +{% enddocs %} + +{% docs col_geo_region_name %} +Visitor region name e.g. `Florida`. +{% enddocs %} + +{% docs col_br_name %} +Browser name e.g. `Firefox 12`. +{% enddocs %} + +{% docs col_dvce_type %} +Type of device e.g. `Computer`. +{% enddocs %} + +{% docs col_os_name %} +Name of operating system e.g. `Android`. +{% enddocs %} + +{% docs col_os_timezone %} +Client operating system timezone e.g. `Europe/London`. +{% enddocs %} + +{% docs col_duration %} +Total length of media in seconds e.g. it's a 5:32 youtube video so the duration is 332 seconds. +{% enddocs %} + +{% docs col_playback_rate %} +Playback rate (1 is normal speed). +{% enddocs %} + +{% docs col_playback_quality %} +Depending on the player it is either the playback quality field or the resolution. +{% enddocs %} + +{% docs col_percent_progress %} +The percent of the way through the media. It is based on either the percentprogress event that is fired at specific intervalls as defined during the tracker setup or the 'ended' event, which is equivalent to reaching 100% of the media's total duration (length). e.g. 25, meaning the user passed the 25% mark during play. It does not mean the user watched all the content in between two percentprogress marks, unless there is no seek events happening within the same page_view (`snowplow_media_player_base`). +{% enddocs %} + +{% docs col_percent_progress_reached %} +An array of percent progresses reached by the user while playing the media. In case the same percentprogress event was fired during the same page_view (e.g. due to seeks to rewatch part of the video) the % is added to the array again. e.g. in case of percent_progress_reached = [10, 25, 25, 50, 75] the user replayed part of the media so that the percentprogress event fired twice at the 25% mark. +{% enddocs %} + +{% docs col_is_muted %} +If the media is muted during the event that is fired. +{% enddocs %} + +{% docs col_start_tstamp %} +The `derived_tstamp` denoting the time when the event started. +{% enddocs %} + +{% docs col_end_tstamp %} +The `derived_tstamp` denoting the time when the last media player event belonging to the specific level of aggregation (e.g.: page_view by media) started. +{% enddocs %} + +{% docs col_play_time_sec %} +Estimated duration of play in seconds. It is calculated using the percent_progress events that are fired during play. In case such an event is fired, it is assumed that the total section of the media in between the previous and current percent_progress is played through, even if the user seeks to another point in time within the audio / video. The more often these events are tracked (e.g. every 5% of the media's length) the more accurate the calculation becomes. +{% enddocs %} + +{% docs col_avg_play_time_min %} +Estimated average duration of plays in minutes. +{% enddocs %} + +{% docs col_avg_play_time_sec %} +Estimated average duration of plays in seconds. +{% enddocs %} + +{% docs col_first_play %} +The `derived_tstamp` of the beginning of the first play of a media element. +{% enddocs %} + +{% docs col_last_play %} +The `derived_tstamp` of the beginning of the last play of a media element. +{% enddocs %} + +{% docs col_valid_plays %} +The sum of all media plays that exceeds the minimum media length set within the variable `snowplow__valid_play_sec`, it is defaulted to 30 (seconds). +{% enddocs %} + +{% docs col_impressions %} +The number of pageviews where a media content was rendered regardless of whether the media was actually played or not. +{% enddocs %} + +{% docs col_avg_playback_rate %} +Average playback rate (1 is normal speed). +{% enddocs %} + +{% docs col_play_rate %} +Total plays divided by impressions. Please note that as the base for media plays is pageview / media_id, in case the same video is played multiple times within the same pageview, it will still count as one play. +{% enddocs %} + +{% docs col_complete_plays %} +The number of plays where the total percentage played is bigger than or equal to the `snowplow__complete_play_rate`. Default is 0.99, meaning that 99% of the video being watched constitutes a complete play. +{% enddocs %} + +{% docs col_completion_rate_by_plays %} +The number of complete plays divided by the number of pageviews with plays of any duration. +{% enddocs %} + +{% docs col_retention_rate %} +The maximum percent progress reached before any seek event. +{% enddocs %} + +{% docs col_avg_percent_played %} +Average of total play_time divided by the media duration. +{% enddocs %} + +{% docs col__percent_reached %} +Field(s) calculated based on the `snowplow_mp_percent_progress` list, which shows how many times a certain percent progress has been reached. Please note that `100_percent_reached` = 1 does not necessarily mean that one user has played the media fully, but that there was either an 'ended' event or a 'percentprogress' event with a value of 100 and the user could still have seeked just before the end. If the same user replays part of the media during the same page_view, it will be counted in the total number. +{% enddocs %} + +{% docs col_derived_tstamp %} +Timestamp making allowance for inaccurate device clock e.g. `2013-11-26 00:02:04`. +{% enddocs %} + +{% docs col_collector_tstamp %} +Time stamp for the event recorded by the collector e.g. `2013-11-26 00:02:05`. +{% enddocs %} + +{% docs col_weight_rate %} +The weight given for each percent progress reached used for the calculation of the play_time_sec_estimated field. It is based on the difference of the current and preciding percent_progress rate. +{% enddocs %} + +{% docs col_play_time_sec_muted %} +Calculated duration of muted play in seconds. It is based on the percent_progress event and whether the user played it on mute during this event or not. +{% enddocs %} + +{% docs col_is_played %} +Pageviews with at least one play event. +{% enddocs %} + +{% docs col_is_valid_play %} +A boolean value to show whether the duration of the play (`play_time_sec`) is bigger than or equal to the variable given in `snowplow__valid_play_sec` (defaulted to 30). +{% enddocs %} + +{% docs col_is_complete_play %} +A boolean value to show whether the total percentage played is bigger than or equal to the `snowplow__complete_play_rate` (defaulted to 0.99). +{% enddocs %} + +{% docs col_seeks %} +The count of seek events within a certain aggregation level. The seek event occurs when a user moves/skips to a new position in the media content. +{% enddocs %} + +{% docs col_videos_played %} +The distinct number of videos that were played during a session. +{% enddocs %} + +{% docs col_audio_played %} +The distinct number of audio files that were played during a session. +{% enddocs %} + +{% docs col_valid_video_plays %} +The sum of all video plays that exceed the limit set within the variable `snowplow__valid_play_sec`, it is defaulted to 30 seconds. +{% enddocs %} + +{% docs col_valid_audio_plays %} +The sum of all audio plays that exceeded the limit set within the variable `snowplow__valid_play_sec`, it is defaulted to 30 seconds. +{% enddocs %} + +{% docs col_play_time_min %} +Calculated duration of play in minutes. +{% enddocs %} + +{% docs col_play_time_min_muted %} +Calculated duration of muted play in minutes. It is based on the percent_progress event and whether the user played it on mute during this event or not. +{% enddocs %} + +{% docs col_avg_retention_rate %} +The average percent progress reached that is played before any seek event. +{% enddocs %} + +{% docs col_plays %} +The number of pageviews with plays of any duration. +{% enddocs %} + +{% docs col_video_plays %} +The number of pageviews with video plays of any duration. +{% enddocs %} + +{% docs col_audio_plays %} +The number of pageviews with audio plays of any duration. +{% enddocs %} + +{% docs col_last_base_tstamp %} +The start_tstamp of the last processed page_view across all media_ids to be used as a lower limit for subsequent incremental runs. +{% enddocs %} + +{% docs col_player_current_time %} +The playback position of a specific media in seconds whenever a media player event is fired. Could be used in custom models for more detailed analytics or play time calculations. +{% enddocs %} + +{% docs col_media_label %} +The optional, human readable name given to tracked media content. +{% enddocs %} + +{% docs col_avg_session_play_time_min %} +Estimated average duration of plays in seconds within a session. +{% enddocs %} + +{% docs col_is_live %} +If the media is live. +{% enddocs %} + +{% docs col_loop %} +If the video should restart after ending. +{% enddocs %} + +{% docs col_volume %} +Volume percent. +{% enddocs %} diff --git a/docs/markdown/snowplow_media_player_model_docs.md b/docs/markdown/snowplow_media_player_model_docs.md new file mode 100644 index 0000000..f786678 --- /dev/null +++ b/docs/markdown/snowplow_media_player_model_docs.md @@ -0,0 +1,31 @@ +{% docs table_interactions_this_run %} +This staging table shows all media player events within the current incremental run and calculates play_time. It could be used in custom models for more in-depth time based calculations. +{% enddocs %} + +{% docs table_base_this_run %} +This staging table aggregates media player interactions within the current run to a pageview level that is considered a base level for media plays. +{% enddocs %} + +{% docs table_base %} +This derived table aggregates media player interactions to a pageview level incrementally. +{% enddocs %} + +{% docs table_plays_by_pageview %} +This view removes impressions from the derived snowplow_media_base table for showing pageview level media play events. +{% enddocs %} + +{% docs table_plays_by_session %} +This table aggregates the pageview level interactions to show session level media stats. +{% enddocs %} + +{% docs table_user_stats %} +This table aggregates the pageview level interactions to show user level media stats. +{% enddocs %} + +{% docs table_media_stats %} +This derived table aggregates the pageview level interactions to show overall media stats. +{% enddocs %} + +{% docs table_pivot_base %} +This helper table serves as a base to calculate percent_progress based fields as well as the play_time metrics (by calculating the weight attributed to a percent progress being reached). +{% enddocs %} diff --git a/docs/markdown/snowplow_media_player_overview.md b/docs/markdown/snowplow_media_player_overview.md new file mode 100644 index 0000000..ac480f1 --- /dev/null +++ b/docs/markdown/snowplow_media_player_overview.md @@ -0,0 +1,321 @@ +{% docs __snowplow_media_player__ %} + +{% raw %} + +# Snowplow Media Player Package + +Welcome to the documentation site for the Snowplow Media Player dbt package. The package is built as an extension of the [dbt-snowplow-web package][dbt-snowplow-web] that transforms raw media player event data into derived tables for easier querying generated by the Snowplow [JavaScript tracker][javascript-tracker] in combination with media tracking specific plugins such as the [Media Tracking plugin][media-tracking] or the [YouTube Tracking plugin][youtube-tracking]. + +In order to keep the documentations separate and less verbose, this guide will assume the reader is already familiar with configuring and running the web model and will only explain how to operate the media-player package in conjunction with the web model as the media model was designed to be run together with it. Please refer to the [snowplow-web dbt doc site][dbt-snowplow-web] for a full breakdown of the package and how to set it up. + +Please note that the media player package is not compatible with the [Flutter tracker][flutter-tracker] as it is reliant on the Snowplow [JavaScript tracker][javascript-tracker]. + +**Note this doc site is linked to the latest release of the package. If you are not using the latest release, [generate and serve](https://docs.getdbt.com/reference/commands/cmd-docs#dbt-docs-serve) the doc site locally for accurate documentation.** + +## Overview + +This package consists of a series of dbt models with the goal to produce the following main aggregated models from the raw media player events and relevant contexts: + + - `snowplow_media_player_base`: This derived table summarises the key media player events and metrics of each media element on a media_id and pageview level which is considered as a base aggregation level for media interactions. + + - `snowplow_media_player_plays_by_pageview`: This view removes impressions from the '_base' table to summarise media plays on a page_view by media_id level. + + - `snowplow_media_player_media_stats`: This derived table aggregates the '_base' table to individual media_id level, calculating the main KPIs and overall video/audio metrics. + +The package is built on top of the [dbt-snowplow-web package][dbt-snowplow-web] taking that as a basis to carry out the incremental update. It is designed to be run together with the web model in a similar manner to how a custom module would run: + +The `_interactions_this_run` table takes the `snowplow_web_base_events_this_run` table generated by the web package as an input then adds the various contexts to enrich the base table with the additional media related fields. It could be used for custom models for more in-depth event level derived tables and further analysis. + +The `_base_this_run` table then aggregates the `_interactions_this_run` table to media_id and pageview level and serves as a basis for the incrementalised derived table `_media_base`. + +The main `_media_stats` derived table will also be updated incrementally based on the `_media_base` derived table, however not through the snowplow_incremental materialization, but using the native dbt incremental materialization on a pageview basis after a set time window passed. This is to prevent complex and expensive queries due to metrics which need to take the whole page_view events into calculation. This way the metrics will only be calculated once per pageview / media, after no new events are expected. + +The additional `_pivot_base` table is there to calculate the percent_progress boundaries and weights that are used to calculate the total play_time and other related media fields. + +## Adapter Support + +The Snowplow Media Player v0.1.0 package currently supports Redshift & Postgres. + +## Requirements + +- A dataset of media-player web events from the [Snowplow JavaScript tracker][javascript-tracker] must be available in the database. In order for this to happen at least one of the JavaScript based media tracking plugins need to be enabled: [Media Tracking plugin][media-tracking] or [YouTube Tracking plugin][youtube-tracking] +- Have the [`webPage` context][webpage-context] enabled. +- Have the [media-player event schema][media-player-event-schema] enabled. +- Have the [media-player context schema][media-player-context-schema] enabled. +- Depending on the plugin / intention have all the relevant contexts from below enabled: + - in case of embedded YouTube tracking: Have the [YouTube specific context schema][youtube-specific-context-schema] enabled. + - in case of HTML5 audio or video tracking: Have the [HTML5 media element context schema][html5-media-element-context-schema] enabled. + - in case of HTML5 video tracking: Have the [HTML5 video element context schema][html5-video-element-context-schema] enabled. + + +## Installation + +Check [dbt Hub](https://hub.getdbt.com/snowplow/snowplow_media_player/latest/) for the latest installation instructions, or read the [dbt docs][dbt-package-docs] for more information on installing packages. If you already have the web package installed you might need to upgrade it in order for it to be compatible with the media_player package requirements. Otherwise it is enough to install the media_player package as it will add the web package automatically due to the dependencies. + + +## Configuration + +### 1. Setting up variables + +In general, when adding new variables to the dbt project we have to be careful around scoping the variables appropriately, especially when using multiple packages, which is the case when running the snowplow media player package. You can read more about variable scoping in dbt's docs around [variable precedence](https://docs.getdbt.com/docs/building-a-dbt-project/building-models/using-variables#variable-precedence). + +In this particular case, despite being separated, running the two packages happens in sync. Although we try and name our package variables uniquely across all Snowplow dbt packages, when making any changes to them it's best to keep them separate in their appropriate scoping level. In other words, variables introduced in the web model should be set under snowplow_web and the same goes for the media_player related variables as illustrated below: + +```yml +# dbt_project.yml +... +vars: + snowplow_web: + snowplow__backfill_limit_days: 60 + snowplow_media_player: + snowplow__percent_progress_boundaries: [20, 40, 60, 80] + +``` + +**Media Player specific variables:** + + +> `snowplow__percent_progress_boundaries`: [10, 25, 50, 75] + +The default list of percent progress values. It needs to be aligned with the values being tracked by the tracker. It is worth noting that the more these percent progress boundaries are being tracked the more accurate the play time calculations become. Please note that tracking 100% is unnecessary as there is a separate `ended` event which the model equates to achieving 100% and it also gets included automatically to this list, in case it is not added (you can refer to the helper macro `get_percentage_boundaries` ([source](https://snowplow.github.io/dbt-snowplow-media-player/#!/macro/macro.snowplow_media_player.get_percentage_boundaries)) for details). + +> `snowplow__valid_play_sec`: 30 + +The minimum number of seconds that a media play needs to last to consider that interaction a valid play. The default is 30 seconds (based on the YouTube standard) but it can be modified here, if needed. + +> `snowplow__complete_play_rate`: 0.99 + +The rate to set what percentage of a media needs to be played in order to consider that complete. 0.99 (=99%) is set as a default value here but it may be increased to 1 (or decreased) depending on the use case. + +> `snowplow__max_media_pv_window`: 10 + +The number of hours that needs to pass before new page_view level media player metrics from the snowplow_media_palyer_base table are safe to be processed by the model downstream in the snowplow_media_player_media_stats table. Please note that even if new events are added later on ( e.g. new percentprogress events are fired indicading potential replay) and the snowplow_media_player_base table is changed, the model will not update them in the media_stats table, therefore it is safer to set as big of a number as still convenient for analysis and reporting. + +### 2. Configuring the web model (in case it has not been run before) + +Please refer to the `Quick Start` guide within the [snowplow-web dbt doc site][dbt-snowplow-web] to make sure you configure the web model appropriately. (e.g.: checking the source data or enabling desired contexts). + +One thing to highlight here: as the package is built onto the snowplow_incremental_materialization logic provided by the web package, please leave the `snowplow__incremental_materialization` variable as is with the default `snowplow_incremental` value. + +### 3. Adding the selector.yml file + +Within this package we have provided a suite of suggested selectors to run and test the models within the package together with the web model. This leverages dbt's [selector flag][dbt-selectors]. + +The selectors include: + +- `snowplow_web`: Recommended way to run the package. This selection includes all models within the Snowplow Web and Media Player package as well as any custom models you have created that are tagged with 'snowplow_web_incremental'. This is the same as in the web package. +- `snowplow_web_lean_and_media_player_tests`: Recommended way to test the models within the web and media player packages. See the testing section for more details. There are other selectors for testing, please see the Tests section for more details on this. + +These are defined in the `selectors.yml` file ([source](https://github.com/snowplow/dbt-snowplow-media-player/blob/main/selectors.yml)) within the package, however in order to use these selections you will need to copy this file into your own dbt project directory. This is a top-level file and therefore should sit alongside your `dbt_project.yml` file. + +## Operation + +Due to its unique relationship with the web package, in order to operate the media player package together with the web model there are several considerations to keep in mind. Depending on the use case one of the following scenarios may happen: + +1. The web package is already being used and the media tracking package needs to be added at a later time. +2. The web package has not been used but it needs to be run together with the media player package. +3. Only the media player package needs to be run. +------ +### 1. Adding the media player data model to an existing dbt project with web model data already running + +Supposing there are months of data being collected using the web package and media tracking is introduced at that later stage there is no need to fully reprocess the web data from the date media tracking was deployed. + +As models from both packages need to be run in sync, first the backfilling of the models from the new package needs to happen. Please note that during backfill no new web data is allowed to be processed and depending on the `snowplow_backfill_limit_days` configured and the period that needs backfilling it can take a while for all models to sync up and new web events to be processed. + +To begin the synching process please run the following script: + +```bash +dbt run -m snowplow_web.base snowplow_media_player --vars 'snowplow__start_date: ' +``` +This way only the base module is reprocessed which is used as one of the main sources for the media player package. The web model's update logic should recognise the new media player models (as all are tagged with `snowplow_web_incremental`) and backfilling should start between the date you defined within `snowplow_start_date` and the upper limit defined by the variable `snowplow_backfill_limit_days` that is set for the web model. + +```bash +Snowplow: New Snowplow incremental model. Backfilling +``` + + You can overwrite this limit for this backfilling process temporarily while it lasts, if needed: + +```yml +# dbt_project.yml +... +vars: + snowplow_web: + snowplow__backfill_limit_days: 1 +``` + + +After this you should be able to see all media_player models added to the `derived.snowplow_web_incremental_manifest` table. Any subsequent run from this point onwards could be carried out using the recommended web model running method - using the snowplow_web selector - which automatically adds all media_models as they are within the project directory and are all tagged with `snowplow_web_incremental`. + + +```bash +dbt run --selector snowplow_web +``` +As soon as backfilling finishes, running the model results in both the web and the media player models being updated during the same run for the same period, both using the same latest set of data from the `_base_events_this_run` table. + + +### 2. Starting both the media and web model from scratch + +The easiest implementation out of the three scenarios. As the `snowplow_web_incremental_manifest` table is new, all models from both packages (plus any custom modules tagged with `snowplow_web_incremental`) will be processsed using the recommended web model running method - using the snowplow_web selector without any extra step. + +```bash +dbt run --selector snowplow_web +``` + +### 3. Only running the media player package from the same dbt project + +Although the media player package is not designed for standalone useage, there can be scenarios where only the media player models are targeted for the update, not the web model. In such case the web model still has to be configured with the main difference that all modules that the media player model does not rely on need to be disabled. It is essentially only the base model that is needed, so please disable all the rest like so: + +```yml +# dbt_project.yml +... +models: + snowplow_web: + page_views: + enabled: false + sessions: + enabled: false + user_mapping: + enabled: false + users: + enabled: false +``` +Running it, however can still be achieved by running the selector as defined in the web model. In order for it to work, you can copy the selectors.yml file ([source](https://github.com/snowplow/dbt-snowplow-media-player/blob/main/selectors.yml)) from the package to your dbt project's main directory. + +```bash +dbt run --selector snowplow_web +``` + +After the run finishes, you should only see the media player related models to be present within the snowplow_web_incremental_manifest table. +## Tests + +Following the logic defined in the web package, the media player package also contains tests for both the scratch and derived models. Depending on your use case you might not want to run all tests in production, for example to save costs. There are several tags included in the package to help select subsets of tests. Tags: + +- `this_run`: Any model with the `_this_run` suffix +- `scratch`: Any model in the scratch sub directories. +- `derived`: Any of the derived models i.e. media_stats. +- `primary-key`: Any test on the primary keys of all models in this package. + +The recommended approach to testing the web model is using the selector flag 'snowplow_web_lean_tests'. When running the web model together with the media_player model, the recommendation is to use the `snowplow_web_lean_and_media_player_tests`. In order for it to work, please copy the selectors.yml file to the main project directory ([source](https://github.com/snowplow/dbt-snowplow-media-player/blob/main/selectors.yml)). + +```bash +dbt test --selector snowplow_web_lean_and_media_player_tests +``` + +This is equivalent to running the lean tests on the web-model as well as all media_player tests and any tests on any custom models tagged 'snowplow_media_player'. + +Alternatively, if you wanted to run all available tests in both the Snowplow Web and Media Player package (plus any tests on any custom models tagged 'snowplow_media_player') you can run `snowplow_web_and_media_player_tests`: + +```bash +dbt test --selector snowplow_web_and_media_player_tests +``` +In case only the media model's tests (and any custom module tagged with 'snowplow_media_player') need to be run you can use `snowplow_media_player_tests`: + +```bash +dbt test --selector snowplow_media_player_tests +``` + +# Custom models + +There are two custom models included in the package which could potentially be used in downstream models: + +1. the `snowplow_media_player_session_stats` table, which aggregates the snowplow_media_base table on a session level + +2. the `snowplow_media_player_user_stats` table, which aggregates the snowplow_media_player_session_stats to user level + +By default these are disabled, but you can enable them in the project's profiles.yml, if needed. + +```yml +# dbt_project.yml +... + models: + snowplow_media_player: + custom: + enabled: true +``` +Just like in case of the web model, users are encouraged to use the Media Player model and its incremental logic to design their own custom models / modules. The `snowplow_media_player_interactions_this_run` table is designed with this in mind, where a couple of potentially userful fields are generated that the Media Player model does not use downstream but they nonetheless have the potential to be incorporated into users custom models. + +One such example is the `player_current_time`, which is the playback position of a specific media in seconds whenever a media player event is fired, from which more precise time-based calculations could be made. + +e.g. subsequent events' `player_current_time` could be used to deduct the `player_end_time` of an event. Subtracting these two would result in calculated play_times instead of taking the percentprogress fields as a base like the Media Player model. + +```sql +with interaction_ends as ( + + select + event_id, + event_type, + start_tstamp, + lead(start_tstamp, 1) over(partition by play_id order by start_tstamp) as end_tstamp, + player_current_time, + lead(player_current_time, 1) over(partition by play_id order by start_tstamp) as player_end_time +from scratch.snowplow_media_player_interactions_this_run + +) + +select + event_id, + player_end_time - player_current_time as play_time_sec_calculated + +from interaction_ends + +where event_type = 'play' +``` +# Join the Snowplow community + +We welcome all ideas, questions and contributions! + +For support requests, please use our community support [Discourse][discourse] forum. + +If you find a bug, please report an issue on GitHub. + +# Copyright and license + +The snowplow-media-player package is Copyright 2022 Snowplow Analytics Ltd. + +Licensed under the [Apache License, Version 2.0][license] (the "License"); +you may not use this software except in compliance with the License. + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +[license]: http://www.apache.org/licenses/LICENSE-2.0 +[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat +[tracker-classificiation]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/ +[early-release]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Early%20Release&color=014477&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC + +[tracker-docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/ + +[webpage-context]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/tracker-setup/initialization-options/#Adding_predefined_contexts + +[media-player-event-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/media_player_event/jsonschema/1-0-0 +[media-player-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/media_player/jsonschema/1-0-0 +[youtube-specific-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/com.youtube/youtube/jsonschema/1-0-0 +[html5-media-element-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/org.whatwg/media_element/jsonschema/1-0-0 +[html5-video-element-context-schema]: https://github.com/snowplow/iglu-central/blob/master/schemas/org.whatwg/video_element/jsonschema/1-0-0 + +[media-tracking]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/plugins/media-tracking/ + +[javascript-tracker]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3 + +[youtube-tracking]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/plugins/youtube-tracking/ + +[dbt-selectors]: https://docs.getdbt.com/reference/node-selection/yaml-selectors +[selectors-yml-file]: https://github.com/ + +[dbt-package-docs]: https://docs.getdbt.com/docs/building-a-dbt-project/package-management + +[discourse-image]: https://img.shields.io/discourse/posts?server=https%3A%2F%2Fdiscourse.snowplowanalytics.com%2F +[discourse]: http://discourse.snowplowanalytics.com/ + +[snowplow-media-player-docs]: https://snowplow.github.io/dbt-snowplow-media-player/#!/overview/snowplow_media_player + +[dbt-snowplow-web]: https://snowplow.github.io/dbt-snowplow-web/#!/overview/snowplow_web + +[flutter-tracker]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/flutter-tracker/ + + +{% endraw %} +{% enddocs %} diff --git a/docs/run_results.json b/docs/run_results.json new file mode 100644 index 0000000..7cf23f2 --- /dev/null +++ b/docs/run_results.json @@ -0,0 +1 @@ +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.0.0", "generated_at": "2022-05-12T15:44:13.248381Z", "invocation_id": "842c68f8-0b2e-4ace-8bfc-9f191c9508e0", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.257090Z", "completed_at": "2022-05-12T15:44:10.286823Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.287252Z", "completed_at": "2022-05-12T15:44:10.287273Z"}], "thread_id": "Thread-1", "execution_time": 0.032398223876953125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_media_player.snowplow_media_player_pivot_base"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.257284Z", "completed_at": "2022-05-12T15:44:10.287131Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.287955Z", "completed_at": "2022-05-12T15:44:10.287959Z"}], "thread_id": "Thread-2", "execution_time": 0.03286409378051758, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_base_quarantined_sessions"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.257448Z", "completed_at": "2022-05-12T15:44:10.287364Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.288268Z", "completed_at": "2022-05-12T15:44:10.288273Z"}], "thread_id": "Thread-3", "execution_time": 0.032737016677856445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_incremental_manifest"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.290418Z", "completed_at": "2022-05-12T15:44:10.307228Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.307553Z", "completed_at": "2022-05-12T15:44:10.307560Z"}], "thread_id": "Thread-1", "execution_time": 0.018764019012451172, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_pivot_base_percent_progress.f340fd7fc8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.290180Z", "completed_at": "2022-05-12T15:44:10.307470Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.308203Z", "completed_at": "2022-05-12T15:44:10.308206Z"}], "thread_id": "Thread-4", "execution_time": 0.01968693733215332, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_pivot_base_percent_progress.2c08f44ca8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.302574Z", "completed_at": "2022-05-12T15:44:10.307630Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.308452Z", "completed_at": "2022-05-12T15:44:10.308455Z"}], "thread_id": "Thread-3", "execution_time": 0.018711090087890625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_base_quarantined_sessions_session_id.eef9115def"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.302445Z", "completed_at": "2022-05-12T15:44:10.307708Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.308530Z", "completed_at": "2022-05-12T15:44:10.308534Z"}], "thread_id": "Thread-2", "execution_time": 0.019102096557617188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_base_quarantined_sessions_session_id.862c7621b8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.324787Z", "completed_at": "2022-05-12T15:44:10.357055Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.357221Z", "completed_at": "2022-05-12T15:44:10.357227Z"}], "thread_id": "Thread-3", "execution_time": 0.04740095138549805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_incremental_manifest_model.1abc13aaeb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.324850Z", "completed_at": "2022-05-12T15:44:10.357784Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.358108Z", "completed_at": "2022-05-12T15:44:10.358113Z"}], "thread_id": "Thread-2", "execution_time": 0.048249244689941406, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_incremental_manifest_model.225591dff7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.324652Z", "completed_at": "2022-05-12T15:44:10.357863Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.358207Z", "completed_at": "2022-05-12T15:44:10.358210Z"}], "thread_id": "Thread-4", "execution_time": 0.04876399040222168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "operation.snowplow_web.snowplow_web-on-run-start-0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.309894Z", "completed_at": "2022-05-12T15:44:10.759827Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:10.760051Z", "completed_at": "2022-05-12T15:44:10.760059Z"}], "thread_id": "Thread-1", "execution_time": 0.4516751766204834, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_base_new_event_limits"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:10.761454Z", "completed_at": "2022-05-12T15:44:11.327420Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.327722Z", "completed_at": "2022-05-12T15:44:11.327741Z"}], "thread_id": "Thread-3", "execution_time": 0.5672261714935303, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_base_sessions_lifecycle_manifest"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.331114Z", "completed_at": "2022-05-12T15:44:11.348356Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.348597Z", "completed_at": "2022-05-12T15:44:11.348604Z"}], "thread_id": "Thread-1", "execution_time": 0.018899202346801758, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_end_tstamp.de91d8a021"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.336997Z", "completed_at": "2022-05-12T15:44:11.349366Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.349952Z", "completed_at": "2022-05-12T15:44:11.349957Z"}], "thread_id": "Thread-2", "execution_time": 0.022899150848388672, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_session_id.319366317f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.337104Z", "completed_at": "2022-05-12T15:44:11.349843Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.353384Z", "completed_at": "2022-05-12T15:44:11.353389Z"}], "thread_id": "Thread-3", "execution_time": 0.023243188858032227, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_lifecycle_manifest_start_tstamp.19f9724e3e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.349750Z", "completed_at": "2022-05-12T15:44:11.353876Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.354190Z", "completed_at": "2022-05-12T15:44:11.354195Z"}], "thread_id": "Thread-1", "execution_time": 0.0052030086517333984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_base_sessions_lifecycle_manifest_session_id.98156c1d39"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.330806Z", "completed_at": "2022-05-12T15:44:11.664276Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.664670Z", "completed_at": "2022-05-12T15:44:11.664690Z"}], "thread_id": "Thread-4", "execution_time": 0.33603811264038086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_base_sessions_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.668444Z", "completed_at": "2022-05-12T15:44:11.689923Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.690364Z", "completed_at": "2022-05-12T15:44:11.690370Z"}], "thread_id": "Thread-3", "execution_time": 0.0234527587890625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_base_sessions_this_run_session_id.56273da92b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.668570Z", "completed_at": "2022-05-12T15:44:11.690045Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:11.690461Z", "completed_at": "2022-05-12T15:44:11.690465Z"}], "thread_id": "Thread-1", "execution_time": 0.02335190773010254, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_base_sessions_this_run_session_id.daa62a6c5c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:11.668304Z", "completed_at": "2022-05-12T15:44:12.015529Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.015794Z", "completed_at": "2022-05-12T15:44:12.015807Z"}], "thread_id": "Thread-2", "execution_time": 0.3493790626525879, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_base_events_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.018932Z", "completed_at": "2022-05-12T15:44:12.043665Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.044169Z", "completed_at": "2022-05-12T15:44:12.044175Z"}], "thread_id": "Thread-3", "execution_time": 0.02676701545715332, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_page_view_events"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.019028Z", "completed_at": "2022-05-12T15:44:12.043756Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.044326Z", "completed_at": "2022-05-12T15:44:12.044329Z"}], "thread_id": "Thread-1", "execution_time": 0.02680492401123047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_pv_engaged_time"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.018710Z", "completed_at": "2022-05-12T15:44:12.043915Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.044650Z", "completed_at": "2022-05-12T15:44:12.044653Z"}], "thread_id": "Thread-4", "execution_time": 0.027814865112304688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_media_player.snowplow_media_player_interactions_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.031680Z", "completed_at": "2022-05-12T15:44:12.044089Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.044885Z", "completed_at": "2022-05-12T15:44:12.044889Z"}], "thread_id": "Thread-2", "execution_time": 0.027353286743164062, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_pv_limits"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.046791Z", "completed_at": "2022-05-12T15:44:12.067029Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.067406Z", "completed_at": "2022-05-12T15:44:12.067410Z"}], "thread_id": "Thread-3", "execution_time": 0.02185821533203125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_pv_scroll_depth"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.055355Z", "completed_at": "2022-05-12T15:44:12.067486Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.068097Z", "completed_at": "2022-05-12T15:44:12.068100Z"}], "thread_id": "Thread-2", "execution_time": 0.021835803985595703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_base_events_this_run_event_id.0fc80e3549"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.052459Z", "completed_at": "2022-05-12T15:44:12.067694Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.068371Z", "completed_at": "2022-05-12T15:44:12.068374Z"}], "thread_id": "Thread-4", "execution_time": 0.022245168685913086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "operation.snowplow_web.snowplow_web-on-run-end-0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.068897Z", "completed_at": "2022-05-12T15:44:12.075747Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.075963Z", "completed_at": "2022-05-12T15:44:12.075968Z"}], "thread_id": "Thread-3", "execution_time": 0.007954835891723633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_base_events_this_run_event_id.9ad59b967e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.071313Z", "completed_at": "2022-05-12T15:44:12.076319Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.076842Z", "completed_at": "2022-05-12T15:44:12.076846Z"}], "thread_id": "Thread-2", "execution_time": 0.00799703598022461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_view_events_page_view_id.c0a6fd5093"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.071389Z", "completed_at": "2022-05-12T15:44:12.076440Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.076911Z", "completed_at": "2022-05-12T15:44:12.076914Z"}], "thread_id": "Thread-4", "execution_time": 0.00622105598449707, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_page_view_events_page_view_id.79b1b7c6c9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.076978Z", "completed_at": "2022-05-12T15:44:12.079682Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.081726Z", "completed_at": "2022-05-12T15:44:12.081730Z"}], "thread_id": "Thread-3", "execution_time": 0.008656740188598633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_pv_engaged_time_page_view_id.21b1a00326"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.079818Z", "completed_at": "2022-05-12T15:44:12.085374Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.085867Z", "completed_at": "2022-05-12T15:44:12.085870Z"}], "thread_id": "Thread-2", "execution_time": 0.006808757781982422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_pv_engaged_time_page_view_id.ccfb493466"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.079951Z", "completed_at": "2022-05-12T15:44:12.085801Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.087934Z", "completed_at": "2022-05-12T15:44:12.087938Z"}], "thread_id": "Thread-4", "execution_time": 0.008748054504394531, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_media_player.snowplow_media_player_base_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.085948Z", "completed_at": "2022-05-12T15:44:12.088539Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.089095Z", "completed_at": "2022-05-12T15:44:12.089098Z"}], "thread_id": "Thread-3", "execution_time": 0.0054988861083984375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_interactions_this_run_event_id.64c07fa266"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.088967Z", "completed_at": "2022-05-12T15:44:12.098360Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.098769Z", "completed_at": "2022-05-12T15:44:12.098774Z"}], "thread_id": "Thread-2", "execution_time": 0.010704994201660156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_interactions_this_run_event_id.ec39d65876"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.090868Z", "completed_at": "2022-05-12T15:44:12.098849Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.101028Z", "completed_at": "2022-05-12T15:44:12.101032Z"}], "thread_id": "Thread-4", "execution_time": 0.012546062469482422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_page_views_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.098908Z", "completed_at": "2022-05-12T15:44:12.101583Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.104096Z", "completed_at": "2022-05-12T15:44:12.104101Z"}], "thread_id": "Thread-3", "execution_time": 0.005881071090698242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_pv_scroll_depth_page_view_id.5e70f95d64"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.101717Z", "completed_at": "2022-05-12T15:44:12.106980Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.107469Z", "completed_at": "2022-05-12T15:44:12.107473Z"}], "thread_id": "Thread-2", "execution_time": 0.00659489631652832, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_pv_scroll_depth_page_view_id.bea0dbc29e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.107539Z", "completed_at": "2022-05-12T15:44:12.109976Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.112471Z", "completed_at": "2022-05-12T15:44:12.112477Z"}], "thread_id": "Thread-3", "execution_time": 0.005556821823120117, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_base_this_run_play_id.e59aaaef71"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.109915Z", "completed_at": "2022-05-12T15:44:12.112964Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.113240Z", "completed_at": "2022-05-12T15:44:12.113244Z"}], "thread_id": "Thread-2", "execution_time": 0.008282184600830078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_base_this_run_play_id.1480904280"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.118693Z", "completed_at": "2022-05-12T15:44:12.121209Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.121359Z", "completed_at": "2022-05-12T15:44:12.121363Z"}], "thread_id": "Thread-2", "execution_time": 0.003125905990600586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_sessions_aggs"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.121990Z", "completed_at": "2022-05-12T15:44:12.124045Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.124188Z", "completed_at": "2022-05-12T15:44:12.124192Z"}], "thread_id": "Thread-2", "execution_time": 0.0026450157165527344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_absolute_time_in_s.54893adc18"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.124832Z", "completed_at": "2022-05-12T15:44:12.126709Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.126845Z", "completed_at": "2022-05-12T15:44:12.126849Z"}], "thread_id": "Thread-2", "execution_time": 0.0023779869079589844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_collector_tstamp.3382a3c260"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.127342Z", "completed_at": "2022-05-12T15:44:12.129225Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.129360Z", "completed_at": "2022-05-12T15:44:12.129364Z"}], "thread_id": "Thread-2", "execution_time": 0.002318143844604492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_derived_tstamp.c845283a13"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.129845Z", "completed_at": "2022-05-12T15:44:12.132195Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.132332Z", "completed_at": "2022-05-12T15:44:12.132336Z"}], "thread_id": "Thread-2", "execution_time": 0.002780914306640625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionid.8c6f26a143"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.132848Z", "completed_at": "2022-05-12T15:44:12.134757Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.134896Z", "completed_at": "2022-05-12T15:44:12.134900Z"}], "thread_id": "Thread-2", "execution_time": 0.002357006072998047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_sessionidx.69a8717c74"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.135403Z", "completed_at": "2022-05-12T15:44:12.137295Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.137433Z", "completed_at": "2022-05-12T15:44:12.137437Z"}], "thread_id": "Thread-2", "execution_time": 0.002330780029296875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_domain_userid.77f79e80dd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.137915Z", "completed_at": "2022-05-12T15:44:12.139763Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.139899Z", "completed_at": "2022-05-12T15:44:12.139902Z"}], "thread_id": "Thread-2", "execution_time": 0.0022749900817871094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_dvce_created_tstamp.40e528d602"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.140462Z", "completed_at": "2022-05-12T15:44:12.142373Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.142511Z", "completed_at": "2022-05-12T15:44:12.142516Z"}], "thread_id": "Thread-2", "execution_time": 0.0024290084838867188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_end_tstamp.56229099fe"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.143014Z", "completed_at": "2022-05-12T15:44:12.145004Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.145145Z", "completed_at": "2022-05-12T15:44:12.145149Z"}], "thread_id": "Thread-2", "execution_time": 0.0024356842041015625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_engaged_time_in_s.347bdb2071"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.145689Z", "completed_at": "2022-05-12T15:44:12.148347Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.148495Z", "completed_at": "2022-05-12T15:44:12.148500Z"}], "thread_id": "Thread-2", "execution_time": 0.0031402111053466797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_event_id.8f03269031"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.149026Z", "completed_at": "2022-05-12T15:44:12.150944Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.151175Z", "completed_at": "2022-05-12T15:44:12.151179Z"}], "thread_id": "Thread-2", "execution_time": 0.0024597644805908203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_network_userid.9dfe18559d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.151680Z", "completed_at": "2022-05-12T15:44:12.153644Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.153782Z", "completed_at": "2022-05-12T15:44:12.153786Z"}], "thread_id": "Thread-2", "execution_time": 0.002401113510131836, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_url.5d2cf56a0b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.154279Z", "completed_at": "2022-05-12T15:44:12.156109Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.156242Z", "completed_at": "2022-05-12T15:44:12.156246Z"}], "thread_id": "Thread-2", "execution_time": 0.0023107528686523438, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_id.cc0f0d96b3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.156794Z", "completed_at": "2022-05-12T15:44:12.158730Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.158860Z", "completed_at": "2022-05-12T15:44:12.158864Z"}], "thread_id": "Thread-2", "execution_time": 0.002366304397583008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_view_in_session_index.c7826944c8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.159341Z", "completed_at": "2022-05-12T15:44:12.161180Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.161315Z", "completed_at": "2022-05-12T15:44:12.161319Z"}], "thread_id": "Thread-2", "execution_time": 0.0022699832916259766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_page_views_in_session.8d647c2332"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.161861Z", "completed_at": "2022-05-12T15:44:12.164005Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.164150Z", "completed_at": "2022-05-12T15:44:12.164155Z"}], "thread_id": "Thread-2", "execution_time": 0.0026428699493408203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_this_run_start_tstamp.f397976d5e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.164729Z", "completed_at": "2022-05-12T15:44:12.167328Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.167468Z", "completed_at": "2022-05-12T15:44:12.167472Z"}], "thread_id": "Thread-2", "execution_time": 0.003088235855102539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_this_run_event_id.42096b7aa3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.167980Z", "completed_at": "2022-05-12T15:44:12.169875Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.170013Z", "completed_at": "2022-05-12T15:44:12.170017Z"}], "thread_id": "Thread-2", "execution_time": 0.0023381710052490234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_this_run_page_view_id.265385eac0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.170503Z", "completed_at": "2022-05-12T15:44:12.172834Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.172972Z", "completed_at": "2022-05-12T15:44:12.172976Z"}], "thread_id": "Thread-2", "execution_time": 0.0027649402618408203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_sessions_lasts"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.173525Z", "completed_at": "2022-05-12T15:44:12.175449Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.175587Z", "completed_at": "2022-05-12T15:44:12.175591Z"}], "thread_id": "Thread-2", "execution_time": 0.002418994903564453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_aggs_domain_sessionid.89fbe02a91"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.176086Z", "completed_at": "2022-05-12T15:44:12.177963Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.178102Z", "completed_at": "2022-05-12T15:44:12.178106Z"}], "thread_id": "Thread-2", "execution_time": 0.002318143844604492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_aggs_domain_sessionid.bd890ff72e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.178598Z", "completed_at": "2022-05-12T15:44:12.184931Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.185069Z", "completed_at": "2022-05-12T15:44:12.185073Z"}], "thread_id": "Thread-2", "execution_time": 0.006770133972167969, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_sessions_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.185693Z", "completed_at": "2022-05-12T15:44:12.187612Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.187754Z", "completed_at": "2022-05-12T15:44:12.187758Z"}], "thread_id": "Thread-2", "execution_time": 0.0023679733276367188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_lasts_domain_sessionid.2a80ea96a7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.188271Z", "completed_at": "2022-05-12T15:44:12.190301Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.190440Z", "completed_at": "2022-05-12T15:44:12.190444Z"}], "thread_id": "Thread-2", "execution_time": 0.002476930618286133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_lasts_domain_sessionid.5825bca1f2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.190976Z", "completed_at": "2022-05-12T15:44:12.193061Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.193213Z", "completed_at": "2022-05-12T15:44:12.193218Z"}], "thread_id": "Thread-2", "execution_time": 0.002568960189819336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_absolute_time_in_s.dee7fcd472"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.193737Z", "completed_at": "2022-05-12T15:44:12.195779Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.195927Z", "completed_at": "2022-05-12T15:44:12.195931Z"}], "thread_id": "Thread-2", "execution_time": 0.002499103546142578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionid.e339e9d10c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.196457Z", "completed_at": "2022-05-12T15:44:12.198412Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.198556Z", "completed_at": "2022-05-12T15:44:12.198560Z"}], "thread_id": "Thread-2", "execution_time": 0.0024209022521972656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_sessionidx.63be165793"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.199060Z", "completed_at": "2022-05-12T15:44:12.201060Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.201260Z", "completed_at": "2022-05-12T15:44:12.201265Z"}], "thread_id": "Thread-2", "execution_time": 0.0025169849395751953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_domain_userid.5edc0e4b52"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.201789Z", "completed_at": "2022-05-12T15:44:12.204418Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.204562Z", "completed_at": "2022-05-12T15:44:12.204566Z"}], "thread_id": "Thread-2", "execution_time": 0.003086090087890625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_end_tstamp.0863cb9826"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.205076Z", "completed_at": "2022-05-12T15:44:12.228945Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.229091Z", "completed_at": "2022-05-12T15:44:12.229096Z"}], "thread_id": "Thread-2", "execution_time": 0.02433300018310547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_engaged_time_in_s.d6cbebbd9d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.229574Z", "completed_at": "2022-05-12T15:44:12.231422Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.231560Z", "completed_at": "2022-05-12T15:44:12.231564Z"}], "thread_id": "Thread-2", "execution_time": 0.002295970916748047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_first_page_url.1b7eaa462c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.232034Z", "completed_at": "2022-05-12T15:44:12.233878Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.234016Z", "completed_at": "2022-05-12T15:44:12.234020Z"}], "thread_id": "Thread-2", "execution_time": 0.002274036407470703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_last_page_url.08695f7040"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.234493Z", "completed_at": "2022-05-12T15:44:12.236340Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.236476Z", "completed_at": "2022-05-12T15:44:12.236479Z"}], "thread_id": "Thread-2", "execution_time": 0.002270936965942383, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_network_userid.68ca052c7b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.236957Z", "completed_at": "2022-05-12T15:44:12.238789Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.238925Z", "completed_at": "2022-05-12T15:44:12.238929Z"}], "thread_id": "Thread-2", "execution_time": 0.0022611618041992188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_page_views.4c2da8e445"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.239408Z", "completed_at": "2022-05-12T15:44:12.241250Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.241384Z", "completed_at": "2022-05-12T15:44:12.241388Z"}], "thread_id": "Thread-2", "execution_time": 0.002273082733154297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_this_run_start_tstamp.124debede7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.241868Z", "completed_at": "2022-05-12T15:44:12.244354Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.244490Z", "completed_at": "2022-05-12T15:44:12.244494Z"}], "thread_id": "Thread-2", "execution_time": 0.0029211044311523438, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_this_run_domain_sessionid.69a930bc20"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.046940Z", "completed_at": "2022-05-12T15:44:12.412293Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.412645Z", "completed_at": "2022-05-12T15:44:12.412657Z"}], "thread_id": "Thread-1", "execution_time": 0.3672201633453369, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_user_mapping"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.415198Z", "completed_at": "2022-05-12T15:44:12.423663Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.424156Z", "completed_at": "2022-05-12T15:44:12.424165Z"}], "thread_id": "Thread-1", "execution_time": 0.010002851486206055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_user_mapping_end_tstamp.e6f41e2335"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.415053Z", "completed_at": "2022-05-12T15:44:12.423791Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.424276Z", "completed_at": "2022-05-12T15:44:12.424280Z"}], "thread_id": "Thread-2", "execution_time": 0.010540962219238281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_user_mapping_domain_userid.5ce237cee5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.426112Z", "completed_at": "2022-05-12T15:44:12.432219Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.432668Z", "completed_at": "2022-05-12T15:44:12.432675Z"}], "thread_id": "Thread-2", "execution_time": 0.0074880123138427734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_user_mapping_domain_userid.3f9b26384c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.425964Z", "completed_at": "2022-05-12T15:44:12.432327Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.432780Z", "completed_at": "2022-05-12T15:44:12.432785Z"}], "thread_id": "Thread-1", "execution_time": 0.007925033569335938, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_user_mapping_user_id.9002d9e31c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.113172Z", "completed_at": "2022-05-12T15:44:12.485565Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.485770Z", "completed_at": "2022-05-12T15:44:12.485777Z"}], "thread_id": "Thread-3", "execution_time": 0.373291015625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_page_views"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.487355Z", "completed_at": "2022-05-12T15:44:12.493892Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.494346Z", "completed_at": "2022-05-12T15:44:12.494351Z"}], "thread_id": "Thread-1", "execution_time": 0.007860183715820312, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_absolute_time_in_s.b0bdaac0aa"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.487445Z", "completed_at": "2022-05-12T15:44:12.493994Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.494431Z", "completed_at": "2022-05-12T15:44:12.494434Z"}], "thread_id": "Thread-3", "execution_time": 0.007839202880859375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_collector_tstamp.eebfc2e362"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.104205Z", "completed_at": "2022-05-12T15:44:12.494262Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.494942Z", "completed_at": "2022-05-12T15:44:12.494946Z"}], "thread_id": "Thread-4", "execution_time": 0.393949031829834, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_media_player.snowplow_media_player_base"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.496170Z", "completed_at": "2022-05-12T15:44:12.503708Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.504143Z", "completed_at": "2022-05-12T15:44:12.504148Z"}], "thread_id": "Thread-3", "execution_time": 0.008861303329467773, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionid.d171abf764"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.496087Z", "completed_at": "2022-05-12T15:44:12.503808Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.504227Z", "completed_at": "2022-05-12T15:44:12.504231Z"}], "thread_id": "Thread-1", "execution_time": 0.009169816970825195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_derived_tstamp.936b5957b7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.501288Z", "completed_at": "2022-05-12T15:44:12.504068Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.504697Z", "completed_at": "2022-05-12T15:44:12.504700Z"}], "thread_id": "Thread-4", "execution_time": 0.004153728485107422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_domain_sessionidx.e2c23f3f73"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.505878Z", "completed_at": "2022-05-12T15:44:12.513266Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.513529Z", "completed_at": "2022-05-12T15:44:12.513534Z"}], "thread_id": "Thread-3", "execution_time": 0.008720159530639648, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_domain_userid.c4dc145a92"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.505957Z", "completed_at": "2022-05-12T15:44:12.513445Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.514093Z", "completed_at": "2022-05-12T15:44:12.514097Z"}], "thread_id": "Thread-1", "execution_time": 0.00914621353149414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_dvce_created_tstamp.f9ef0a90e4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.511063Z", "completed_at": "2022-05-12T15:44:12.513611Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.514329Z", "completed_at": "2022-05-12T15:44:12.514333Z"}], "thread_id": "Thread-4", "execution_time": 0.009018182754516602, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_end_tstamp.49df31f6f5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.515360Z", "completed_at": "2022-05-12T15:44:12.521420Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.521635Z", "completed_at": "2022-05-12T15:44:12.521640Z"}], "thread_id": "Thread-3", "execution_time": 0.007224082946777344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_engaged_time_in_s.3e4b8848b3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.517548Z", "completed_at": "2022-05-12T15:44:12.522032Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.522525Z", "completed_at": "2022-05-12T15:44:12.522528Z"}], "thread_id": "Thread-1", "execution_time": 0.00757288932800293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_event_id.af9403c39f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.517650Z", "completed_at": "2022-05-12T15:44:12.522229Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.522670Z", "completed_at": "2022-05-12T15:44:12.522672Z"}], "thread_id": "Thread-4", "execution_time": 0.009302139282226562, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_network_userid.b5bb0baa9b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.522597Z", "completed_at": "2022-05-12T15:44:12.525448Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.528279Z", "completed_at": "2022-05-12T15:44:12.528283Z"}], "thread_id": "Thread-3", "execution_time": 0.008078813552856445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_url.8dddde87ba"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.525582Z", "completed_at": "2022-05-12T15:44:12.530456Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.530856Z", "completed_at": "2022-05-12T15:44:12.530859Z"}], "thread_id": "Thread-1", "execution_time": 0.00601506233215332, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_view_id.ed9780c9ab"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.525719Z", "completed_at": "2022-05-12T15:44:12.530727Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.531206Z", "completed_at": "2022-05-12T15:44:12.531208Z"}], "thread_id": "Thread-4", "execution_time": 0.007943153381347656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_view_in_session_index.a624a66afc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.531000Z", "completed_at": "2022-05-12T15:44:12.533635Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.535759Z", "completed_at": "2022-05-12T15:44:12.535763Z"}], "thread_id": "Thread-3", "execution_time": 0.005467891693115234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_page_views_in_session.90627e03fd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.533836Z", "completed_at": "2022-05-12T15:44:12.537506Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.537880Z", "completed_at": "2022-05-12T15:44:12.537884Z"}], "thread_id": "Thread-1", "execution_time": 0.004790067672729492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_page_views_start_tstamp.f0205359bb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.535843Z", "completed_at": "2022-05-12T15:44:12.538173Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.540366Z", "completed_at": "2022-05-12T15:44:12.540370Z"}], "thread_id": "Thread-4", "execution_time": 0.006918907165527344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.snowplow_tests_page_view_in_session_values"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.537974Z", "completed_at": "2022-05-12T15:44:12.540505Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.542611Z", "completed_at": "2022-05-12T15:44:12.542615Z"}], "thread_id": "Thread-3", "execution_time": 0.005369901657104492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_event_id.874efe18e1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.540702Z", "completed_at": "2022-05-12T15:44:12.543306Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.564616Z", "completed_at": "2022-05-12T15:44:12.564621Z"}], "thread_id": "Thread-1", "execution_time": 0.024664878845214844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_page_views_page_view_id.d0551e11d8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.564758Z", "completed_at": "2022-05-12T15:44:12.569092Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.569238Z", "completed_at": "2022-05-12T15:44:12.569242Z"}], "thread_id": "Thread-3", "execution_time": 0.025985002517700195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_media_player.snowplow_media_player_plays_by_pageview"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.567235Z", "completed_at": "2022-05-12T15:44:12.571650Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.571799Z", "completed_at": "2022-05-12T15:44:12.571803Z"}], "thread_id": "Thread-1", "execution_time": 0.005018949508666992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_base_play_id.75c3e8e087"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.569697Z", "completed_at": "2022-05-12T15:44:12.572250Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.574202Z", "completed_at": "2022-05-12T15:44:12.574206Z"}], "thread_id": "Thread-3", "execution_time": 0.004850864410400391, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_base_play_id.42806fdcfc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.572349Z", "completed_at": "2022-05-12T15:44:12.574702Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.574973Z", "completed_at": "2022-05-12T15:44:12.574976Z"}], "thread_id": "Thread-1", "execution_time": 0.005239963531494141, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_plays_by_pageview_play_id.f9c8ecdb6d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.574907Z", "completed_at": "2022-05-12T15:44:12.577555Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.577692Z", "completed_at": "2022-05-12T15:44:12.577696Z"}], "thread_id": "Thread-3", "execution_time": 0.0032279491424560547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_plays_by_pageview_play_id.f38ea98226"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.433912Z", "completed_at": "2022-05-12T15:44:12.783980Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.784241Z", "completed_at": "2022-05-12T15:44:12.784250Z"}], "thread_id": "Thread-2", "execution_time": 0.35106515884399414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_sessions"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.786462Z", "completed_at": "2022-05-12T15:44:12.798033Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.798260Z", "completed_at": "2022-05-12T15:44:12.798267Z"}], "thread_id": "Thread-1", "execution_time": 0.012969970703125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_users_sessions_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.786699Z", "completed_at": "2022-05-12T15:44:12.801749Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.802022Z", "completed_at": "2022-05-12T15:44:12.802028Z"}], "thread_id": "Thread-3", "execution_time": 0.016489028930664062, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_absolute_time_in_s.f0ab4554bf"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.792186Z", "completed_at": "2022-05-12T15:44:12.802129Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.802777Z", "completed_at": "2022-05-12T15:44:12.802781Z"}], "thread_id": "Thread-2", "execution_time": 0.017078161239624023, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionid.77c850bf50"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.799112Z", "completed_at": "2022-05-12T15:44:12.802536Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.803339Z", "completed_at": "2022-05-12T15:44:12.803343Z"}], "thread_id": "Thread-1", "execution_time": 0.005037784576416016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_domain_sessionidx.4658289a96"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.803867Z", "completed_at": "2022-05-12T15:44:12.809311Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.812774Z", "completed_at": "2022-05-12T15:44:12.812780Z"}], "thread_id": "Thread-3", "execution_time": 0.010103940963745117, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_domain_userid.71f8f1725c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.806954Z", "completed_at": "2022-05-12T15:44:12.812924Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.813518Z", "completed_at": "2022-05-12T15:44:12.813523Z"}], "thread_id": "Thread-2", "execution_time": 0.009963035583496094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_end_tstamp.a01aba32a9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.809413Z", "completed_at": "2022-05-12T15:44:12.813398Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.814168Z", "completed_at": "2022-05-12T15:44:12.814171Z"}], "thread_id": "Thread-1", "execution_time": 0.007786989212036133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_engaged_time_in_s.474d223b0e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.814386Z", "completed_at": "2022-05-12T15:44:12.819437Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.821783Z", "completed_at": "2022-05-12T15:44:12.821788Z"}], "thread_id": "Thread-3", "execution_time": 0.008420944213867188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_first_page_url.6f41b28018"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.817296Z", "completed_at": "2022-05-12T15:44:12.821863Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.822375Z", "completed_at": "2022-05-12T15:44:12.822378Z"}], "thread_id": "Thread-2", "execution_time": 0.008091926574707031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_last_page_url.3d31ff89a0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.819511Z", "completed_at": "2022-05-12T15:44:12.822454Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.823095Z", "completed_at": "2022-05-12T15:44:12.823099Z"}], "thread_id": "Thread-1", "execution_time": 0.00629115104675293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_network_userid.d8e7074d8d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.823175Z", "completed_at": "2022-05-12T15:44:12.828068Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.830865Z", "completed_at": "2022-05-12T15:44:12.830870Z"}], "thread_id": "Thread-3", "execution_time": 0.008571863174438477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_page_views.cadd000967"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.825815Z", "completed_at": "2022-05-12T15:44:12.830944Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.831409Z", "completed_at": "2022-05-12T15:44:12.831412Z"}], "thread_id": "Thread-2", "execution_time": 0.008488893508911133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_sessions_start_tstamp.46c3284a01"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.828168Z", "completed_at": "2022-05-12T15:44:12.831473Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.832082Z", "completed_at": "2022-05-12T15:44:12.832085Z"}], "thread_id": "Thread-1", "execution_time": 0.0065119266510009766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_sessions_domain_sessionid.cc08fe64cd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.832156Z", "completed_at": "2022-05-12T15:44:12.837204Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.837525Z", "completed_at": "2022-05-12T15:44:12.837529Z"}], "thread_id": "Thread-3", "execution_time": 0.007910966873168945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_users_aggs"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.835126Z", "completed_at": "2022-05-12T15:44:12.839591Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.839856Z", "completed_at": "2022-05-12T15:44:12.839859Z"}], "thread_id": "Thread-2", "execution_time": 0.00782322883605957, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_sessions_this_run_domain_sessionid.a0be268f54"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.837451Z", "completed_at": "2022-05-12T15:44:12.840252Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.840760Z", "completed_at": "2022-05-12T15:44:12.840763Z"}], "thread_id": "Thread-1", "execution_time": 0.007742881774902344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_users_sessions_this_run_domain_sessionid.dd827f20ca"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.840692Z", "completed_at": "2022-05-12T15:44:12.845191Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.845537Z", "completed_at": "2022-05-12T15:44:12.845541Z"}], "thread_id": "Thread-3", "execution_time": 0.007323026657104492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_users_lasts"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.843054Z", "completed_at": "2022-05-12T15:44:12.845605Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.847665Z", "completed_at": "2022-05-12T15:44:12.847668Z"}], "thread_id": "Thread-2", "execution_time": 0.007217884063720703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_aggs_domain_userid.418de3f818"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.845459Z", "completed_at": "2022-05-12T15:44:12.848269Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.848729Z", "completed_at": "2022-05-12T15:44:12.848732Z"}], "thread_id": "Thread-1", "execution_time": 0.0074918270111083984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_users_aggs_domain_userid.6bf5f8306b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.848663Z", "completed_at": "2022-05-12T15:44:12.854862Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.856956Z", "completed_at": "2022-05-12T15:44:12.856961Z"}], "thread_id": "Thread-3", "execution_time": 0.00905299186706543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_users_this_run"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.848795Z", "completed_at": "2022-05-12T15:44:12.855092Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.857302Z", "completed_at": "2022-05-12T15:44:12.857305Z"}], "thread_id": "Thread-2", "execution_time": 0.009418010711669922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_lasts_domain_userid.5a3966b2e0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.854939Z", "completed_at": "2022-05-12T15:44:12.857441Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.858175Z", "completed_at": "2022-05-12T15:44:12.858178Z"}], "thread_id": "Thread-1", "execution_time": 0.00386810302734375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_users_lasts_domain_userid.1c0deae6ac"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.863276Z", "completed_at": "2022-05-12T15:44:12.867397Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.867550Z", "completed_at": "2022-05-12T15:44:12.867555Z"}], "thread_id": "Thread-2", "execution_time": 0.009377002716064453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_domain_userid.2fe7d698b6"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.865426Z", "completed_at": "2022-05-12T15:44:12.867763Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.868160Z", "completed_at": "2022-05-12T15:44:12.868164Z"}], "thread_id": "Thread-1", "execution_time": 0.004996299743652344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_end_tstamp.e5321dde8b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.868431Z", "completed_at": "2022-05-12T15:44:12.873134Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.873305Z", "completed_at": "2022-05-12T15:44:12.873309Z"}], "thread_id": "Thread-2", "execution_time": 0.005469083786010742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_engaged_time_in_s.ab5559e6a8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.871326Z", "completed_at": "2022-05-12T15:44:12.873376Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.873752Z", "completed_at": "2022-05-12T15:44:12.873755Z"}], "thread_id": "Thread-1", "execution_time": 0.0029129981994628906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_first_page_url.1742180bd0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.874233Z", "completed_at": "2022-05-12T15:44:12.878261Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.878473Z", "completed_at": "2022-05-12T15:44:12.878478Z"}], "thread_id": "Thread-2", "execution_time": 0.004786968231201172, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_last_page_url.4917b11840"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.876415Z", "completed_at": "2022-05-12T15:44:12.878682Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.879058Z", "completed_at": "2022-05-12T15:44:12.879061Z"}], "thread_id": "Thread-1", "execution_time": 0.004940986633300781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_network_userid.cd5d1e9429"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.879317Z", "completed_at": "2022-05-12T15:44:12.883645Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.883809Z", "completed_at": "2022-05-12T15:44:12.883813Z"}], "thread_id": "Thread-2", "execution_time": 0.005059242248535156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_page_views.bdfc6538a5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.881476Z", "completed_at": "2022-05-12T15:44:12.883872Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.884247Z", "completed_at": "2022-05-12T15:44:12.884251Z"}], "thread_id": "Thread-1", "execution_time": 0.0033152103424072266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_sessions.701f1778bf"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.884747Z", "completed_at": "2022-05-12T15:44:12.889178Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.889350Z", "completed_at": "2022-05-12T15:44:12.889354Z"}], "thread_id": "Thread-2", "execution_time": 0.005232095718383789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_this_run_start_tstamp.1aa7174fca"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.887342Z", "completed_at": "2022-05-12T15:44:12.889421Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.889761Z", "completed_at": "2022-05-12T15:44:12.889765Z"}], "thread_id": "Thread-1", "execution_time": 0.005073070526123047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_users_this_run_domain_userid.098d3c27e7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.543248Z", "completed_at": "2022-05-12T15:44:12.922773Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.922921Z", "completed_at": "2022-05-12T15:44:12.922925Z"}], "thread_id": "Thread-4", "execution_time": 0.41240620613098145, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_media_player.snowplow_media_player_media_stats"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.955627Z", "completed_at": "2022-05-12T15:44:12.961049Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.961290Z", "completed_at": "2022-05-12T15:44:12.961297Z"}], "thread_id": "Thread-2", "execution_time": 0.0060882568359375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.not_null_snowplow_media_player_media_stats_media_id.4af247e237"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.958618Z", "completed_at": "2022-05-12T15:44:12.961655Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:12.961834Z", "completed_at": "2022-05-12T15:44:12.961838Z"}], "thread_id": "Thread-1", "execution_time": 0.003756999969482422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_media_player.unique_snowplow_media_player_media_stats_media_id.02472f49b3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:12.858550Z", "completed_at": "2022-05-12T15:44:13.199898Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.200362Z", "completed_at": "2022-05-12T15:44:13.200379Z"}], "thread_id": "Thread-3", "execution_time": 0.3432581424713135, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.snowplow_web.snowplow_web_users"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.205254Z", "completed_at": "2022-05-12T15:44:13.223085Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.223846Z", "completed_at": "2022-05-12T15:44:13.223855Z"}], "thread_id": "Thread-2", "execution_time": 0.020707130432128906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_end_tstamp.a557857240"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.205400Z", "completed_at": "2022-05-12T15:44:13.223268Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.224148Z", "completed_at": "2022-05-12T15:44:13.224152Z"}], "thread_id": "Thread-1", "execution_time": 0.020845890045166016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_engaged_time_in_s.3cb774c56b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.210855Z", "completed_at": "2022-05-12T15:44:13.223522Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.224511Z", "completed_at": "2022-05-12T15:44:13.224515Z"}], "thread_id": "Thread-3", "execution_time": 0.0208132266998291, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_first_page_url.04ab06a553"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.204952Z", "completed_at": "2022-05-12T15:44:13.223627Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.224616Z", "completed_at": "2022-05-12T15:44:13.224626Z"}], "thread_id": "Thread-4", "execution_time": 0.02233600616455078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_domain_userid.1ccdf3a506"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.227134Z", "completed_at": "2022-05-12T15:44:13.238035Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.238347Z", "completed_at": "2022-05-12T15:44:13.238353Z"}], "thread_id": "Thread-2", "execution_time": 0.01283574104309082, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_last_page_url.5cc3990f51"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.230346Z", "completed_at": "2022-05-12T15:44:13.239030Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.239737Z", "completed_at": "2022-05-12T15:44:13.239741Z"}], "thread_id": "Thread-3", "execution_time": 0.015651941299438477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_page_views.0e04d20dbc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.227428Z", "completed_at": "2022-05-12T15:44:13.239278Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.242154Z", "completed_at": "2022-05-12T15:44:13.242159Z"}], "thread_id": "Thread-1", "execution_time": 0.01641702651977539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_network_userid.4bed7aba0e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.230458Z", "completed_at": "2022-05-12T15:44:13.239572Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.242461Z", "completed_at": "2022-05-12T15:44:13.242464Z"}], "thread_id": "Thread-4", "execution_time": 0.016155719757080078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_sessions.158e1154ee"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.239499Z", "completed_at": "2022-05-12T15:44:13.242875Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.243531Z", "completed_at": "2022-05-12T15:44:13.243535Z"}], "thread_id": "Thread-2", "execution_time": 0.004924774169921875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.not_null_snowplow_web_users_start_tstamp.27d53ec51b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-05-12T15:44:13.243621Z", "completed_at": "2022-05-12T15:44:13.247131Z"}, {"name": "execute", "started_at": "2022-05-12T15:44:13.247304Z", "completed_at": "2022-05-12T15:44:13.247309Z"}], "thread_id": "Thread-3", "execution_time": 0.0043070316314697266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.snowplow_web.unique_snowplow_web_users_domain_userid.382879ad4d"}], "elapsed_time": 3.980926036834717, "args": {"write_json": true, "use_colors": true, "printer_width": 80, "version_check": true, "partial_parse": true, "static_parser": true, "profiles_dir": "/Users/agneskiss/.dbt", "send_anonymous_usage_stats": false, "event_buffer_size": 100000, "compile": true, "which": "generate", "rpc_method": "docs.generate", "indirect_selection": "eager"}} \ No newline at end of file diff --git a/macros/.gitkeep b/macros/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/macros/get_percentage_boundaries.sql b/macros/get_percentage_boundaries.sql new file mode 100644 index 0000000..4fa9258 --- /dev/null +++ b/macros/get_percentage_boundaries.sql @@ -0,0 +1,23 @@ +{% macro get_percentage_boundaries(tracked_boundaries) %} + + {% set percentage_boundaries = [] %} + + {% for element in var("snowplow__percent_progress_boundaries") %} + {% if element < 0 or element > 100 %} + {{ exceptions.raise_compiler_error("`snowplow__percent_progress_boundary` is outside the accepted range 0-100. Got: " ~ element) }} + + {% elif element % 1 != 0 %} + {{ exceptions.raise_compiler_error("`snowplow__percent_progress_boundary` needs to be a whole number. Got: " ~ element) }} + + {% else %} + {% do percentage_boundaries.append(element) %} + {% endif %} + {% endfor %} + + {% if 100 not in var("snowplow__percent_progress_boundaries") %} + {% do percentage_boundaries.append('100') %} + {% endif %} + + {{ return(percentage_boundaries) }} + + {% endmacro %} diff --git a/models/custom/snowplow_media_player_custom.yml b/models/custom/snowplow_media_player_custom.yml new file mode 100644 index 0000000..d9373df --- /dev/null +++ b/models/custom/snowplow_media_player_custom.yml @@ -0,0 +1,77 @@ +version: 2 + +models: + - name: snowplow_media_player_plays_by_session + description: '{{ doc("table_plays_by_session") }}' + columns: + - name: domain_sessionid + description: '{{ doc("col_domain_sessionid") }}' + tags: + - primary-key + tests: + - unique + - not_null + - name: domain_userid + description: '{{ doc("col_domain_userid") }}' + - name: impressions + description: '{{ doc("col_impressions") }}' + - name: videos_played + description: '{{ doc("col_videos_played") }}' + - name: audio_played + description: '{{ doc("col_audio_played") }}' + - name: video_plays + description: '{{ doc("col_video_plays") }}' + - name: audio_plays + description: '{{ doc("col_audio_plays") }}' + - name: valid_video_plays + description: '{{ doc("col_valid_video_plays") }}' + - name: valid_audio_plays + description: '{{ doc("col_valid_audio_plays") }}' + - name: start_tstamp + description: '{{ doc("col_start_tstamp") }}' + - name: end_tstamp + description: '{{ doc("col_end_tstamp") }}' + - name: seeks + description: '{{ doc("col_seeks") }}' + - name: play_time_sec + description: '{{ doc("col_play_time_sec") }}' + - name: play_time_sec_muted + description: '{{ doc("col_play_time_sec_muted") }}' + - name: avg_play_time_sec + description: '{{ doc("col_avg_play_time_sec") }}' + - name: avg_percent_played + description: '{{ doc("col_avg_percent_played") }}' + - name: complete_plays + description: '{{ doc("col_complete_plays") }}' + - name: snowplow_media_player_user_stats + description: '{{ doc("table_user_stats") }}' + columns: + - name: domain_userid + description: '{{ doc("col_domain_userid") }}' + tags: + - primary-key + tests: + - unique + - not_null + - name: first_play + description: '{{ doc("col_first_play") }}' + - name: last_play + description: '{{ doc("col_last_play") }}' + - name: video_plays + description: '{{ doc("col_video_plays") }}' + - name: audio_plays + description: '{{ doc("col_audio_plays") }}' + - name: valid_video_plays + description: '{{ doc("col_valid_video_plays") }}' + - name: valid_audio_plays + description: '{{ doc("col_valid_audio_plays") }}' + - name: complete_plays + description: '{{ doc("col_complete_plays") }}' + - name: seeks + description: '{{ doc("col_seeks") }}' + - name: play_time_min + description: '{{ doc("col_play_time_min") }}' + - name: avg_session_play_time_min + description: '{{ doc("col_avg_session_play_time_min") }}' + - name: avg_percent_played + description: '{{ doc("col_avg_percent_played") }}' diff --git a/models/custom/snowplow_media_player_session_stats.sql b/models/custom/snowplow_media_player_session_stats.sql new file mode 100644 index 0000000..3a8358a --- /dev/null +++ b/models/custom/snowplow_media_player_session_stats.sql @@ -0,0 +1,38 @@ +{{ + config( + materialized = 'table', + sort = 'start_tstamp', + dist = 'domain_sessionid' + ) +}} + +with prep as ( + + select + domain_sessionid, + domain_userid, + count(*) as impressions, + count(distinct case when media_type = 'video' and is_played then media_id end) as videos_played, + count(distinct case when media_type = 'audio' and is_played then media_id end) as audio_played, + sum(case when media_type = 'video' and is_played then 1 else 0 end) as video_plays, + sum(case when media_type = 'audio' and is_played then 1 else 0 end) as audio_plays, + sum(case when media_type = 'video' and is_valid_play then 1 else 0 end) as valid_video_plays, + sum(case when media_type = 'audio' and is_valid_play then 1 else 0 end) as valid_audio_plays, + min(start_tstamp) start_tstamp, + max(end_tstamp) as end_tstamp, + sum(seeks) as seeks, + sum(play_time_sec / cast(60 as {{ dbt_utils.type_float() }})) as play_time_min, + sum(play_time_sec_muted / cast(60 as {{ dbt_utils.type_float() }})) as play_time_min_muted, + coalesce(avg(case when is_played then play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) end), 0) as avg_play_time_min, + coalesce(avg(case when is_played then coalesce(play_time_sec / nullif(duration, 0), 0) end),0) as avg_percent_played, + sum(case when is_complete_play then 1 else 0 end) as complete_plays + + from {{ ref("snowplow_media_player_base") }} + + group by 1,2 + +) + +select * + +from prep diff --git a/models/custom/snowplow_media_player_user_stats.sql b/models/custom/snowplow_media_player_user_stats.sql new file mode 100644 index 0000000..7583c48 --- /dev/null +++ b/models/custom/snowplow_media_player_user_stats.sql @@ -0,0 +1,34 @@ +{{ + config( + materialized = 'table', + sort = 'first_play', + dist = 'domain_userid' + ) +}} + +with prep as ( + + select + domain_userid, + min(case when (video_plays + audio_plays) > 0 then start_tstamp end) as first_play, + max(case when (video_plays + audio_plays) > 0 then start_tstamp end) as last_play, + sum(video_plays) as video_plays, + sum(audio_plays) as audio_plays, + sum(valid_video_plays) as valid_video_plays, + sum(valid_audio_plays) as valid_audio_plays, + sum(complete_plays) as complete_plays, + sum(seeks) as seeks, + cast(sum(play_time_min) as {{ dbt_utils.type_int() }}) as play_time_min, + -- using session and not page_view as the base for average to save cost by not joining on snowplow_media_player_base for calculating on individual page_view level average + coalesce(cast(avg(case when (video_plays + audio_plays) > 0 then avg_play_time_min end) as {{ dbt_utils.type_int() }}), 0) as avg_session_play_time_min, + coalesce(avg(avg_percent_played),0) as avg_percent_played + + from {{ ref("snowplow_media_player_session_stats") }} + + group by 1 + +) + +select * + +from prep diff --git a/models/web/scratch/snowplow_media_player_base_this_run.sql b/models/web/scratch/snowplow_media_player_base_this_run.sql new file mode 100644 index 0000000..33108b2 --- /dev/null +++ b/models/web/scratch/snowplow_media_player_base_this_run.sql @@ -0,0 +1,139 @@ +{{ + config( + materialized='table', + tags=["this_run"], + sort = 'start_tstamp', + dist = 'play_id' + ) +}} + +with prep as ( + + select + i.play_id, + i.page_view_id, + i.media_id, + i.media_label, + i.domain_sessionid, + i.domain_userid, + max(i.duration) as duration, + i.media_type, + i.media_player_type, + i.page_referrer, + i.page_url, + max(i.source_url) as source_url, + i.geo_region_name, + i.br_name, + i.dvce_type, + i.os_name, + i.os_timezone, + min(start_tstamp) as start_tstamp, + max(start_tstamp) as end_tstamp, + sum(case when i.event_type = 'play' then 1 else 0 end) as plays, + sum(case when i.event_type in ('seek', 'seeked') then 1 else 0 end) as seeks, + sum(i.play_time_sec) as play_time_sec, + sum(i.play_time_sec_muted) as play_time_sec_muted, + coalesce(sum(i.playback_rate * i.play_time_sec) / nullif(sum(i.play_time_sec), 0), max(i.playback_rate)) as avg_playback_rate, + + {%- if target.type == 'redshift' -%} + listagg(percent_progress, ',') within group (order by percent_progress) as percent_progress_reached, + + {%- elif target.type == 'postgres' -%} + string_agg(i.percent_progress::varchar(10), ',' order by i.percent_progress) as percent_progress_reached, + + {%- else -%} + {{ exceptions.raise_compiler_error("Currently Redshift and Postgres targets are supported by the model. Got: " ~ target.type) }} + + {%- endif -%} + + min(case when i.event_type in ('seek', 'seeked') then start_tstamp end) as first_seek_time, + max(i.percent_progress) as max_percent_progress + + from {{ ref('snowplow_media_player_interactions_this_run') }} as i + + group by 1,2,3,4,5,6,8,9,10,11,13,14,15,16,17 + +) + +, dedupe as ( + + select + *, + row_number() over (partition by play_id order by start_tstamp) as duplicate_count + + from prep + +) + +, retention_rate as ( + + select + d.play_id, + max(i.percent_progress) as retention_rate + + from dedupe d + + inner join {{ ref("snowplow_media_player_interactions_this_run") }} i + on i.play_id = d.play_id + + where i.percent_progress is not null and (i.start_tstamp <= d.first_seek_time or d.first_seek_time is null) + + group by 1 + +) + +-- for correcting NULLs in case of 'ready' events only where the metadata showing the duration is usually missing as the event fires before it has time to load +, duration_fix as ( + + select + f.media_id, + max(f.duration) as duration + + from {{ ref('snowplow_media_player_interactions_this_run') }} as f + + group by 1 + +) + +select + d.play_id, + d.page_view_id, + d.media_id, + d.media_label, + d.domain_sessionid, + d.domain_userid, + f.duration, + d.media_type, + d.media_player_type, + d.page_referrer, + d.page_url, + d.source_url, + d.geo_region_name, + d.br_name, + d.dvce_type, + d.os_name, + d.os_timezone, + d.start_tstamp, + d.end_tstamp, + d.play_time_sec, + d.play_time_sec_muted, + d.plays > 0 as is_played, + case when d.play_time_sec > {{ var("snowplow__valid_play_sec") }} then true else false end is_valid_play, + case when play_time_sec / f.duration >= {{ var("snowplow__complete_play_rate") }} then true else false end as is_complete_play, + d.avg_playback_rate, + coalesce(case when r.retention_rate > d.max_percent_progress + then d.max_percent_progress / cast(100 as {{ dbt_utils.type_float() }}) + else r.retention_rate / cast(100 as {{ dbt_utils.type_float() }}) + end, 0) as retention_rate, -- to correct incorrect result due to duplicate session_id (one removed) + d.seeks, + d.percent_progress_reached + +from dedupe d + +left join retention_rate r +on r.play_id = d.play_id + +left join duration_fix f +on f.media_id = d.media_id + +where d.duplicate_count = 1 diff --git a/models/web/scratch/snowplow_media_player_interactions_this_run.sql b/models/web/scratch/snowplow_media_player_interactions_this_run.sql new file mode 100644 index 0000000..2e4bd23 --- /dev/null +++ b/models/web/scratch/snowplow_media_player_interactions_this_run.sql @@ -0,0 +1,69 @@ +{{ + config( + materialized='table', + tags=["this_run"], + sort = 'start_tstamp', + dist = 'event_id' + ) +}} + +with prep as ( + + select + e.event_id, + e.page_view_id, + e.domain_sessionid, + e.domain_userid, + coalesce(y.player_id, me.html_id) as media_id, + mpe.label as media_label, + {{ dbt_utils.surrogate_key(['e.page_view_id', 'coalesce(y.player_id, me.html_id)' ]) }} play_id, + round(mp.duration) as duration, + case when me.media_type = 'audio' then 'audio' else 'video' end as media_type, + coalesce(y.schema_vendor||'-'||y.schema_name, me.schema_vendor||'-'||me.schema_name) as media_player_type, + e.page_referrer, + e.page_url, + coalesce(y.url, me.current_src) as source_url, + e.geo_region_name, + e.br_name, + e.dvce_type, + e.os_name, + e.os_timezone, + mpe.type as event_type, + e.derived_tstamp as start_tstamp, + mp.current_time as player_current_time, + coalesce(mp.playback_rate, 1) as playback_rate, + coalesce(y.playback_quality, ve.video_height||'x'||ve.video_width) as playback_quality, + case when mpe.type = 'ended' then 100 else mp.percent_progress end percent_progress, + mp.muted as is_muted, + mp.is_live, + mp.loop, + mp.volume + + from {{ ref("snowplow_web_base_events_this_run") }} as e + + inner join {{ source('atomic', 'com_snowplowanalytics_snowplow_media_player_event_1') }} as mpe + on mpe.root_id = e.event_id and mpe.root_tstamp = e.collector_tstamp + + left join {{ source('atomic', 'com_snowplowanalytics_snowplow_media_player_1') }} as mp + on mp.root_id = e.event_id and mp.root_tstamp = e.collector_tstamp + + left join {{ source('atomic', 'com_youtube_youtube_1') }} as y + on y.root_id = e.event_id and y.root_tstamp = e.collector_tstamp + + left join {{ source('atomic', 'org_whatwg_media_element_1') }} as me + on me.root_id = e.event_id and me.root_tstamp = e.collector_tstamp + + left join {{ source('atomic', 'org_whatwg_video_element_1') }} as ve + on ve.root_id = e.event_id and ve.root_tstamp = e.collector_tstamp + +) + + select + p.*, + coalesce(cast(piv.weight_rate * p.duration / 100 as {{ dbt_utils.type_int() }}), 0) as play_time_sec, + coalesce(cast(case when p.is_muted then piv.weight_rate * p.duration / 100 end as {{ dbt_utils.type_int() }}), 0) as play_time_sec_muted + + from prep p + + left join {{ ref("snowplow_media_player_pivot_base") }} piv + on p.percent_progress = piv.percent_progress diff --git a/models/web/scratch/snowplow_media_player_pivot_base.sql b/models/web/scratch/snowplow_media_player_pivot_base.sql new file mode 100644 index 0000000..9a47996 --- /dev/null +++ b/models/web/scratch/snowplow_media_player_pivot_base.sql @@ -0,0 +1,42 @@ +{{ + config( + materialized='table' + ) +}} + +with prep as ( + + {% for element in get_percentage_boundaries(var("snowplow__percent_progress_boundaries")) %} + + select + + {{ element }} as percent_progress + + {% if not loop.last %} + + union all + + {% endif %} + + {% endfor %} + +) + +, weight_calc as ( + + select + percent_progress, + percent_progress - lag(percent_progress, 1) over(order by percent_progress) as weight_rate, + first_value(percent_progress) over(order by percent_progress rows between unbounded preceding and unbounded following) as first_item + + from prep + + order by percent_progress + +) + +select + percent_progress, + coalesce(weight_rate, first_item) as weight_rate + +from weight_calc diff --git a/models/web/scratch/snowplow_media_player_scratch.yml b/models/web/scratch/snowplow_media_player_scratch.yml new file mode 100644 index 0000000..2688098 --- /dev/null +++ b/models/web/scratch/snowplow_media_player_scratch.yml @@ -0,0 +1,147 @@ +version: 2 + +models: + - name: snowplow_media_player_interactions_this_run + description: '{{ doc("table_interactions_this_run") }}' + columns: + - name: event_id + description: '{{ doc("col_event_id") }}' + tags: + - primary-key + tests: + - unique + - not_null + - name: page_view_id + description: '{{ doc("col_page_view_id") }}' + - name: domain_sessionid + description: '{{ doc("col_domain_sessionid") }}' + - name: domain_userid + description: '{{ doc("col_domain_userid") }}' + - name: media_id + description: '{{ doc("col_media_id") }}' + - name: media_label + description: '{{ doc("col_media_label") }}' + - name: play_id + description: '{{ doc("col_play_id") }}' + - name: duration + description: '{{ doc("col_duration") }}' + - name: media_type + description: '{{ doc("col_media_type") }}' + - name: media_player_type + description: '{{ doc("col_media_player_type") }}' + - name: page_referrer + description: '{{ doc("col_page_referrer") }}' + - name: page_url + description: '{{ doc("col_page_url") }}' + - name: source_url + description: '{{ doc("col_source_url") }}' + - name: geo_region_name + description: '{{ doc("col_geo_region_name") }}' + - name: br_name + description: '{{ doc("col_br_name") }}' + - name: dvce_type + description: '{{ doc("col_dvce_type") }}' + - name: os_name + description: '{{ doc("col_os_name") }}' + - name: os_timezone + description: '{{ doc("col_os_timezone") }}' + - name: event_type + description: '{{ doc("col_event_type") }}' + - name: start_tstamp + description: '{{ doc("col_start_tstamp") }}' + - name: player_current_time + description: '{{ doc("col_player_current_time") }}' + - name: playback_rate + description: '{{ doc("col_playback_rate") }}' + - name: playback_quality + description: '{{ doc("col_playback_quality") }}' + - name: percent_progress + description: '{{ doc("col_percent_progress") }}' + - name: is_muted + description: '{{ doc("col_is_muted") }}' + - name: play_time_sec + description: '{{ doc("col_play_time_sec") }}' + - name: play_time_sec_muted + description: '{{ doc("col_play_time_sec_muted") }}' + - name: is_live + description: '{{ doc("col_is_live") }}' + - name: loop + description: '{{ doc("col_loop") }}' + - name: volume + description: '{{ doc("col_volume") }}' + - name: snowplow_media_player_base_this_run + description: '{{ doc("table_base_this_run") }}' + columns: + - name: play_id + description: '{{ doc("col_play_id") }}' + tags: + - primary-key + tests: + - unique + - not_null + - name: page_view_id + description: '{{ doc("col_page_view_id") }}' + - name: media_id + description: '{{ doc("col_media_id") }}' + - name: media_label + description: '{{ doc("col_media_label") }}' + - name: domain_sessionid + description: '{{ doc("col_domain_sessionid") }}' + - name: domain_userid + description: '{{ doc("col_domain_userid") }}' + - name: duration + description: '{{ doc("col_duration") }}' + - name: media_type + description: '{{ doc("col_media_type") }}' + - name: media_player_type + description: '{{ doc("col_media_player_type") }}' + - name: page_referrer + description: '{{ doc("col_page_referrer") }}' + - name: page_url + description: '{{ doc("col_page_url") }}' + - name: source_url + description: '{{ doc("col_source_url") }}' + - name: geo_region_name + description: '{{ doc("col_geo_region_name") }}' + - name: br_name + description: '{{ doc("col_br_name") }}' + - name: dvce_type + description: '{{ doc("col_dvce_type") }}' + - name: os_name + description: '{{ doc("col_os_name") }}' + - name: os_timezone + description: '{{ doc("col_os_timezone") }}' + - name: start_tstamp + description: '{{ doc("col_start_tstamp") }}' + - name: end_tstamp + description: '{{ doc("col_end_tstamp") }}' + - name: play_time_sec + description: '{{ doc("col_play_time_sec") }}' + - name: play_time_sec_muted + description: '{{ doc("col_play_time_sec_muted") }}' + - name: is_played + description: '{{ doc("col_is_played") }}' + - name: is_valid_play + description: '{{ doc("col_is_valid_play") }}' + - name: is_complete_play + description: '{{ doc("col_is_complete_play") }}' + - name: avg_playback_rate + description: '{{ doc("col_avg_playback_rate") }}' + - name: retention_rate + description: '{{ doc("col_retention_rate") }}' + - name: seeks + description: '{{ doc("col_seeks") }}' + - name: percent_progress_reached + description: '{{ doc("col_percent_progress_reached") }}' + - name: snowplow_media_player_pivot_base + description: '{{ doc("table_pivot_base") }}' + columns: + - name: percent_progress + description: '{{ doc("col_percent_progress") }}' + tags: + - primary-key + tests: + - unique + - not_null + - name: weight_rate + description: '{{ doc("col_weight_rate") }}' diff --git a/models/web/snowplow_media_player.yml b/models/web/snowplow_media_player.yml new file mode 100644 index 0000000..16fc81d --- /dev/null +++ b/models/web/snowplow_media_player.yml @@ -0,0 +1,177 @@ +version: 2 + +models: + - name: snowplow_media_player_base + description: '{{ doc("table_base") }}' + columns: + - name: play_id + description: '{{ doc("col_play_id") }}' + tags: + - primary-key + tests: + - unique + - not_null + - name: page_view_id + description: '{{ doc("col_page_view_id") }}' + - name: media_id + description: '{{ doc("col_media_id") }}' + - name: media_label + description: '{{ doc("col_media_label") }}' + - name: domain_sessionid + description: '{{ doc("col_domain_sessionid") }}' + - name: domain_userid + description: '{{ doc("col_domain_userid") }}' + - name: duration + description: '{{ doc("col_duration") }}' + - name: media_type + description: '{{ doc("col_media_type") }}' + - name: media_player_type + description: '{{ doc("col_media_player_type") }}' + - name: page_referrer + description: '{{ doc("col_page_referrer") }}' + - name: page_url + description: '{{ doc("col_page_url") }}' + - name: source_url + description: '{{ doc("col_source_url") }}' + - name: geo_region_name + description: '{{ doc("col_geo_region_name") }}' + - name: br_name + description: '{{ doc("col_br_name") }}' + - name: dvce_type + description: '{{ doc("col_dvce_type") }}' + - name: os_name + description: '{{ doc("col_os_name") }}' + - name: os_timezone + description: '{{ doc("col_os_timezone") }}' + - name: start_tstamp + description: '{{ doc("col_start_tstamp") }}' + - name: end_tstamp + description: '{{ doc("col_end_tstamp") }}' + - name: play_time_sec + description: '{{ doc("col_play_time_sec") }}' + - name: play_time_sec_muted + description: '{{ doc("col_play_time_sec_muted") }}' + - name: is_played + description: '{{ doc("col_is_played") }}' + - name: is_valid_play + description: '{{ doc("col_is_valid_play") }}' + - name: is_complete_play + description: '{{ doc("col_is_complete_play") }}' + - name: avg_playback_rate + description: '{{ doc("col_avg_playback_rate") }}' + - name: retention_rate + description: '{{ doc("col_retention_rate") }}' + - name: seeks + description: '{{ doc("col_seeks") }}' + - name: percent_progress_reached + description: '{{ doc("col_percent_progress_reached") }}' + - name: snowplow_media_player_plays_by_pageview + description: '{{ doc("table_plays_by_pageview") }}' + columns: + - name: play_id + description: '{{ doc("col_play_id") }}' + tags: + - primary-key + tests: + - unique + - not_null + - name: page_view_id + description: '{{ doc("col_page_view_id") }}' + - name: media_id + description: '{{ doc("col_media_id") }}' + - name: media_label + description: '{{ doc("col_media_label") }}' + - name: domain_sessionid + description: '{{ doc("col_domain_sessionid") }}' + - name: domain_userid + description: '{{ doc("col_domain_userid") }}' + - name: duration + description: '{{ doc("col_duration") }}' + - name: media_type + description: '{{ doc("col_media_type") }}' + - name: media_player_type + description: '{{ doc("col_media_player_type") }}' + - name: page_referrer + description: '{{ doc("col_page_referrer") }}' + - name: page_url + description: '{{ doc("col_page_url") }}' + - name: source_url + description: '{{ doc("col_source_url") }}' + - name: geo_region_name + description: '{{ doc("col_geo_region_name") }}' + - name: br_name + description: '{{ doc("col_br_name") }}' + - name: dvce_type + description: '{{ doc("col_dvce_type") }}' + - name: os_name + description: '{{ doc("col_os_name") }}' + - name: os_timezone + description: '{{ doc("col_os_timezone") }}' + - name: start_tstamp + description: '{{ doc("col_start_tstamp") }}' + - name: end_tstamp + description: '{{ doc("col_end_tstamp") }}' + - name: play_time_sec + description: '{{ doc("col_play_time_sec") }}' + - name: play_time_sec_muted + description: '{{ doc("col_play_time_sec_muted") }}' + - name: is_played + description: '{{ doc("col_is_played") }}' + - name: is_valid_play + description: '{{ doc("col_is_valid_play") }}' + - name: is_complete_play + description: '{{ doc("col_is_complete_play") }}' + - name: avg_playback_rate + description: '{{ doc("col_avg_playback_rate") }}' + - name: retention_rate + description: '{{ doc("col_retention_rate") }}' + - name: seeks + description: '{{ doc("col_seeks") }}' + - name: percent_progress_reached + description: '{{ doc("col_percent_progress_reached") }}' + - name: snowplow_media_player_media_stats + description: '{{ doc("table_media_stats") }}' + columns: + - name: media_id + description: The primary key of this table + tags: + - primary-key + tests: + - unique + - not_null + - name: media_label + description: '{{ doc("col_media_label") }}' + - name: duration + description: '{{ doc("col_duration") }}' + - name: media_type + description: '{{ doc("col_media_type") }}' + - name: media_player_type + description: '{{ doc("col_media_player_type") }}' + - name: play_time_min + description: '{{ doc("col_play_time_min") }}' + - name: avg_play_time_min + description: '{{ doc("col_avg_play_time_min") }}' + - name: first_play + description: '{{ doc("col_first_play") }}' + - name: last_play + description: '{{ doc("col_last_play") }}' + - name: plays + description: '{{ doc("col_plays") }}' + - name: valid_plays + description: '{{ doc("col_valid_plays") }}' + - name: complete_plays + description: '{{ doc("col_complete_plays") }}' + - name: impressions + description: '{{ doc("col_impressions") }}' + - name: avg_playback_rate + description: '{{ doc("col_avg_playback_rate") }}' + - name: play_rate + description: '{{ doc("col_play_rate") }}' + - name: completion_rate_by_plays + description: '{{ doc("col_completion_rate_by_plays") }}' + - name: avg_percent_played + description: '{{ doc("col_avg_percent_played") }}' + - name: avg_retention_rate + description: '{{ doc("col_retention_rate") }}' + - name: last_base_tstamp + description: '{{ doc("col_last_base_tstamp") }}' diff --git a/models/web/snowplow_media_player_base.sql b/models/web/snowplow_media_player_base.sql new file mode 100644 index 0000000..f7f58e7 --- /dev/null +++ b/models/web/snowplow_media_player_base.sql @@ -0,0 +1,16 @@ +{{ + config( + materialized= var("snowplow__incremental_materialization", 'snowplow_incremental'), + upsert_date_key='start_tstamp', + unique_key = 'play_id', + sort = 'start_tstamp', + dist = 'play_id', + tags=["derived"] + ) +}} + +select * + +from {{ ref('snowplow_media_player_base_this_run') }} + +where {{ snowplow_utils.is_run_with_new_events('snowplow_web') }} --returns false if run doesn't contain new events. diff --git a/models/web/snowplow_media_player_media_stats.sql b/models/web/snowplow_media_player_media_stats.sql new file mode 100644 index 0000000..a5a6f14 --- /dev/null +++ b/models/web/snowplow_media_player_media_stats.sql @@ -0,0 +1,318 @@ +{{ + config( + materialized= 'incremental', + unique_key = 'media_id', + sort = 'last_play', + dist = 'media_id', + tags=["derived"] + ) +}} + +{% if is_incremental() %} + +with new_data as ( + + select + p.media_id, + p.media_label, + max(p.duration) as duration, + p.media_type, + p.media_player_type, + min(case when is_played then p.start_tstamp end) as first_play, + max(case when is_played then p.start_tstamp end) as last_play, + sum(p.play_time_sec) as play_time_sec, + sum(case when is_played then 1 else 0 end) as plays, + sum(case when is_valid_play then 1 else 0 end) as valid_plays, + sum(case when p.is_complete_play then 1 else 0 end) as complete_plays, + count(distinct p.page_view_id) as impressions, + avg(case when is_played then coalesce(p.play_time_sec, 0) / nullif(p.duration, 0) end) as avg_percent_played, + avg(case when is_played then p.retention_rate end) as avg_retention_rate, + avg(case when is_played then p.avg_playback_rate end) as avg_playback_rate, + max(start_tstamp) as last_base_tstamp + +from {{ ref("snowplow_media_player_base") }} p + +where -- enough time has passed since the page_view's start_tstamp to be able to process it as a whole (please bear in mind the late arriving data) +p.start_tstamp < {{ dbt_utils.dateadd('hour', var("snowplow__max_media_pv_window", 10), dbt_utils.current_timestamp_in_utc() ) }} +-- and it has not been processed yet +and p.start_tstamp > ( select max(last_base_tstamp) from {{ this }} ) + +group by 1,2,4,5 + +) + +, prep as ( + + select + n.media_id, + n.media_label, + greatest(n.duration, coalesce(t.duration, 0)) as duration, + n.media_type, + n.media_player_type, + n.last_base_tstamp, + least(n.first_play, coalesce(t.first_play, '2999-01-01 00:00:00')) as first_play, + greatest(n.last_play, coalesce(t.last_play, '2000-01-01 00:00:00')) as last_play, + n.play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) + coalesce(t.play_time_min, 0) as play_time_min, + (n.play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) + coalesce(t.play_time_min, 0)) / (n.plays + coalesce(t.plays, 0)) as avg_play_time_min, + n.plays + coalesce(t.plays, 0) as plays, + n.valid_plays + coalesce(t.valid_plays, 0) as valid_plays, + n.complete_plays + coalesce(t.complete_plays, 0) as complete_plays, + n.impressions + coalesce(t.impressions, 0) as impressions, + -- weighted average calculations + (n.avg_percent_played * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_percent_played, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_percent_played, + (n.avg_retention_rate * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_retention_rate, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_retention_rate, + (n.avg_playback_rate * n.plays / (n.plays + coalesce(t.plays, 0))) + (coalesce(t.avg_playback_rate, 0) * coalesce(t.plays, 0) / (n.plays + coalesce(t.plays, 0))) as avg_playback_rate + + from new_data n + + left join {{ this }} t + on n.media_id = t.media_id + +) + +, percent_progress_reached as ( + + select + media_id, + + {%- if target.type == 'redshift' %} + split_to_array(p.percent_progress_reached) as percent_progress_reached + + {%- elif target.type == 'postgres' %} + string_to_array(p.percent_progress_reached, ',') as percent_progress_reached + + {%- else -%} + {{ exceptions.raise_compiler_error("Currently Redshift and Postgres targets are supported by the model. Got: " ~ target.type) }} + + {%- endif %} + + + from {{ ref("snowplow_media_player_base") }} p + + where -- enough time has passed since the page_view`s start_tstamp to be able to process it a a whole (please bear in mind the late arriving data) + + p.start_tstamp < {{ dbt_utils.dateadd('hour', var("snowplow__max_media_pv_window", 10), dbt_utils.current_timestamp_in_utc() ) }} + + -- and it has not been processed yet + and p.start_tstamp > ( select max(last_base_tstamp) from {{ this }} ) + +) + +{%- if target.type == 'redshift' %} + +, unnesting as ( + +select media_id, value_reached + +from percent_progress_reached p, p.percent_progress_reached as value_reached + +) + +{%- elif target.type == 'postgres' %} + +, unnesting as ( + +select media_id, cast(trim(unnest(percent_progress_reached)) as {{ dbt_utils.type_int() }}) as value_reached + +from percent_progress_reached + +) + +{%- else -%} +{{ exceptions.raise_compiler_error("Currently Redshift and Postgres targets are supported by the model. Got: " ~ target.type) }} + +{% endif %} + +, pivoting as ( + + select + u.media_id, + {{ dbt_utils.pivot( + column='u.value_reached', + values=dbt_utils.get_column_values( table=ref('snowplow_media_player_pivot_base'), column='percent_progress', default=[]) | sort, + alias=True, + agg='sum', + cmp='=', + prefix='_', + suffix='_percent_reached', + quote_identifiers=FALSE + ) }} + + from unnesting u + + group by 1 + +) + +, addition as ( + + select + coalesce(p.media_id, t.media_id) as media_id, + + {% for element in get_percentage_boundaries(var("snowplow__percent_progress_boundaries")) %} + + {% set element_string = element | string() %} + + {% set alias = '_' + element_string + '_percent_reached' %} + + coalesce(p._{{ element_string }}_percent_reached, 0) + + coalesce(t._{{ element_string }}_percent_reached, 0) + as {{ alias }} + + {% if not loop.last %} + + , + + {% endif %} + + {% endfor %} + + from pivoting p + + full outer join {{ this }} t + on t.media_id = p.media_id + +) + +{% else %} + +with prep as ( + + select + p.media_id, + p.media_label, + max(p.duration) as duration, + p.media_type, + p.media_player_type, + max(start_tstamp) as last_base_tstamp, + min(case when is_played then p.start_tstamp end) as first_play, + max(case when is_played then p.start_tstamp end) as last_play, + sum(p.play_time_sec) / cast(60 as {{ dbt_utils.type_float() }}) as play_time_min, + avg(case when is_played then p.play_time_sec / cast(60 as {{ dbt_utils.type_float() }}) end) as avg_play_time_min, + sum(case when is_played then 1 else 0 end) as plays, + sum(case when is_valid_play then 1 else 0 end) as valid_plays, + sum(case when p.is_complete_play then 1 else 0 end) as complete_plays, + count(distinct p.page_view_id) as impressions, + avg(case when is_played then coalesce(p.play_time_sec / nullif(p.duration, 0), 0) end) as avg_percent_played, + avg(case when is_played then p.retention_rate end) as avg_retention_rate, + avg(case when is_played then p.avg_playback_rate end) as avg_playback_rate + + +from {{ ref("snowplow_media_player_base") }} p + +group by 1,2,4,5 + +) + +, percent_progress_reached as ( + + select + media_id, + + {%- if target.type == 'redshift' %} + split_to_array(p.percent_progress_reached) as percent_progress_reached + + {%- elif target.type == 'postgres' %} + string_to_array(p.percent_progress_reached, ',') as percent_progress_reached + + {%- else -%} + {{ exceptions.raise_compiler_error("Currently Redshift and Postgres targets are supported by the model. Got: " ~ target.type) }} + + {%- endif %} + + + from {{ ref("snowplow_media_player_base") }} p + +) + +{%- if target.type == 'redshift' %} + +, unnesting as ( + +select media_id, value_reached + +from percent_progress_reached p, p.percent_progress_reached as value_reached + +) + +{%- elif target.type == 'postgres' %} + +, unnesting as ( + +select media_id, cast(trim(unnest(percent_progress_reached)) as {{ dbt_utils.type_int() }}) as value_reached + +from percent_progress_reached + +) + +{%- else -%} +{{ exceptions.raise_compiler_error("Currently Redshift and Postgres targets are supported by the model. Got: " ~ target.type) }} + +{% endif %} + +{% endif %} + + +select + p.media_id, + p.media_label, + p.duration, + p.media_type, + p.media_player_type, + p.play_time_min, + p.avg_play_time_min, + p.first_play, + p.last_play, + p.plays, + p.valid_plays, + p.complete_plays, + p.impressions, + p.avg_playback_rate, + p.plays / cast(p.impressions as {{ dbt_utils.type_float() }}) as play_rate, + p.complete_plays / cast(nullif(p.plays, 0) as {{ dbt_utils.type_float() }}) as completion_rate_by_plays, + p.avg_percent_played, + p.avg_retention_rate, + l.last_base_tstamp, + +{% if is_incremental() %} + + {% for element in get_percentage_boundaries(var("snowplow__percent_progress_boundaries")) %} + coalesce(cast(a._{{ element }}_percent_reached as {{ dbt_utils.type_int() }}), 0) as _{{ element }}_percent_reached + {% if not loop.last %} + , + {% endif %} + {% endfor %} + +{% else %} + + {{ dbt_utils.pivot( + column='un.value_reached', + values=dbt_utils.get_column_values( table=ref('snowplow_media_player_pivot_base'), column='percent_progress', default=[]) | sort, + alias=True, + agg='sum', + cmp='=', + prefix='_', + suffix='_percent_reached', + quote_identifiers=FALSE + ) }} + +{% endif %} + +from prep p + +left join (select max(last_base_tstamp) as last_base_tstamp from prep ) l +on 1 = 1 + +{% if is_incremental() %} + +left join addition a +on a.media_id = p.media_id + +{% else %} + +left join unnesting un +on un.media_id = p.media_id + +group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 + +{% endif %} diff --git a/models/web/snowplow_media_player_plays_by_pageview.sql b/models/web/snowplow_media_player_plays_by_pageview.sql new file mode 100644 index 0000000..786c82a --- /dev/null +++ b/models/web/snowplow_media_player_plays_by_pageview.sql @@ -0,0 +1,12 @@ +{{ + config( + materialized='view', + tags=["derived"] + ) +}} + +select * + +from {{ ref("snowplow_media_player_base") }} + +where is_played diff --git a/models/web/sources.yml b/models/web/sources.yml new file mode 100644 index 0000000..e6af49c --- /dev/null +++ b/models/web/sources.yml @@ -0,0 +1,19 @@ +version: 2 + +sources: + - name: atomic + schema: "{{ var('snowplow__atomic_schema', 'atomic') }}" + database: "{{ var('snowplow__database', target.database) }}" + tables: + - name: com_snowplowanalytics_snowplow_web_page_1 + description: '{{ doc("table_page_view_context") }}' + - name: com_snowplowanalytics_snowplow_media_player_event_1 + description: '{{ doc("table_media_player_event") }}' + - name: com_snowplowanalytics_snowplow_media_player_1 + description: '{{ doc("table_media_player_context") }}' + - name: com_youtube_youtube_1 + description: '{{ doc("table_youtube_context") }}' + - name: org_whatwg_media_element_1 + description: '{{ doc("table_html_media_element_context") }}' + - name: org_whatwg_video_element_1 + description: '{{ doc("table_html_video_element_context") }}' diff --git a/packages.yml b/packages.yml new file mode 100644 index 0000000..df548e1 --- /dev/null +++ b/packages.yml @@ -0,0 +1,5 @@ +packages: + - package: dbt-labs/dbt_utils + version: [">=0.8.0", "<0.9.0"] + - package: snowplow/snowplow_web + version: [">=0.6.0", "<0.7.0"] diff --git a/selectors.yml b/selectors.yml new file mode 100644 index 0000000..485dfb6 --- /dev/null +++ b/selectors.yml @@ -0,0 +1,87 @@ +selectors: + - name: snowplow_web_lean_and_media_player_tests + # Description field added dbt v0.19. Commenting out for compatibility. + # description: > + # Suggested testing implementation for the Snowplow Media Player and Web package. Lean approach, essential tests rather than full suite to save cost. + # Tests: + # - All tests on Snowplow Web this_run and manifest tables. + # - Primary key and data tests on the Snowplow Web derived tables (page_views, sessions and users) + # - All tests on any custom models in your dbt project, tagged with `snowplow_web_incremental`. + # - All tests within the Snowplow Media Player package. + # - All tests on any custom models in your dbt project, tagged with `snowplow_media_player`. + definition: + union: + - intersection: + - method: package + value: snowplow_web + - method: tag + value: this_run + - intersection: + - method: package + value: snowplow_web + - method: tag + value: manifest + - intersection: + - method: package + value: snowplow_web + - method: tag + value: derived + - method: tag + value: primary-key + - intersection: + - method: package + value: snowplow_web + - method: tag + value: derived + - method: test_type + value: data + - intersection: + - method: path + value: models + - method: tag + value: snowplow_web_incremental + - method: package + value: snowplow_media_player + - method: tag + value: snowplow_media_player + - name: snowplow_media_player_tests + # Tests: + # - All tests within the Snowplow Media Player package. + # - All tests on any custom models in your dbt project, tagged with `snowplow_media_player`. + definition: + union: + - method: package + value: snowplow_media_player + - intersection: + - method: path + value: models + - method: tag + value: snowplow_media_player + - name: snowplow_web_and_media_player_tests + # description: > + # Runs: + # - All Snowplow Web and Media Player models. + # - All custom models in your dbt project, tagged with `snowplow_web_incremental` or `snowplow_media_player` . + definition: + union: + - method: package + value: snowplow_web + - method: tag + value: snowplow_web_incremental + - method: package + value: snowplow_media_player + - method: tag + value: snowplow_media_player + - name: snowplow_web + # description: > + # Suggested node selection when running the Snowplow Web package together with the Media Player package. + # Runs: + # - All Snowplow Web and Media Player models. + # - All custom models in your dbt project, tagged with `snowplow_web_incremental`. + definition: + union: + - method: package + value: snowplow_web + - method: tag + value: snowplow_web_incremental + diff --git a/snapshots/.gitkeep b/snapshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/.gitkeep b/tests/.gitkeep new file mode 100644 index 0000000..e69de29