Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more recent dbt_utils #88

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions macros/generate_sessionization_incremental_filter.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% macro default__generate_sessionization_incremental_filter(merge_target, filter_tstamp, max_tstamp, operator) %}
where {{ filter_tstamp }} {{ operator }} (
select
{{ dbt_utils.dateadd(
{{ dateadd(
'hour',
-var('segment_sessionization_trailing_window'),
'max(' ~ max_tstamp ~ ')'
Expand All @@ -29,11 +29,11 @@
{% macro postgres__generate_sessionization_incremental_filter(merge_target, filter_tstamp, max_tstamp, operator) %}
where cast({{ filter_tstamp }} as timestamp) {{ operator }} (
select
{{ dbt_utils.dateadd(
{{ dateadd(
'hour',
-var('segment_sessionization_trailing_window'),
'max(' ~ max_tstamp ~ ')'
) }}
from {{ merge_target }}
)
{%- endmacro -%}
{%- endmacro -%}
2 changes: 1 addition & 1 deletion models/base/segment_web_page_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ renamed as (
case
when lower(context_user_agent) like '%android%' then 'Android'
else replace(
{{ dbt_utils.split_part(dbt_utils.split_part('context_user_agent', "'('", 2), "' '", 1) }},
{{ dbt.split_part(dbt.split_part('context_user_agent', "'('", 2), "' '", 1) }},
';', '')
end as device

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ diffed as (

select
*,
{{ dbt_utils.datediff('previous_tstamp', 'tstamp', 'second') }} as period_of_inactivity
{{ dbt.datediff('previous_tstamp', 'tstamp', 'second') }} as period_of_inactivity
from lagged

),
Expand Down
2 changes: 1 addition & 1 deletion models/sessionization/segment_web_sessions__initial.sql
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ diffs as (

*,

{{ dbt_utils.datediff('session_start_tstamp', 'session_end_tstamp', 'second') }} as duration_in_s
{{ dbt.datediff('session_start_tstamp', 'session_end_tstamp', 'second') }} as duration_in_s

from agg

Expand Down
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: dbt-labs/dbt_utils
version: [">=0.8.0", "<0.9.0"]
version: [">=0.8.0", "<0.9.7"]