Skip to content

Commit

Permalink
Merge pull request #66 from fivetran/feature/update_deps
Browse files Browse the repository at this point in the history
update deps
  • Loading branch information
fivetran-reneeli authored Oct 9, 2023
2 parents b1951de + 3de1e0c commit dd3b971
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 47 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# dbt_shopify v0.10.0
## 🚨 Breaking Changes 🚨
- This release will be a breaking change due to the removal of below dependencies.
## Dependency Updates
- Removed the dependency on [dbt-expectations](https://github.com/calogica/dbt-expectations/releases) and updates [dbt-date](https://github.com/calogica/dbt-date/releases) dependencies to the latest version. ([PR #66](https://github.com/fivetran/dbt_shopify/pull/66/))

## Under the Hood
- Removed the `dbt_expectations.expect_table_row_count_to_equal_other_table` test that ensured no fanouts in the metafield models. We will be working to replace this with a similar test. ([PR #66](https://github.com/fivetran/dbt_shopify/pull/66/))

# dbt_shopify v0.9.0
([PR #61](https://github.com/fivetran/dbt_shopify/pull/61)) includes the following updates:
## Breaking Changes
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ If you are **not** using the [Shopify Holistic reporting package](https://github
```yml
packages:
- package: fivetran/shopify
version: [">=0.9.0", "<0.10.0"] # we recommend using ranges to capture non-breaking changes automatically
version: [">=0.10.0", "<0.11.0"] # we recommend using ranges to capture non-breaking changes automatically
```
Do **NOT** include the `shopify_source` package in this file. The transformation package itself has a dependency on it and will install the source package as well.
Expand Down Expand Up @@ -149,7 +149,7 @@ vars:

### Adding Metafields
In [May 2021](https://fivetran.com/docs/applications/shopify/changelog#may2021) the Shopify connector included support for the [metafield resource](https://shopify.dev/api/admin-rest/2023-01/resources/metafield). If you would like to take advantage of these metafields, this package offers corresponding mapping models which append these metafields to the respective source object for the following tables: collection, customer, order, product_image, product, product_variant, shop. If enabled, these models will materialize as `shopify__[object]_metafields` for each respective supported object. To enable these metafield mapping models, you may use the following configurations within your `dbt_project.yml`.
>**Note**: These metafield models will contain all the same records as the corresponding staging models with the exception of the metafield columns being added. To ensure there is no fanout, this package takes advantage of the `dbt_expectations.expect_table_row_count_to_equal_other_table` test to ensure the metafield models contain the same row count as the staging model.
>**Note**: These metafield models will contain all the same records as the corresponding staging models with the exception of the metafield columns being added.

```yml
vars:
Expand Down Expand Up @@ -205,19 +205,16 @@ This dbt package is dependent on the following dbt packages. Please be aware tha
```yml
packages:
- package: fivetran/shopify_source
version: [">=0.9.0", "<0.10.0"]
version: [">=0.10.0", "<0.11.0"]
- package: fivetran/fivetran_utils
version: [">=0.4.0", "<0.5.0"]
- package: dbt-labs/dbt_utils
version: [">=1.0.0", "<2.0.0"]
- package: calogica/dbt_expectations
version: [">=0.8.0", "<0.9.0"]
- package: calogica/dbt_date
version: [">=0.7.0", "<0.8.0"]
version: [">=0.9.0", "<1.0.0"]
- package: dbt-labs/spark_utils
version: [">=0.3.0", "<0.4.0"]
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: '0.9.0'
version: '0.10.0'
config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
models:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/index.html

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 docs/run_results.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: '0.9.0'
version: '0.10.0'
profile: 'integration_tests'
config-version: 2

Expand Down
7 changes: 6 additions & 1 deletion integration_tests/seeds/shopify_order_line_refund_data.csv
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
id,location_id,refund_id,restock_type,quantity,order_line_id,_fivetran_synced
id,location_id,refund_id,restock_type,quantity,order_line_id,_fivetran_synced,subtotal,total_tax_set,subtotal_set,total_tax
189012115527,32131711046,679976206407,return,1,6113984839751,2020-11-14 07:52:56.522,415,,,19.74
289901510727,32131711046,800919683143,return,1,9698959196231,2020-11-14 07:52:56.522,415,,,56.33
196428005447,32131711046,686409187399,return,1,6423996530759,2020-11-14 07:52:56.522,415,,,16.18
286567268423,,798222680135,no_restock,1,6367161483335,2020-11-14 07:52:56.522,415,,,26.17
185936773191,,677359190087,no_restock,1,6009460064327,2020-11-14 07:52:56.522,415,,,13.75
21 changes: 0 additions & 21 deletions models/metafields/shopify_metafields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,21 @@ version: 2
models:
- name: shopify__collection_metafields
description: Replica of the stg_shopify__collection model with the addition of metafields pivoted out from the stg_shopify__metafield model.
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("stg_shopify__collection")

- name: shopify__customer_metafields
description: Replica of the stg_shopify__customer model with the addition of metafields pivoted out from the stg_shopify__metafield model.
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("stg_shopify__customer")

- name: shopify__order_metafields
description: Replica of the stg_shopify__order model with the addition of metafields pivoted out from the stg_shopify__metafield model.
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("stg_shopify__order")

- name: shopify__product_image_metafields
description: Replica of the stg_shopify__product_image model with the addition of metafields pivoted out from the stg_shopify__metafield model.
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("stg_shopify__product_image")

- name: shopify__product_metafields
description: Replica of the stg_shopify__product model with the addition of metafields pivoted out from the stg_shopify__metafield model.
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("stg_shopify__product")

- name: shopify__product_variant_metafields
description: Replica of the stg_shopify__product_variant model with the addition of metafields pivoted out from the stg_shopify__metafield model.
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("stg_shopify__product_variant")

- name: shopify__shop_metafields
description: Replica of the stg_shopify__shop model with the addition of metafields pivoted out from the stg_shopify__metafield model.
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("stg_shopify__shop")
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: fivetran/shopify_source
version: [">=0.9.0", "<0.10.0"]
version: [">=0.10.0", "<0.11.0"]

0 comments on commit dd3b971

Please sign in to comment.