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

Update partition logic, add source relation #78

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
13 changes: 13 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'auto release'
on:
pull_request:
types:
- closed
branches:
- main

jobs:
call-workflow-passing-data:
if: github.event.pull_request.merged
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
secrets: inherit
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
target/
dbt_modules/
logs/

dbt_packages/
package-lock.yml
dbt_packages/
env/
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# dbt_shopify_source v0.10.1
[PR #78](https://github.com/fivetran/dbt_shopify_source/pull/78) introduces the following changes:

## 🐛 Bug Fixes 🪛
- Added `source_relation` to the `partition_by` clauses that determine the `is_most_recent_record` in the `stg_shopify__metafield` and `stg_shopify__abandoned_checkout_discount_code` tables.
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
- Additionally updated partition logic in `stg_shopify__metafield` and `stg_shopify__abandoned_checkout_discount_code` to account for null table Redshift errors when handling null field cases.

## 🚘 Under The Hood 🚘
- Included auto-releaser GitHub Actions workflow to automate future releases.
- Added additional casting in seed dependencies for above models `integration_tests/dbt_project.yml` to ensure local testing passed on null cases.

# dbt_shopify_source v0.10.0
## 🚨 Breaking Changes 🚨
- This release will be a breaking change due to the removal of below dependencies.
Expand Down
4 changes: 2 additions & 2 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: 'shopify_source'
version: '0.10.0'
version: '0.10.1'
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
models:
shopify_source:
+schema: stg_shopify
+materialized: table
tmp:
+materialized: view
+materialized: table
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
vars:
shopify_source:
customer_source: "{{ source('shopify','customer') }}"
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 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.

10 changes: 5 additions & 5 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: shopify_source_integration_tests_7
schema: shopify_source_integration_tests_9
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: shopify_source_integration_tests_7
schema: shopify_source_integration_tests_9
threads: 8
keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
snowflake:
Expand All @@ -33,7 +33,7 @@ integration_tests:
role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
schema: shopify_source_integration_tests_7
schema: shopify_source_integration_tests_9
threads: 8
postgres:
type: postgres
Expand All @@ -42,13 +42,13 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: shopify_source_integration_tests_7
schema: shopify_source_integration_tests_9
threads: 8
databricks:
catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: shopify_source_integration_tests_7
schema: shopify_source_integration_tests_9
threads: 2
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
12 changes: 10 additions & 2 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.10.0'
version: '0.10.1'
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
profile: 'integration_tests'
config-version: 2

vars:
shopify_schema: shopify_source_integration_tests_7
shopify_schema: shopify_source_integration_tests_9
shopify_source:
shopify_customer_identifier: "shopify_customer_data"
shopify_order_line_refund_identifier: "shopify_order_line_refund_data"
Expand Down Expand Up @@ -109,9 +109,14 @@ seeds:
user_id: "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"
shopify_abandoned_checkout_discount_code_data:
+column_types:
checkout_id: "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"
discount_id: "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"
amount: float
_fivetran_synced: timestamp
created_at: timestamp
updated_at: timestamp
code: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
type: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
shopify_abandoned_checkout_data:
+column_types:
total_line_items_price: float
Expand Down Expand Up @@ -150,6 +155,9 @@ seeds:
+column_types:
value_type: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
type: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
_fivetran_synced: timestamp
created_at: timestamp
updated_at: timestamp
shopify_shop_data:
+column_types:
taxes_included: boolean
Expand Down
Loading