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

Releases/v0.12.latest #87

Merged
merged 17 commits into from
Jun 11, 2024
Merged
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# dbt_shopify_source v0.12.1

## 🪲 Bug Fixes 🪛
- Added support for a new `delayed` fulfillment event status from Shopify. `delayed` has been added to the `accepted_values` test on `stg_shopify__fulfillment_event` ([PR #84](https://github.com/fivetran/dbt_shopify_source/pull/84)).
- Added `product_id` to the unique `combination_of_columns` test for the `stg_shopify__product_image` model ([PR #86](https://github.com/fivetran/dbt_shopify_source/pull/86)).

## Contributors
- [@ryan-brainforge](https://github.com/ryan-brainforge) ([PR #86](https://github.com/fivetran/dbt_shopify_source/pull/86))
- [@shreveasaurus](https://github.com/shreveasaurus) ([PR #84](https://github.com/fivetran/dbt_shopify_source/pull/84))

# dbt_shopify_source v0.12.0

[PR #79](https://github.com/fivetran/dbt_shopify_source/pull/79) introduces the following changes:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ vars:
> **Note**: This will only **numerically** convert timestamps to your target timezone. They will however have a "UTC" appended to them. This is a current limitation of the dbt-date `convert_timezone` [macro](https://github.com/calogica/dbt-date#convert_timezone-column-target_tznone-source_tznone) we leverage.

## (Optional) Step 6: Additional configurations
<details><summary>Expand to view configurations</summary>
<details open><summary>Expand/Collapse configurations</summary>

### Passing Through Additional Fields
This package includes all source columns defined in the macros folder. You can add more columns using our pass-through column variables. These variables allow for the pass-through fields to be aliased (`alias`) and casted (`transform_sql`) if desired, but not required. Datatype casting is configured via a sql snippet within the `transform_sql` key. You may add the desired sql while omitting the `as field_name` at the end and your custom pass-though fields will be casted accordingly. Use the below format for declaring the respective pass-through variables:
Expand All @@ -122,6 +122,7 @@ vars:
alias: "subsidiary_field"
product_pass_through_columns:
- name: "this_field"
transform_sql: "cast(this_field as string)"
product_variant_pass_through_columns:
- name: "new_custom_field"
alias: "custom_field"
Expand All @@ -137,6 +138,7 @@ models:
shopify_source:
+schema: my_new_schema_name # leave blank for just the target_schema
```

### Change the source table references (not available if unioning multiple Shopify connectors)
If an individual source table has a different name than the package expects, add the table name as it appears in your destination to the respective variable:
> IMPORTANT: See this project's [`src_shopify.yml`](https://github.com/fivetran/dbt_shopify_source/blob/main/models/src_shopify.yml) for the default names.
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_source'
version: '0.12.0'
version: '0.12.1'
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.

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.

6 changes: 3 additions & 3 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'shopify_source_integration_tests'
version: '0.12.0'
version: '0.12.1'
profile: 'integration_tests'
config-version: 2

vars:
shopify_schema: shopify_source_integration_tests_10
shopify_schema: "shopify_source_integration_tests_10"
# shopify_using_fulfillment_event: true # enable when regenerating docs
shopify_source:
shopify_customer_identifier: "shopify_customer_data"
Expand Down Expand Up @@ -181,4 +181,4 @@ seeds:
markup: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
price: float
original_shop_markup: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
original_shop_price: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
original_shop_price: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
2 changes: 1 addition & 1 deletion integration_tests/seeds/shopify_fulfillment_event_data.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id,_fivetran_synced,address_1,city,country,created_at,estimated_delivery_at,fulfillment_id,happened_at,latitude,longitude,message,order_id,province,shop_id,status,updated_at,zip,_fivetran_deleted
451435,2022-11-18 04:39:07.945000,,,,2022-08-29 20:52:39.000000,,40495,2022-08-29 20:52:39.000000,,,,4502987,,89440612,delivered,2022-08-29 20:52:39.000000,,false
48779,2022-11-18 05:48:01.773000,,LONDON,GB,2022-09-13 08:07:57.000000,,4064737,2022-08-15 12:41:00.000000,101.349998474121094,-14.0333000011742115,Delay,4588203,,320612,out_for_delivery,2022-09-13 08:07:57.000000,CR0,false
1481515,2022-11-18 05:41:00.745000,,ECHO PARK,AU,2022-09-14 14:16:52.000000,2022-09-14 08:00:00.000000,4019339,2022-09-14 01:26:00.000000,-3.797698974609375,190.783958203125,Delay,451915,,89320612,out_for_delivery,2022-09-14 14:16:52.000000,2759,false
1481515,2022-11-18 05:41:00.745000,,ECHO PARK,AU,2022-09-14 14:16:52.000000,2022-09-14 08:00:00.000000,4019339,2022-09-14 01:26:00.000000,-3.797698974609375,190.783958203125,Delay,451915,,89320612,delayed,2022-09-14 14:16:52.000000,2759,false
558955,2022-11-18 10:51:24.286000,,LAZYTOWN,US,2022-08-13 12:40:26.000000,,402947,2022-03-01 10:36:39.000000,22.337699890136719,-71.731002807617188,Delay,429188587,MA,89420612,in_transit,2022-08-13 12:40:26.000000,01505,false
6904235,2022-11-18 08:58:00.458000,,LA,US,2022-08-24 06:29:21.000000,2022-08-24 23:59:59.000000,4060491,2022-08-24 05:30:57.000000,12.287498474121094,-21.3573989868164,Delay,4242667,MA,89420612,in_transit,2022-08-24 06:29:21.000000,01760,false
5 changes: 3 additions & 2 deletions models/stg_shopify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,7 @@ models:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- product_image_id
- product_id
- source_relation
columns:
- name: _fivetran_synced
Expand Down Expand Up @@ -1668,7 +1669,7 @@ models:
- failure: Something went wrong when pulling tracking information for the shipment, such as the tracking number was invalid or the shipment was canceled.
tests:
- accepted_values:
values: ['attempted_delivery', 'delivered', 'failure', 'in_transit', 'out_for_delivery', 'ready_for_pickup', 'picked_up', 'label_printed', 'label_purchased', 'confirmed']
values: ['attempted_delivery', 'delayed', 'delivered', 'failure', 'in_transit', 'out_for_delivery', 'ready_for_pickup', 'picked_up', 'label_printed', 'label_purchased', 'confirmed']
config:
severity: warn # we pivot these out in shopify__daily_shop
- name: updated_at
Expand Down Expand Up @@ -1700,4 +1701,4 @@ models:
- name: rate
description: The proportion of the line item price that the tax represents as a decimal.
- name: title
description: The name of the tax.
description: The name of the tax.