Skip to content
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# dbt_shopify v1.6.0-a1

[PR #152](https://github.com/fivetran/dbt_shopify/pull/152) includes the following updates:

## Schema/Data Changes
**3 total changes • 3 possible breaking changes**

| Data Model(s) | Change type | Field(s) | Old | New | Notes |
| --- | --- | --- | --- | --- | --- |
| `shopify_gql__customer_cohorts`<br>`shopify_gql__customer_email_cohorts`<br>`shopify__customer_email_cohorts` | Data quality | `cohort_month_number`<br>`total_price_lifetime`<br>`order_count_lifetime`<br>`line_item_count_lifetime` | May contain null values on incremental runs | Properly calculated values | `--full-refresh` recommended |

# dbt_shopify v1.5.2

[PR #144](https://github.com/fivetran/dbt_shopify/pull/144) includes the following updates:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ If you are **not** using the [Shopify Holistic reporting package](https://github
```yml
packages:
- package: fivetran/shopify
version: [">=1.5.0", "<1.6.0"]
version: "1.6.0-a1"
```

> All required sources and staging models are now bundled into this transformation package. Do not include `fivetran/shopify_source` in your `packages.yml` since this package has been deprecated.
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'shopify'
version: '1.5.2'
version: '1.6.0'
config-version: 2
require-dbt-version: [">=1.3.0", "<3.0.0"]
models:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

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: 'shopify_integration_tests'
version: '1.5.2'
version: '1.6.0'
profile: 'integration_tests'
config-version: 2

Expand Down
8 changes: 4 additions & 4 deletions models/graphql/shopify_gql__customer_cohorts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ with calendar as (
windows.order_count_in_month,
windows.total_price_in_month,
windows.line_item_count_in_month,
backfill_lifetime_sums.previous_cohort_month_number + windows.cohort_month_number as cohort_month_number,
backfill_lifetime_sums.previous_total_price_lifetime + windows.total_price_lifetime as total_price_lifetime,
backfill_lifetime_sums.previous_order_count_lifetime + windows.order_count_lifetime as order_count_lifetime,
backfill_lifetime_sums.previous_line_item_count_lifetime + windows.line_item_count_lifetime as line_item_count_lifetime,
coalesce(backfill_lifetime_sums.previous_cohort_month_number, 0) + coalesce(windows.cohort_month_number, 0) as cohort_month_number,
coalesce(backfill_lifetime_sums.previous_total_price_lifetime, 0) + coalesce(windows.total_price_lifetime, 0) as total_price_lifetime,
coalesce(backfill_lifetime_sums.previous_order_count_lifetime, 0) + coalesce(windows.order_count_lifetime, 0) as order_count_lifetime,
coalesce(backfill_lifetime_sums.previous_line_item_count_lifetime, 0) + coalesce(windows.line_item_count_lifetime, 0) as line_item_count_lifetime,
{{ dbt_utils.generate_surrogate_key(['windows.date_month','windows.customer_id','windows.source_relation']) }} as customer_cohort_id
from windows
left join backfill_lifetime_sums
Expand Down
8 changes: 4 additions & 4 deletions models/graphql/shopify_gql__customer_email_cohorts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ with calendar as (
windows.order_count_in_month,
windows.total_price_in_month,
windows.line_item_count_in_month,
backfill_lifetime_sums.previous_cohort_month_number + windows.cohort_month_number as cohort_month_number,
backfill_lifetime_sums.previous_total_price_lifetime + windows.total_price_lifetime as total_price_lifetime,
backfill_lifetime_sums.previous_order_count_lifetime + windows.order_count_lifetime as order_count_lifetime,
backfill_lifetime_sums.previous_line_item_count_lifetime + windows.line_item_count_lifetime as line_item_count_lifetime,
coalesce(backfill_lifetime_sums.previous_cohort_month_number, 0) + coalesce(windows.cohort_month_number, 0) as cohort_month_number,
coalesce(backfill_lifetime_sums.previous_total_price_lifetime, 0) + coalesce(windows.total_price_lifetime, 0) as total_price_lifetime,
coalesce(backfill_lifetime_sums.previous_order_count_lifetime, 0) + coalesce(windows.order_count_lifetime, 0) as order_count_lifetime,
coalesce(backfill_lifetime_sums.previous_line_item_count_lifetime, 0) + coalesce(windows.line_item_count_lifetime, 0) as line_item_count_lifetime,
{{ dbt_utils.generate_surrogate_key(['windows.date_month','windows.email','windows.source_relation']) }} as customer_cohort_id
from windows
left join backfill_lifetime_sums
Expand Down
8 changes: 4 additions & 4 deletions models/rest/shopify__customer_email_cohorts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ with calendar as (
windows.order_count_in_month,
windows.total_price_in_month,
windows.line_item_count_in_month,
backfill_lifetime_sums.previous_cohort_month_number + windows.cohort_month_number as cohort_month_number,
backfill_lifetime_sums.previous_total_price_lifetime + windows.total_price_lifetime as total_price_lifetime,
backfill_lifetime_sums.previous_order_count_lifetime + windows.order_count_lifetime as order_count_lifetime,
backfill_lifetime_sums.previous_line_item_count_lifetime + windows.line_item_count_lifetime as line_item_count_lifetime,
coalesce(backfill_lifetime_sums.previous_cohort_month_number, 0) + coalesce(windows.cohort_month_number, 0) as cohort_month_number,
coalesce(backfill_lifetime_sums.previous_total_price_lifetime, 0) + coalesce(windows.total_price_lifetime, 0) as total_price_lifetime,
coalesce(backfill_lifetime_sums.previous_order_count_lifetime, 0) + coalesce(windows.order_count_lifetime, 0) as order_count_lifetime,
coalesce(backfill_lifetime_sums.previous_line_item_count_lifetime, 0) + coalesce(windows.line_item_count_lifetime, 0) as line_item_count_lifetime,
{{ dbt_utils.generate_surrogate_key(['windows.date_month','windows.email','windows.source_relation']) }} as customer_cohort_id
from windows
left join backfill_lifetime_sums
Expand Down