dbt-labs / dbt-labs-experimental-features

dbt support for database features which are not yet supported natively in dbt-core
Apache License 2.0
147 stars 43 forks source link

`dbt deps` errors when importing `insert_by_period` package from dbt-labs-experimental-features/insert_by_period #34

Closed GClunies closed 2 years ago

GClunies commented 2 years ago

Describe the error

When running dbt deps to import dbt packages specified in packages.yml, any reference to the now moved insert_by_period materialization package results in an error on import.

I am using the new insert_by_period reference because when I use insert_by_period from dbt_utils, dbt returns a poorly formatted warning message that makes it look like something has gone seriously wrong, when it has not.

Warning: the `insert_by_period` materialization will be removed from dbt_utils in version 1.0.0. Install from dbt-labs/dbt-labs-experimental-features instead (see https://github.com/dbt-labs/dbt-utils/discussions/487). The .{'raw_sql': '{#-\nGoal: This model unions Segment page(), screen(), and track() calls from all\n      Surfline applications. It is the input to our sessionization logic.\nGranularity: Each row is a Segment call (page/screen/track)\nNotes/Assumptions/Caveats:\n    - We use the insert_by_period materialization so that--full-refresh runs\n      of this model don\'t timeout on dbt cloud.\n    - We flag each call with a `include_in_session` flag so we know whether or\n      not it is elegible for sessionization.\n    - Lots of data casting to ensure UNION work. Required since we have\n      varying data types from inconsistent instrumentation across platforms.\n-#}\n\n{#- Limit data in dev #}\n{%- if target.name == \'dev\' -%}\n{%- set start_date = (run_started_at - modules.datetime.timedelta(var(\'dev_lookback_days\'))).isoformat()[:10] -%}\n{# {%- set start_date = var(\'dev_start_date\') -%} #}\n{%- else -%}\n{#- First day Segment data collected #}\n{%- set start_date = \'2018-01-01\' -%}  {# First day of Segment data collected #}\n{%- endif -%}\n{%- set stop_date = run_started_at.strftime("%Y-%m-%d") -%}\n\n{{\n    config(\n        materialized = "insert_by_period",\n        period = "day",\n        timestamp_field = "received_at_tstamp",\n        start_date = start_date,\n        stop_date = stop_date,\n        unique_key = "segment_id",\n        sort = "tstamp",\n        dist = "segment_id"\n    )\n}}\n\nwith\n\nraw_a_screens as (\n\n    select *\n\n    from {{ ref(\'stg_surfline_android__screens\') }}\n    where __PERIOD_FILTER__\n\n),\n\na_screens as (\n\n    select\n        screen_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        {{ map_subscription_brand(\'source_schema\')|indent(8) }}::varchar(256) as brand,\n        {{ map_source_schema_to_platform(\'source_schema\')|indent(8) }}::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        screen_name::varchar(256) as screen_name,\n        null::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_timezone,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        screen_density::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n        true::boolean as include_in_session\n\n    from raw_a_screens\n\n),\n\nraw_i_screens as (\n\n    select *\n\n    from {{ ref(\'stg_surfline_ios__screens\') }}\n    where __PERIOD_FILTER__\n\n),\n\ni_screens as (\n\n    select\n        screen_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        {{ map_subscription_brand(\'source_schema\')|indent(8) }}::varchar(256) as brand,\n        {{ map_source_schema_to_platform(\'source_schema\')|indent(8) }}::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        screen_name::varchar(256) as screen_name,\n        null::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_timezone,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n        true::boolean as include_in_session\n\n    from raw_i_screens\n\n),\n\nraw_w_pages as (\n\n    select *\n\n    from {{ ref(\'stg_surfline_web__pages\') }}\n    where __PERIOD_FILTER__\n\n),\n\nw_pages_tf as (\n\n    select\n        page_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        {{ map_subscription_brand(\'source_schema\')|indent(8) }}::varchar(256) as brand,\n        page_name::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        null::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        null::varchar(256) as app_name,\n        null::varchar(256) as app_version,\n        null::varchar(256) as app_build,\n        null::varchar(256) as device_os_name,\n        null::varchar(256) as device_os_version,\n        null::varchar(256) as device_id,\n        null::varchar(256) as device_manufacturer,\n        null::varchar(256) as device_type,\n        null::varchar(256) as device_model,\n        null::varchar(256) as device_timezone,\n        null::bigint as screen_height,\n        null::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        null::varchar(256) as network_carrier,\n        null::boolean as network_cellular,\n        null::boolean as network_wifi,\n        null::boolean as network_bluetooth,\n        null::boolean as ad_tracking_enabled,\n        null::varchar(256) as advertising_id,\n        page_url::varchar(256) as page_url,\n        page_url_path::varchar(256) as page_url_path,\n        page_url_query::varchar(256) as page_url_query,\n        page_title::varchar(256) as page_title,\n        page_referrer::varchar(256) as page_referrer,\n        utm_source::varchar(256) as utm_source,\n        utm_medium::varchar(256) as utm_medium,\n        utm_campaign::varchar(256) as utm_campaign,\n        utm_term::varchar(256) as utm_term,\n        utm_content::varchar(256) as utm_content,\n        user_agent::varchar(256) as user_agent,\n\n        -- Reference: https://github.com/dbt-labs/segment/blob/45a6602b7b2f552fa575dce7487af5d64f47aa90/models/base/segment_web_page_views.sql#L58-L63\n        case\n            when lower(user_agent) like \'%android%\' then \'Android\'\n            else replace(\n                {{ split_part(split_part(\'user_agent\', "\'(\'", 2), "\' \'", 1) }},\n                \';\', \'\')\n        end::varchar(256) as user_agent_device,\n\n        {{ dbt_utils.get_url_parameter(\'page_url\', \'native\') }}::varchar(256) as is_native_web_view,\n\n        {# We leverage \'native web views\' in our mobile apps, which fire\n         Segment page() calls. So we need to parse the mobile pages and assign\n         them to their repsective platform based on the device. #}\n        case\n            when is_native_web_view != \'true\'\n                or user_agent_device in (\'Macintosh\', \'Windows\')\n                then \'web\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in (\'iPhone\', \'iPad\', \'iPod\')\n                then \'ios\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in ( \'Android\')\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n\n        true::boolean as include_in_session\n\n    from raw_w_pages\n\n),\n\nw_pages as (\n\n    select\n        segment_id,\n        source_schema,\n        source_table,\n        tracking_plan,\n        brand,\n        platform,  -- Reorder for union\n        page_name,\n        screen_name,\n        event_name,\n        call_type,\n        library_name,\n        library_version,\n        sent_at_tstamp,\n        received_at_tstamp,\n        tstamp,\n        anonymous_id,\n        user_id,\n        app_name,\n        app_version,\n        app_build,\n        device_os_name,\n        device_os_version,\n        device_id,\n        device_manufacturer,\n        device_type,\n        device_model,\n        device_timezone,\n        screen_height,\n        screen_width,\n        screen_density,\n        ip,\n        locale,\n        network_carrier,\n        network_cellular,\n        network_wifi,\n        network_bluetooth,\n        ad_tracking_enabled,\n        advertising_id,\n        page_url,\n        page_url_path,\n        page_url_query,\n        page_title,\n        page_referrer,\n        utm_source,\n        utm_medium,\n        utm_campaign,\n        utm_term,\n        utm_content,\n        user_agent,\n        user_agent_device,\n        is_native_web_view,\n        include_in_session\n\n    from w_pages_tf\n\n),\n\nraw_a_tracks as (\n\n    select *\n\n    from {{ ref(\'stg_surfline_android__tracks\') }}\n    where __PERIOD_FILTER__\n\n),\n\na_tracks as (\n\n    select\n        event_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        {{ map_subscription_brand(\'source_schema\')|indent(8) }}::varchar(256) as brand,\n        {{ map_source_schema_to_platform(\'source_schema\')|indent(8) }}::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        event_name::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_model,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        screen_density::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n\n        case\n            when event_name not in {{ session_exclude_events()|indent(8) }}\n                then true\n            else false\n        end::boolean as include_in_session\n\n    from raw_a_tracks\n\n),\n\nraw_i_tracks as (\n\n    select *\n\n    from {{ ref(\'stg_surfline_ios__tracks\') }}\n    where __PERIOD_FILTER__\n\n),\n\ni_tracks as (\n\n    select\n        event_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        {{ map_subscription_brand(\'source_schema\')|indent(8) }}::varchar(256) as brand,\n        {{ map_source_schema_to_platform(\'source_schema\')|indent(8) }}::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        event_name::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_timezone,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n\n        case\n            when event_name not in {{ session_exclude_events()|indent(8) }}\n                then true\n            else false\n        end::boolean as include_in_session\n\n    from raw_i_tracks\n\n),\n\nraw_w_tracks as (\n\n    select *\n\n    from {{ ref(\'stg_surfline_web__tracks\') }}\n    where __PERIOD_FILTER__\n\n),\n\nw_tracks_tf as (\n\n    select\n        event_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        {{ map_subscription_brand(\'source_schema\')|indent(8) }}::varchar(256) as brand,\n        null::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        event_name::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        null::varchar(256) as app_name,\n        null::varchar(256) as app_version,\n        null::varchar(256) as app_build,\n        null::varchar(256) as device_os_name,\n        null::varchar(256) as device_os_version,\n        null::varchar(256) as device_id,\n        null::varchar(256) as device_manufacturer,\n        null::varchar(256) as device_type,\n        null::varchar(256) as device_model,\n        null::varchar(256) as device_timezone,\n        null::bigint as screen_height,\n        null::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        null::varchar(256) as network_carrier,\n        null::boolean as network_cellular,\n        null::boolean as network_wifi,\n        null::boolean as network_bluetooth,\n        null::boolean as ad_tracking_enabled,\n        null::varchar(256) as advertising_id,\n        page_url::varchar(256) as page_url,\n        page_url_path::varchar(256) as page_url_path,\n        page_url_query::varchar(256) as page_url_query,\n        page_title::varchar(256) as page_title,\n        page_referrer::varchar(256) as page_referrer,\n        utm_source::varchar(256) as utm_source,\n        utm_medium::varchar(256) as utm_medium,\n        utm_campaign::varchar(256) as utm_campaign,\n        utm_term::varchar(256) as utm_term,\n        utm_content::varchar(256) as utm_content,\n        user_agent::varchar(256) as user_agent,\n\n        -- Reference: https://github.com/dbt-labs/segment/blob/45a6602b7b2f552fa575dce7487af5d64f47aa90/models/base/segment_web_page_views.sql#L58-L63\n        case\n            when lower(user_agent) like \'%android%\' then \'Android\'\n            else replace(\n                {{ split_part(split_part(\'user_agent\', "\'(\'", 2), "\' \'", 1) }},\n                \';\', \'\')\n        end::varchar(256) as user_agent_device,\n\n        {{ dbt_utils.get_url_parameter(\'page_url\', \'native\') }}::varchar(256) as is_native_web_view,\n\n        {# We leverage \'native web views\' in our mobile apps, which fire\n         Segment page() calls. So we need to parse the mobile pages and assign\n         them to their repsective platform based on the device. #}\n        case\n            when is_native_web_view != \'true\'\n                or user_agent_device in (\'Macintosh\', \'Windows\')\n                then \'web\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in (\'iPhone\', \'iPad\', \'iPod\')\n                then \'ios\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in ( \'Android\')\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n\n        case\n            when event_name not in {{ session_exclude_events()|indent(8) }}\n                then true\n            else false\n        end::boolean as include_in_session\n\n    from raw_w_tracks\n\n),\n\nw_tracks as (\n\n    select\n        segment_id,\n        source_schema,\n        source_table,\n        tracking_plan,\n        brand,\n        platform,  -- Reorder for union\n        page_name,\n        screen_name,\n        event_name,\n        call_type,\n        library_name,\n        library_version,\n        sent_at_tstamp,\n        received_at_tstamp,\n        tstamp,\n        anonymous_id,\n        user_id,\n        app_name,\n        app_version,\n        app_build,\n        device_os_name,\n        device_os_version,\n        device_id,\n        device_manufacturer,\n        device_type,\n        device_model,\n        device_timezone,\n        screen_height,\n        screen_width,\n        screen_density,\n        ip,\n        locale,\n        network_carrier,\n        network_cellular,\n        network_wifi,\n        network_bluetooth,\n        ad_tracking_enabled,\n        advertising_id,\n        page_url,\n        page_url_path,\n        page_url_query,\n        page_title,\n        page_referrer,\n        utm_source,\n        utm_medium,\n        utm_campaign,\n        utm_term,\n        utm_content,\n        user_agent,\n        user_agent_device,\n        is_native_web_view,\n        include_in_session\n\n    from w_tracks_tf\n\n),\n\nunioned as (\n\n    select * from a_screens\n\n    union all\n\n    select * from i_screens\n\n    union all\n\n    select * from w_pages\n\n    union all\n\n    select * from a_tracks\n\n    union all\n\n    select * from i_tracks\n\n    union all\n\n    select * from w_tracks\n\n)\n\nselect * from unioned', 'compiled': True, 'resource_type': 'model', 'depends_on': {'macros': ['macro.wavetrak_dbt.map_subscription_brand', 'macro.wavetrak_dbt.map_source_schema_to_platform', 'macro.dbt.split_part', 'macro.dbt_utils.get_url_parameter', 'macro.wavetrak_dbt.session_exclude_events', 'macro.wavetrak_dbt.test_late_binding_view_in_dev'], 'nodes': ['model.reflekt_wavetrak_segment.stg_surfline_android__screens', 'model.reflekt_wavetrak_segment.stg_surfline_ios__screens', 'model.reflekt_wavetrak_segment.stg_surfline_web__pages', 'model.reflekt_wavetrak_segment.stg_surfline_android__tracks', 'model.reflekt_wavetrak_segment.stg_surfline_ios__tracks', 'model.reflekt_wavetrak_segment.stg_surfline_web__tracks']}, 'config': {'enabled': True, 'tags': [], 'meta': {}, 'materialized': 'insert_by_period', 'persist_docs': {}, 'quoting': {}, 'column_types': {}, 'unique_key': 'segment_id', 'on_schema_change': 'ignore', 'grants': {}, 'bind': False, 'dist': 'segment_id', 'sort': 'tstamp', 'period': 'day', 'timestamp_field': 'received_at_tstamp', 'start_date': '2022-08-22', 'stop_date': '2022-09-21', 'post-hook': [{'sql': '{{ test_late_binding_view_in_dev() }}', 'transaction': True}, {'sql': 'grant select on {{ this.schema }}.{{ this.name }} to group reporter', 'transaction': True}], 'pre-hook': []}, 'database': 'segment', 'schema': 'dbt_greg', 'fqn': ['wavetrak_dbt', 'marts', 'core', 'fct_surfline_segment'], 'unique_id': 'model.wavetrak_dbt.fct_surfline_segment', 'package_name': 'wavetrak_dbt', 'root_path': '/Users/gclunies2-mba/Repos/wavetrak-dbt', 'path': 'marts/core/fct_surfline_segment.sql', 'original_file_path': 'models/marts/core/fct_surfline_segment.sql', 'name': 'fct_surfline_segment', 'alias': 'fct_surfline_segment', 'checksum': {'name': 'sha256', 'checksum': 'd7b7d318b5f318580ec6f22ba4a42048b746f1f1a885b24887ac7544f51ac49e'}, 'tags': [], 'refs': [['stg_surfline_android__screens'], ['stg_surfline_ios__screens'], ['stg_surfline_web__pages'], ['stg_surfline_android__tracks'], ['stg_surfline_ios__tracks'], ['stg_surfline_web__tracks']], 'sources': [], 'metrics': [], 'description': '', 'columns': {}, 'meta': {}, 'docs': {'show': True}, 'compiled_path': 'target/compiled/wavetrak_dbt/models/marts/core/fct_surfline_segment.sql', 'deferred': False, 'unrendered_config': {'bind': False, 'post-hook': ['grant select on {{ this.schema }}.{{ this.name }} to group reporter'], 'materialized': 'insert_by_period', 'period': 'day', 'timestamp_field': 'received_at_tstamp', 'start_date': '2022-08-22', 'stop_date': '2022-09-21', 'unique_key': 'segment_id', 'sort': 'tstamp', 'dist': 'segment_id'}, 'created_at': 1663786790.256456, 'config_call_dict': {'materialized': 'insert_by_period', 'period': 'day', 'timestamp_field': 'received_at_tstamp', 'start_date': '2022-08-22', 'stop_date': '2022-09-21', 'unique_key': 'segment_id', 'sort': 'tstamp', 'dist': 'segment_id'}, 'compiled_sql': '\n\nwith\n\nraw_a_screens as (\n\n    select *\n\n    from "segment"."dbt_greg"."stg_surfline_android__screens"\n    where __PERIOD_FILTER__\n\n),\n\na_screens as (\n\n    select\n        screen_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        case\n            when source_schema ilike \'%sl\\\\_%\'\n                or source_schema ilike \'%surfline%\'\n                then \'surfline\'\n            when source_schema ilike \'%bw\\\\_%\'\n                or source_schema ilike \'%buoyweather%\'\n                then \'buoyweather\'\n            when source_schema ilike \'%fs\\\\_%\'\n                or source_schema ilike \'%fishtrack%\'\n                or source_schema ilike \'%fishtrack%\'\n                then \'fishtrack\'\n            when source_schema ilike \'msw%\'\n                or source_schema ilike \'%magicseaweed%\'\n                or source_schema ilike \'%magic%seaweed%\'\n                then \'magicseaweed\'\n            when source_schema ilike \'%coastalwatch%\'\n                or source_schema ilike \'surfstitch%\'  -- Legacy app name\n                then \'coastalwatch\'\n            else \'unknown\'\n        end::varchar(256) as brand,\n        case\n            when source_schema = \'surfline\'\n                then \'web\'\n            when source_schema = \'surfline_ios\'\n                then \'ios\'\n            when source_schema = \'surfline_android\'\n                then \'android\'\n            when source_schema = \'buoyweather\'\n                then \'web\'\n            when source_schema = \'buoyweather_ios\'\n                then \'ios\'\n            when source_schema = \'buoyweatherandroid\'\n                then \'android\'\n            when source_schema = \'fishtrack\'\n                then \'web\'\n            when source_schema = \'fishtrack_ios\'\n                then \'ios\'\n            when source_schema = \'fishtrackandroid\'\n                then \'android\'\n            when source_schema = \'msw_web\'\n                then \'web\'\n            when source_schema = \'msw_ios\'\n                then \'ios\'\n            when source_schema = \'msw_android\'\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        screen_name::varchar(256) as screen_name,\n        null::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_timezone,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        screen_density::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n        true::boolean as include_in_session\n\n    from raw_a_screens\n\n),\n\nraw_i_screens as (\n\n    select *\n\n    from "segment"."dbt_greg"."stg_surfline_ios__screens"\n    where __PERIOD_FILTER__\n\n),\n\ni_screens as (\n\n    select\n        screen_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        case\n            when source_schema ilike \'%sl\\\\_%\'\n                or source_schema ilike \'%surfline%\'\n                then \'surfline\'\n            when source_schema ilike \'%bw\\\\_%\'\n                or source_schema ilike \'%buoyweather%\'\n                then \'buoyweather\'\n            when source_schema ilike \'%fs\\\\_%\'\n                or source_schema ilike \'%fishtrack%\'\n                or source_schema ilike \'%fishtrack%\'\n                then \'fishtrack\'\n            when source_schema ilike \'msw%\'\n                or source_schema ilike \'%magicseaweed%\'\n                or source_schema ilike \'%magic%seaweed%\'\n                then \'magicseaweed\'\n            when source_schema ilike \'%coastalwatch%\'\n                or source_schema ilike \'surfstitch%\'  -- Legacy app name\n                then \'coastalwatch\'\n            else \'unknown\'\n        end::varchar(256) as brand,\n        case\n            when source_schema = \'surfline\'\n                then \'web\'\n            when source_schema = \'surfline_ios\'\n                then \'ios\'\n            when source_schema = \'surfline_android\'\n                then \'android\'\n            when source_schema = \'buoyweather\'\n                then \'web\'\n            when source_schema = \'buoyweather_ios\'\n                then \'ios\'\n            when source_schema = \'buoyweatherandroid\'\n                then \'android\'\n            when source_schema = \'fishtrack\'\n                then \'web\'\n            when source_schema = \'fishtrack_ios\'\n                then \'ios\'\n            when source_schema = \'fishtrackandroid\'\n                then \'android\'\n            when source_schema = \'msw_web\'\n                then \'web\'\n            when source_schema = \'msw_ios\'\n                then \'ios\'\n            when source_schema = \'msw_android\'\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        screen_name::varchar(256) as screen_name,\n        null::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_timezone,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n        true::boolean as include_in_session\n\n    from raw_i_screens\n\n),\n\nraw_w_pages as (\n\n    select *\n\n    from "segment"."dbt_greg"."stg_surfline_web__pages"\n    where __PERIOD_FILTER__\n\n),\n\nw_pages_tf as (\n\n    select\n        page_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        case\n            when source_schema ilike \'%sl\\\\_%\'\n                or source_schema ilike \'%surfline%\'\n                then \'surfline\'\n            when source_schema ilike \'%bw\\\\_%\'\n                or source_schema ilike \'%buoyweather%\'\n                then \'buoyweather\'\n            when source_schema ilike \'%fs\\\\_%\'\n                or source_schema ilike \'%fishtrack%\'\n                or source_schema ilike \'%fishtrack%\'\n                then \'fishtrack\'\n            when source_schema ilike \'msw%\'\n                or source_schema ilike \'%magicseaweed%\'\n                or source_schema ilike \'%magic%seaweed%\'\n                then \'magicseaweed\'\n            when source_schema ilike \'%coastalwatch%\'\n                or source_schema ilike \'surfstitch%\'  -- Legacy app name\n                then \'coastalwatch\'\n            else \'unknown\'\n        end::varchar(256) as brand,\n        page_name::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        null::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        null::varchar(256) as app_name,\n        null::varchar(256) as app_version,\n        null::varchar(256) as app_build,\n        null::varchar(256) as device_os_name,\n        null::varchar(256) as device_os_version,\n        null::varchar(256) as device_id,\n        null::varchar(256) as device_manufacturer,\n        null::varchar(256) as device_type,\n        null::varchar(256) as device_model,\n        null::varchar(256) as device_timezone,\n        null::bigint as screen_height,\n        null::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        null::varchar(256) as network_carrier,\n        null::boolean as network_cellular,\n        null::boolean as network_wifi,\n        null::boolean as network_bluetooth,\n        null::boolean as ad_tracking_enabled,\n        null::varchar(256) as advertising_id,\n        page_url::varchar(256) as page_url,\n        page_url_path::varchar(256) as page_url_path,\n        page_url_query::varchar(256) as page_url_query,\n        page_title::varchar(256) as page_title,\n        page_referrer::varchar(256) as page_referrer,\n        utm_source::varchar(256) as utm_source,\n        utm_medium::varchar(256) as utm_medium,\n        utm_campaign::varchar(256) as utm_campaign,\n        utm_term::varchar(256) as utm_term,\n        utm_content::varchar(256) as utm_content,\n        user_agent::varchar(256) as user_agent,\n\n        -- Reference: https://github.com/dbt-labs/segment/blob/45a6602b7b2f552fa575dce7487af5d64f47aa90/models/base/segment_web_page_views.sql#L58-L63\n        case\n            when lower(user_agent) like \'%android%\' then \'Android\'\n            else replace(\n                \n\n  \n    \n\n    split_part(\n        \n\n  \n    \n\n    split_part(\n        user_agent,\n        \'(\',\n        2\n        )\n\n\n  \n\n,\n        \' \',\n        1\n        )\n\n\n  \n\n,\n                \';\', \'\')\n        end::varchar(256) as user_agent_device,\n\n        nullif(\n\n  \n    \n\n    split_part(\n        \n\n  \n    \n\n    split_part(\n        page_url,\n        \'native=\',\n        2\n        )\n\n\n  \n\n,\n        \'&\',\n        1\n        )\n\n\n  \n\n,\'\')::varchar(256) as is_native_web_view,\n\n        \n        case\n            when is_native_web_view != \'true\'\n                or user_agent_device in (\'Macintosh\', \'Windows\')\n                then \'web\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in (\'iPhone\', \'iPad\', \'iPod\')\n                then \'ios\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in ( \'Android\')\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n\n        true::boolean as include_in_session\n\n    from raw_w_pages\n\n),\n\nw_pages as (\n\n    select\n        segment_id,\n        source_schema,\n        source_table,\n        tracking_plan,\n        brand,\n        platform,  -- Reorder for union\n        page_name,\n        screen_name,\n        event_name,\n        call_type,\n        library_name,\n        library_version,\n        sent_at_tstamp,\n        received_at_tstamp,\n        tstamp,\n        anonymous_id,\n        user_id,\n        app_name,\n        app_version,\n        app_build,\n        device_os_name,\n        device_os_version,\n        device_id,\n        device_manufacturer,\n        device_type,\n        device_model,\n        device_timezone,\n        screen_height,\n        screen_width,\n        screen_density,\n        ip,\n        locale,\n        network_carrier,\n        network_cellular,\n        network_wifi,\n        network_bluetooth,\n        ad_tracking_enabled,\n        advertising_id,\n        page_url,\n        page_url_path,\n        page_url_query,\n        page_title,\n        page_referrer,\n        utm_source,\n        utm_medium,\n        utm_campaign,\n        utm_term,\n        utm_content,\n        user_agent,\n        user_agent_device,\n        is_native_web_view,\n        include_in_session\n\n    from w_pages_tf\n\n),\n\nraw_a_tracks as (\n\n    select *\n\n    from "segment"."dbt_greg"."stg_surfline_android__tracks"\n    where __PERIOD_FILTER__\n\n),\n\na_tracks as (\n\n    select\n        event_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        case\n            when source_schema ilike \'%sl\\\\_%\'\n                or source_schema ilike \'%surfline%\'\n                then \'surfline\'\n            when source_schema ilike \'%bw\\\\_%\'\n                or source_schema ilike \'%buoyweather%\'\n                then \'buoyweather\'\n            when source_schema ilike \'%fs\\\\_%\'\n                or source_schema ilike \'%fishtrack%\'\n                or source_schema ilike \'%fishtrack%\'\n                then \'fishtrack\'\n            when source_schema ilike \'msw%\'\n                or source_schema ilike \'%magicseaweed%\'\n                or source_schema ilike \'%magic%seaweed%\'\n                then \'magicseaweed\'\n            when source_schema ilike \'%coastalwatch%\'\n                or source_schema ilike \'surfstitch%\'  -- Legacy app name\n                then \'coastalwatch\'\n            else \'unknown\'\n        end::varchar(256) as brand,\n        case\n            when source_schema = \'surfline\'\n                then \'web\'\n            when source_schema = \'surfline_ios\'\n                then \'ios\'\n            when source_schema = \'surfline_android\'\n                then \'android\'\n            when source_schema = \'buoyweather\'\n                then \'web\'\n            when source_schema = \'buoyweather_ios\'\n                then \'ios\'\n            when source_schema = \'buoyweatherandroid\'\n                then \'android\'\n            when source_schema = \'fishtrack\'\n                then \'web\'\n            when source_schema = \'fishtrack_ios\'\n                then \'ios\'\n            when source_schema = \'fishtrackandroid\'\n                then \'android\'\n            when source_schema = \'msw_web\'\n                then \'web\'\n            when source_schema = \'msw_ios\'\n                then \'ios\'\n            when source_schema = \'msw_android\'\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        event_name::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_model,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        screen_density::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n\n        case\n            when event_name not in (\n        \'Added New Credit Debit Card\',\n        \'Application Installed\',\n        \'Application Started\',\n        \'Application Updated\',\n        \'Clicked Apply Now\',\n        \'Clicked Email support@surfline.com to receive your discount code.\',\n        \'Clicked Enable Alerts\',\n        \'Clicked Feed Filter\',\n        \'Clicked Forecast Feed Filter\',\n        \'Clicked Nearby Buoys\',\n        \'Clicked Onboarding CTA\',\n        \'Clicked Read More\',\n        \'Clicked undefined\',\n        \'Completed Order - Annual\',\n        \'Completed Order - Monthly\',\n        \'Converted Free Trial\',\n        \'Converted to Paid\',\n        \'Days To Convert From Trial\',\n        \'Days to Convert from Trial\',\n        \'Detected Ad Blocker\',\n        \'Discount Code Dispatched\',\n        \'Dissociated Stripe Customer\',\n        \'Email Bounced\',\n        \'Email Delivered\',\n        \'Email Link Clicked\',\n        \'Email Marked As Spam\',\n        \'Email Opened\',\n        \'Ended Session\',\n        \'Experiment Succeeded\',\n        \'Experiment Viewed\',\n        \'Expired Failed Payment\',\n        \'Expired Subscription\',\n        \'Extended Subscription\',\n        \'Failed Order\',\n        \'Failed Payment\',\n        \'Failed Payment Recovered\',\n        \'Generated Gift Card\',\n        \'Generated Promo Code\',\n        \'Install Attributed\',\n        \'Last Session\',\n        \'Nearby Spots\',\n        \'Opened Watch App\',\n        \'Opened Watch App Initial\',\n        \'Playback Rate Error\',\n        \'Playback Rate Retry Attempted\',\n        \'Played Video\',\n        \'Push Notification Received\',\n        \'Push Notification Sent to Gateway\',\n        \'Reverted to Old Surfline\',\n        \'Set AnonymousId\',\n        \'Slide In Next Story\',\n        \'Slide Out Next Story\',\n        \'Started Session\',\n        \'Stored Session Locally\',\n        \'Stripe Identity Result\',\n        \'Subscription Grandfathered\',\n        \'Subscription Renewed\',\n        \'Succeeded Payment\',\n        \'Surf Checks Reset\',\n        \'Sync Begin\',\n        \'Taken Screenshot\',\n        \'Toggle Cam View\',\n        \'Unsubscribed\',\n        \'Upcoming Subscription Renewal\',\n        \'Used Existing Credit Debit Card\',\n        \'Used Surf Check\',\n        \'Verified Email\',\n        \'Video Content Completed\',\n        \'Video Content Started\',\n        \'Video Playback Buffer Completed\',\n        \'Video Playback Buffer Started\',\n        \'Video Playback Interrupted\',\n        \'Video Playback Paused\',\n        \'Video Playback Resumed\',\n        \'Video Playback Started\',\n        \'Viewed Career\',\n        \'Viewed Web Product\',\n        \'clicked subscribe CTA\',\n        \'clicked_share_icon\',\n        \'error_page_500_clicked_homepage\',\n        \'open_video_player\',\n        \'set_center_explore_map\'\n        )\n                then true\n            else false\n        end::boolean as include_in_session\n\n    from raw_a_tracks\n\n),\n\nraw_i_tracks as (\n\n    select *\n\n    from "segment"."dbt_greg"."stg_surfline_ios__tracks"\n    where __PERIOD_FILTER__\n\n),\n\ni_tracks as (\n\n    select\n        event_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        case\n            when source_schema ilike \'%sl\\\\_%\'\n                or source_schema ilike \'%surfline%\'\n                then \'surfline\'\n            when source_schema ilike \'%bw\\\\_%\'\n                or source_schema ilike \'%buoyweather%\'\n                then \'buoyweather\'\n            when source_schema ilike \'%fs\\\\_%\'\n                or source_schema ilike \'%fishtrack%\'\n                or source_schema ilike \'%fishtrack%\'\n                then \'fishtrack\'\n            when source_schema ilike \'msw%\'\n                or source_schema ilike \'%magicseaweed%\'\n                or source_schema ilike \'%magic%seaweed%\'\n                then \'magicseaweed\'\n            when source_schema ilike \'%coastalwatch%\'\n                or source_schema ilike \'surfstitch%\'  -- Legacy app name\n                then \'coastalwatch\'\n            else \'unknown\'\n        end::varchar(256) as brand,\n        case\n            when source_schema = \'surfline\'\n                then \'web\'\n            when source_schema = \'surfline_ios\'\n                then \'ios\'\n            when source_schema = \'surfline_android\'\n                then \'android\'\n            when source_schema = \'buoyweather\'\n                then \'web\'\n            when source_schema = \'buoyweather_ios\'\n                then \'ios\'\n            when source_schema = \'buoyweatherandroid\'\n                then \'android\'\n            when source_schema = \'fishtrack\'\n                then \'web\'\n            when source_schema = \'fishtrack_ios\'\n                then \'ios\'\n            when source_schema = \'fishtrackandroid\'\n                then \'android\'\n            when source_schema = \'msw_web\'\n                then \'web\'\n            when source_schema = \'msw_ios\'\n                then \'ios\'\n            when source_schema = \'msw_android\'\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n        null::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        event_name::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        app_name::varchar(256) as app_name,\n        app_version::varchar(256) as app_version,\n        app_build::varchar(256) as app_build,\n        device_os_name::varchar(256) as device_os_name,\n        device_os_version::varchar(256) as device_os_version,\n        device_id::varchar(256) as device_id,\n        device_manufacturer::varchar(256) as device_manufacturer,\n        device_type::varchar(256) as device_type,\n        device_model::varchar(256) as device_model,\n        device_timezone::varchar(256) as device_timezone,\n        screen_height::bigint as screen_height,\n        screen_width::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        network_carrier::varchar(256) as network_carrier,\n        network_cellular::boolean as network_cellular,\n        network_wifi::boolean as network_wifi,\n        network_bluetooth::boolean as network_bluetooth,\n        ad_tracking_enabled::boolean as ad_tracking_enabled,\n        advertising_id::varchar(256) as advertising_id,\n        null::varchar(256) as page_url,\n        null::varchar(256) as page_url_path,\n        null::varchar(256) as page_url_query,\n        null::varchar(256) as page_title,\n        null::varchar(256) as page_referrer,\n        null::varchar(256) as utm_source,\n        null::varchar(256) as utm_medium,\n        null::varchar(256) as utm_campaign,\n        null::varchar(256) as utm_term,\n        null::varchar(256) as utm_content,\n        null::varchar(256) as user_agent,\n        null::varchar(256) as user_agent_device,\n        null::varchar(256) as is_native_web_view,\n\n        case\n            when event_name not in (\n        \'Added New Credit Debit Card\',\n        \'Application Installed\',\n        \'Application Started\',\n        \'Application Updated\',\n        \'Clicked Apply Now\',\n        \'Clicked Email support@surfline.com to receive your discount code.\',\n        \'Clicked Enable Alerts\',\n        \'Clicked Feed Filter\',\n        \'Clicked Forecast Feed Filter\',\n        \'Clicked Nearby Buoys\',\n        \'Clicked Onboarding CTA\',\n        \'Clicked Read More\',\n        \'Clicked undefined\',\n        \'Completed Order - Annual\',\n        \'Completed Order - Monthly\',\n        \'Converted Free Trial\',\n        \'Converted to Paid\',\n        \'Days To Convert From Trial\',\n        \'Days to Convert from Trial\',\n        \'Detected Ad Blocker\',\n        \'Discount Code Dispatched\',\n        \'Dissociated Stripe Customer\',\n        \'Email Bounced\',\n        \'Email Delivered\',\n        \'Email Link Clicked\',\n        \'Email Marked As Spam\',\n        \'Email Opened\',\n        \'Ended Session\',\n        \'Experiment Succeeded\',\n        \'Experiment Viewed\',\n        \'Expired Failed Payment\',\n        \'Expired Subscription\',\n        \'Extended Subscription\',\n        \'Failed Order\',\n        \'Failed Payment\',\n        \'Failed Payment Recovered\',\n        \'Generated Gift Card\',\n        \'Generated Promo Code\',\n        \'Install Attributed\',\n        \'Last Session\',\n        \'Nearby Spots\',\n        \'Opened Watch App\',\n        \'Opened Watch App Initial\',\n        \'Playback Rate Error\',\n        \'Playback Rate Retry Attempted\',\n        \'Played Video\',\n        \'Push Notification Received\',\n        \'Push Notification Sent to Gateway\',\n        \'Reverted to Old Surfline\',\n        \'Set AnonymousId\',\n        \'Slide In Next Story\',\n        \'Slide Out Next Story\',\n        \'Started Session\',\n        \'Stored Session Locally\',\n        \'Stripe Identity Result\',\n        \'Subscription Grandfathered\',\n        \'Subscription Renewed\',\n        \'Succeeded Payment\',\n        \'Surf Checks Reset\',\n        \'Sync Begin\',\n        \'Taken Screenshot\',\n        \'Toggle Cam View\',\n        \'Unsubscribed\',\n        \'Upcoming Subscription Renewal\',\n        \'Used Existing Credit Debit Card\',\n        \'Used Surf Check\',\n        \'Verified Email\',\n        \'Video Content Completed\',\n        \'Video Content Started\',\n        \'Video Playback Buffer Completed\',\n        \'Video Playback Buffer Started\',\n        \'Video Playback Interrupted\',\n        \'Video Playback Paused\',\n        \'Video Playback Resumed\',\n        \'Video Playback Started\',\n        \'Viewed Career\',\n        \'Viewed Web Product\',\n        \'clicked subscribe CTA\',\n        \'clicked_share_icon\',\n        \'error_page_500_clicked_homepage\',\n        \'open_video_player\',\n        \'set_center_explore_map\'\n        )\n                then true\n            else false\n        end::boolean as include_in_session\n\n    from raw_i_tracks\n\n),\n\nraw_w_tracks as (\n\n    select *\n\n    from "segment"."dbt_greg"."stg_surfline_web__tracks"\n    where __PERIOD_FILTER__\n\n),\n\nw_tracks_tf as (\n\n    select\n        event_id::varchar(256) as segment_id,\n        source_schema::varchar(256) as source_schema,\n        source_table::varchar(256) as source_table,\n        tracking_plan::varchar(256) as tracking_plan,\n        case\n            when source_schema ilike \'%sl\\\\_%\'\n                or source_schema ilike \'%surfline%\'\n                then \'surfline\'\n            when source_schema ilike \'%bw\\\\_%\'\n                or source_schema ilike \'%buoyweather%\'\n                then \'buoyweather\'\n            when source_schema ilike \'%fs\\\\_%\'\n                or source_schema ilike \'%fishtrack%\'\n                or source_schema ilike \'%fishtrack%\'\n                then \'fishtrack\'\n            when source_schema ilike \'msw%\'\n                or source_schema ilike \'%magicseaweed%\'\n                or source_schema ilike \'%magic%seaweed%\'\n                then \'magicseaweed\'\n            when source_schema ilike \'%coastalwatch%\'\n                or source_schema ilike \'surfstitch%\'  -- Legacy app name\n                then \'coastalwatch\'\n            else \'unknown\'\n        end::varchar(256) as brand,\n        null::varchar(256) as page_name,\n        null::varchar(256) as screen_name,\n        event_name::varchar(256) as event_name,\n        call_type::varchar(256) as call_type,\n        library_name::varchar(256) as library_name,\n        library_version::varchar(256) as library_version,\n        cast(sent_at_tstamp as timestamp) as sent_at_tstamp,\n        cast(received_at_tstamp as timestamp) as received_at_tstamp,\n        cast(tstamp as timestamp) as tstamp,\n        anonymous_id::varchar(256) as anonymous_id,\n        user_id::varchar(256) as user_id,\n        null::varchar(256) as app_name,\n        null::varchar(256) as app_version,\n        null::varchar(256) as app_build,\n        null::varchar(256) as device_os_name,\n        null::varchar(256) as device_os_version,\n        null::varchar(256) as device_id,\n        null::varchar(256) as device_manufacturer,\n        null::varchar(256) as device_type,\n        null::varchar(256) as device_model,\n        null::varchar(256) as device_timezone,\n        null::bigint as screen_height,\n        null::bigint as screen_width,\n        null::bigint as screen_density,\n        ip::varchar(256) as ip,\n        locale::varchar(256) as locale,\n        null::varchar(256) as network_carrier,\n        null::boolean as network_cellular,\n        null::boolean as network_wifi,\n        null::boolean as network_bluetooth,\n        null::boolean as ad_tracking_enabled,\n        null::varchar(256) as advertising_id,\n        page_url::varchar(256) as page_url,\n        page_url_path::varchar(256) as page_url_path,\n        page_url_query::varchar(256) as page_url_query,\n        page_title::varchar(256) as page_title,\n        page_referrer::varchar(256) as page_referrer,\n        utm_source::varchar(256) as utm_source,\n        utm_medium::varchar(256) as utm_medium,\n        utm_campaign::varchar(256) as utm_campaign,\n        utm_term::varchar(256) as utm_term,\n        utm_content::varchar(256) as utm_content,\n        user_agent::varchar(256) as user_agent,\n\n        -- Reference: https://github.com/dbt-labs/segment/blob/45a6602b7b2f552fa575dce7487af5d64f47aa90/models/base/segment_web_page_views.sql#L58-L63\n        case\n            when lower(user_agent) like \'%android%\' then \'Android\'\n            else replace(\n                \n\n  \n    \n\n    split_part(\n        \n\n  \n    \n\n    split_part(\n        user_agent,\n        \'(\',\n        2\n        )\n\n\n  \n\n,\n        \' \',\n        1\n        )\n\n\n  \n\n,\n                \';\', \'\')\n        end::varchar(256) as user_agent_device,\n\n        nullif(\n\n  \n    \n\n    split_part(\n        \n\n  \n    \n\n    split_part(\n        page_url,\n        \'native=\',\n        2\n        )\n\n\n  \n\n,\n        \'&\',\n        1\n        )\n\n\n  \n\n,\'\')::varchar(256) as is_native_web_view,\n\n        \n        case\n            when is_native_web_view != \'true\'\n                or user_agent_device in (\'Macintosh\', \'Windows\')\n                then \'web\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in (\'iPhone\', \'iPad\', \'iPod\')\n                then \'ios\'\n            when source_schema in (\'surfline\', \'buoyweather\', \'fishtrack\', \'msw_web\')\n                and is_native_web_view = \'true\'\n                and user_agent_device in ( \'Android\')\n                then \'android\'\n            else \'unknown\'\n        end::varchar(256) as platform,\n\n        case\n            when event_name not in (\n        \'Added New Credit Debit Card\',\n        \'Application Installed\',\n        \'Application Started\',\n        \'Application Updated\',\n        \'Clicked Apply Now\',\n        \'Clicked Email support@surfline.com to receive your discount code.\',\n        \'Clicked Enable Alerts\',\n        \'Clicked Feed Filter\',\n        \'Clicked Forecast Feed Filter\',\n        \'Clicked Nearby Buoys\',\n        \'Clicked Onboarding CTA\',\n        \'Clicked Read More\',\n        \'Clicked undefined\',\n        \'Completed Order - Annual\',\n        \'Completed Order - Monthly\',\n        \'Converted Free Trial\',\n        \'Converted to Paid\',\n        \'Days To Convert From Trial\',\n        \'Days to Convert from Trial\',\n        \'Detected Ad Blocker\',\n        \'Discount Code Dispatched\',\n        \'Dissociated Stripe Customer\',\n        \'Email Bounced\',\n        \'Email Delivered\',\n        \'Email Link Clicked\',\n        \'Email Marked As Spam\',\n        \'Email Opened\',\n        \'Ended Session\',\n        \'Experiment Succeeded\',\n        \'Experiment Viewed\',\n        \'Expired Failed Payment\',\n        \'Expired Subscription\',\n        \'Extended Subscription\',\n        \'Failed Order\',\n        \'Failed Payment\',\n        \'Failed Payment Recovered\',\n        \'Generated Gift Card\',\n        \'Generated Promo Code\',\n        \'Install Attributed\',\n        \'Last Session\',\n        \'Nearby Spots\',\n        \'Opened Watch App\',\n        \'Opened Watch App Initial\',\n        \'Playback Rate Error\',\n        \'Playback Rate Retry Attempted\',\n        \'Played Video\',\n        \'Push Notification Received\',\n        \'Push Notification Sent to Gateway\',\n        \'Reverted to Old Surfline\',\n        \'Set AnonymousId\',\n        \'Slide In Next Story\',\n        \'Slide Out Next Story\',\n        \'Started Session\',\n        \'Stored Session Locally\',\n        \'Stripe Identity Result\',\n        \'Subscription Grandfathered\',\n        \'Subscription Renewed\',\n        \'Succeeded Payment\',\n        \'Surf Checks Reset\',\n        \'Sync Begin\',\n        \'Taken Screenshot\',\n        \'Toggle Cam View\',\n        \'Unsubscribed\',\n        \'Upcoming Subscription Renewal\',\n        \'Used Existing Credit Debit Card\',\n        \'Used Surf Check\',\n        \'Verified Email\',\n        \'Video Content Completed\',\n        \'Video Content Started\',\n        \'Video Playback Buffer Completed\',\n        \'Video Playback Buffer Started\',\n        \'Video Playback Interrupted\',\n        \'Video Playback Paused\',\n        \'Video Playback Resumed\',\n        \'Video Playback Started\',\n        \'Viewed Career\',\n        \'Viewed Web Product\',\n        \'clicked subscribe CTA\',\n        \'clicked_share_icon\',\n        \'error_page_500_clicked_homepage\',\n        \'open_video_player\',\n        \'set_center_explore_map\'\n        )\n                then true\n            else false\n        end::boolean as include_in_session\n\n    from raw_w_tracks\n\n),\n\nw_tracks as (\n\n    select\n        segment_id,\n        source_schema,\n        source_table,\n        tracking_plan,\n        brand,\n        platform,  -- Reorder for union\n        page_name,\n        screen_name,\n        event_name,\n        call_type,\n        library_name,\n        library_version,\n        sent_at_tstamp,\n        received_at_tstamp,\n        tstamp,\n        anonymous_id,\n        user_id,\n        app_name,\n        app_version,\n        app_build,\n        device_os_name,\n        device_os_version,\n        device_id,\n        device_manufacturer,\n        device_type,\n        device_model,\n        device_timezone,\n        screen_height,\n        screen_width,\n        screen_density,\n        ip,\n        locale,\n        network_carrier,\n        network_cellular,\n        network_wifi,\n        network_bluetooth,\n        ad_tracking_enabled,\n        advertising_id,\n        page_url,\n        page_url_path,\n        page_url_query,\n        page_title,\n        page_referrer,\n        utm_source,\n        utm_medium,\n        utm_campaign,\n        utm_term,\n        utm_content,\n        user_agent,\n        user_agent_device,\n        is_native_web_view,\n        include_in_session\n\n    from w_tracks_tf\n\n),\n\nunioned as (\n\n    select * from a_screens\n\n    union all\n\n    select * from i_screens\n\n    union all\n\n    select * from w_pages\n\n    union all\n\n    select * from a_tracks\n\n    union all\n\n    select * from i_tracks\n\n    union all\n\n    select * from w_tracks\n\n)\n\nselect * from unioned', 'extra_ctes_injected': True, 'extra_ctes': [], 'relation_name': '"segment"."dbt_greg"."fct_surfline_segment"'} model triggered this warning.
19:00:09  Warning: the `current_timestamp` macro is deprecated and will be removed in a future version of the package, once equivalent functionality is implemented in dbt Core. The wavetrak_dbt.fct_surfline_segment model triggered this warning.

Steps to reproduce

Add package to packages.yml

packages:
    # insert_by_period moves here in dbt_utils 1.0.0
  - git: https://github.com/dbt-labs/dbt-labs-experimental-features
    subdirectory: insert_by_period
    revision: 0.0.1

Run dbt deps

❯ dbt deps
18:52:46  Running with dbt=1.2.1
18:52:53  Encountered an error:
Runtime Error
  no dbt_project.yml found at expected path /var/folders/k7/1zsppsn511bdd73clcsj_f_w0000gn/T/dbt-downloads-ojisyo4f/5b2c5462b916f7e61ceea92dbb107d2b/insert_by_period/dbt_project.yml
18:52:53  Traceback (most recent call last):
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/main.py", line 129, in main
    results, succeeded = handle_and_check(args)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/main.py", line 191, in handle_and_check
    task, res = run_from_args(parsed)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/main.py", line 238, in run_from_args
    results = task.run()
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/task/deps.py", line 56, in run
    final_deps = resolve_packages(packages, self.config)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/deps/resolver.py", line 131, in resolve_packages
    target = final[package].resolved().fetch_metadata(config, renderer)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/deps/base.py", line 86, in fetch_metadata
    self._cached_metadata = self._fetch_metadata(project, renderer)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/deps/git.py", line 103, in _fetch_metadata
    loaded = Project.from_project_root(path, renderer)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/config/project.py", line 652, in from_project_root
    partial = cls.partial_load(project_root, verify_version=verify_version)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/config/project.py", line 639, in partial_load
    return PartialProject.from_project_root(
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/config/project.py", line 482, in from_project_root
    project_dict = _raw_project_from(project_root)
  File "/Users/gclunies2-mba/opt/miniconda3/envs/surfline-dbt/lib/python3.9/site-packages/dbt/config/project.py", line 166, in _raw_project_from
    raise DbtProjectError(
dbt.exceptions.DbtProjectError: Runtime Error
  no dbt_project.yml found at expected path /var/folders/k7/1zsppsn511bdd73clcsj_f_w0000gn/T/dbt-downloads-ojisyo4f/5b2c5462b916f7e61ceea92dbb107d2b/insert_by_period/dbt_project.yml

Expected results

dbt should import the insert_by_period package without error.

Actual results

See error described above.

Screenshots and log output

System information

The contents of your packages.yml file:

packages:
  - package: calogica/dbt_date
    version: [">=0.6.0", "<0.7.0"]

  - package: dbt-labs/dbt_utils
    version: 0.9.2

    # insert_by_period moves here in dbt_utils 1.0.0
  - git: https://github.com/dbt-labs/dbt-labs-experimental-features
    subdirectory: insert_by_period
    revision: 0.0.1

  - package: dbt-labs/audit_helper
    version: 0.6.0

  - package: dbt-labs/codegen
    version: 0.8.0

    # Reflekt dbt package that automatically builds sources, staging models, docs for Segment event data
    #     Reflekt repo: https://github.com/GClunies/Reflekt
    #     wavetrak-segment private repo: https://github.com/Surfline/wavetrak-segment
  - git: "https://{{env_var('DBT_ENV_SECRET_GITHUB_PAT')}}@github.com/Surfline/wavetrak-segment.git"
    subdirectory: "dbt-packages/reflekt_wavetrak_segment"
    revision: v0.1.4__reflekt_wavetrak_segment # Git tag pointing to specific pkg version

The output of dbt --version:

❯ dbt --version
Core:
  - installed: 1.2.1
  - latest:    1.2.1 - Up to date!

Plugins:
  - redshift: 1.2.1 - Up to date!
  - postgres: 1.2.1 - Up to date!

Additional context

Are you interested in contributing the fix?

joellabes commented 2 years ago

@GClunies Sorry for the hassle here!

I haven't done a tagged release (and don't think I intend to, there's a lot of projects living in this repo which makes named releases a bit weird). I think instead you'll want to point to a specific hash:

packages:
  - package: dbt-labs/dbt_utils
    version: [">=1.0.0-b1", "<2.0.0"]
    install-prerelease: true #automatically get subsequent betas and the final shipping versions of v1

  - git: https://github.com/dbt-labs/dbt-labs-experimental-features
    subdirectory: insert_by_period
    revision: 7180db61d26836b931aa6ef8ad9d70e7fb3a69fa

When I run dbt deps with the above packages.yml, it works:

(dbt-prod) joel@Joel-Labes joel-sandbox % dbt deps
22:24:17  Running with dbt=1.2.0
22:24:23  Installing dbt-labs/dbt_utils
22:24:24    Installed from version 1.0.0-b1
22:24:24    Up to date!
22:24:24  Installing https://github.com/dbt-labs/dbt-labs-experimental-features
22:24:25    Installed from revision 7180db61d26836b931aa6ef8ad9d70e7fb3a69fa
22:24:25     and subdirectory insert_by_period
GClunies commented 2 years ago

Thanks for getting back to me so quickly @joellabes! I tried your suggestion but ended up running into a dependency conflict with dbt-date 😵‍💫 .

For now, I will stick with...

packages:
  - package: calogica/dbt_date
    version: [">=0.6.0", "<0.7.0"]

  # NOTE: This will warn on insert_by_period use for now
  # See: https://github.com/dbt-labs/dbt-labs-experimental-features/issues/34
  - package: dbt-labs/dbt_utils
    version: 0.9.2

  # TODO: use this for insert_by_period after release of dbt-core 1.3, dbt-utils 1.0, and dbt-date bumping to dbt_utils dep to version:[">=1.0.0", "<2.0.0"]
  # - git: https://github.com/dbt-labs/dbt-labs-experimental-features
  #   subdirectory: insert_by_period
  #   revision: 7180db61d26836b931aa6ef8ad9d70e7fb3a69fa

... until the release of dbt-core 1.3, dbt-utils 1.0, and dbt-date bumping to dbt_utils dep to version:[">=1.0.0", "<2.0.0"].

Feel free to close this issue!

joellabes commented 2 years ago

Ahhh yep we are in the messy middle time. Appreciate your flexibility and patience!