Skip to content

Commit

Permalink
Merge pull request #8 from fivetran/hotfix/sf-star-update
Browse files Browse the repository at this point in the history
Hotfix/sf star update
  • Loading branch information
fivetran-reneeli authored Oct 1, 2021
2 parents fdb0dee + a7e1908 commit 10fa5a6
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'klaviyo'
version: '0.2.0'
version: '0.2.1'
config-version: 2
require-dbt-version: ">=0.20.0"

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'klaviyo_integration_tests'
version: '0.2.0'
version: '0.2.1'
config-version: 2
profile: 'integration_tests'

Expand Down
1 change: 0 additions & 1 deletion models/klaviyo__campaigns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ campaign_metrics as (
campaign_join as (

{% set exclude_fields = [ 'last_touch_campaign_id', 'last_touch_flow_id'] %}
{% set exclude_fields = exclude_fields | upper if target.type == 'snowflake' else exclude_fields %} -- snowflake needs uppercase :)

select
campaign.*, -- has campaign_id
Expand Down
3 changes: 1 addition & 2 deletions models/klaviyo__events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ event_fields as (

-- excluding some fields to rename them and/or make them null if needed
{% set exclude_fields = ['touch_session', 'last_touch_id', 'session_start_at', 'session_event_type', 'type', 'session_touch_type'] %}
-- snowflake has to be uppercase :)
{% set exclude_fields = exclude_fields | upper if target.type == 'snowflake' else exclude_fields %}
-- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion

select
{{ dbt_utils.star(from=ref('int_klaviyo__event_attribution'), except=exclude_fields) }},
Expand Down
1 change: 0 additions & 1 deletion models/klaviyo__flows.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ flow_metrics as (
flow_join as (

{% set exclude_fields = [ 'last_touch_campaign_id', 'last_touch_flow_id'] %}
{% set exclude_fields = exclude_fields | upper if target.type == 'snowflake' else exclude_fields %} -- snowflake needs uppercase :)

select
flow.*, -- has flow_id
Expand Down
2 changes: 1 addition & 1 deletion models/klaviyo__persons.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ person_join as (

select
person.*,
{{ dbt_utils.star(from=ref('int_klaviyo__person_metrics'), except=['person_id'] if target.type != 'snowflake' else ['PERSON_ID'] ) }}
{{ dbt_utils.star(from=ref('int_klaviyo__person_metrics'), except=['person_id']) }}

from person
left join person_metrics using(person_id)
Expand Down

0 comments on commit 10fa5a6

Please sign in to comment.