Skip to content

Commit

Permalink
Merge pull request #22 from fivetran/MagicBot_f8ca2872d2
Browse files Browse the repository at this point in the history
[MagicBot] Bumping package version
  • Loading branch information
fivetran-joemarkiewicz authored Aug 5, 2021
2 parents c811794 + f67cdee commit 8f7b438
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 25 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Apache License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![dbt logo and version](https://img.shields.io/static/v1?logo=dbt&label=dbt-version&message=0.20.x&color=orange)
# Shopify

This package models Shopify data from [Fivetran's connector](https://fivetran.com/docs/applications/shopify). It uses data in the format described by [this ERD](https://fivetran.com/docs/applications/shopify#schemainformation).
Expand All @@ -21,6 +22,14 @@ This package contains transformation models, designed to work simultaneously wit
## Installation Instructions
Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions, or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages.

Include in your `packages.yml`

```yaml
packages:
- package: fivetran/shopify
version: [">=0.5.0", "<0.6.0"]
```
## Configuration
By default, this package looks for your Shopify data in the `shopify` schema of your [target database](https://docs.getdbt.com/docs/running-a-dbt-project/using-the-command-line-interface/configure-your-profile). If this is not where your Shopify data is, add the following configuration to your `dbt_project.yml` file:

Expand Down Expand Up @@ -74,6 +83,16 @@ on the best workflow for contributing to a package.
## Database support
This package has been tested on BigQuery, Snowflake, Redshift, Postgres, and Databricks.

### Databricks Dispatch Configuration
dbt `v0.20.0` introduced a new project-level dispatch configuration that enables an "override" setting for all dispatched macros. If you are using a Databricks destination with this package you will need to add the below (or a variation of the below) dispatch configuration within your `dbt_project.yml`. This is required in order for the package to accurately search for macros within the `dbt-labs/spark_utils` then the `dbt-labs/dbt_utils` packages respectively.
```yml
# dbt_project.yml
dispatch:
- macro_namespace: dbt_utils
search_order: ['spark_utils', 'dbt_utils']
```

## Resources:
- Provide [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next
- Have questions, feedback, or need help? Book a time during our office hours [using Calendly](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) or email us at [email protected]
Expand Down
31 changes: 12 additions & 19 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@

name: 'shopify'
version: '0.4.2'
version: '0.5.0'
config-version: 2

require-dbt-version: [">=0.18.0", "<0.20.0"]

models:
require-dbt-version: [">=0.20.0"]
models:
shopify:
+schema: shopify
+materialized: table
intermediate:
+materialized: ephemeral

vars:
shopify:
shopify_customer: "{{ ref('stg_shopify__customer') }}"
shopify_order: "{{ ref('stg_shopify__order') }}"
shopify_order_line: "{{ ref('stg_shopify__order_line') }}"
shopify_order_line_refund: "{{ ref('stg_shopify__order_line_refund') }}"
shopify_product: "{{ ref('stg_shopify__product') }}"
shopify_product_variant: "{{ ref('stg_shopify__product_variant') }}"
shopify_transaction: "{{ ref('stg_shopify__transaction') }}"
shopify_refund: "{{ ref('stg_shopify__refund') }}"
shopify_order_adjustment: "{{ ref('stg_shopify__order_adjustment') }}"

dbt_utils_dispatch_list: [spark_utils, fivetran_utils]
fivetran_utils_dispatch_list: [spark_utils]
shopify_customer: "{{ ref('stg_shopify__customer') }}"
shopify_order: "{{ ref('stg_shopify__order') }}"
shopify_order_line: "{{ ref('stg_shopify__order_line') }}"
shopify_order_line_refund: "{{ ref('stg_shopify__order_line_refund') }}"
shopify_product: "{{ ref('stg_shopify__product') }}"
shopify_product_variant: "{{ ref('stg_shopify__product_variant') }}"
shopify_transaction: "{{ ref('stg_shopify__transaction') }}"
shopify_refund: "{{ ref('stg_shopify__refund') }}"
shopify_order_adjustment: "{{ ref('stg_shopify__order_adjustment') }}"
6 changes: 5 additions & 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.4.2'
version: '0.5.0'
profile: 'integration_tests'
config-version: 2

Expand All @@ -16,6 +16,10 @@ vars:
refund_source: "{{ ref('shopify_refund_data') }}"
transaction_source: "{{ ref('shopify_transaction_data') }}"

dispatch:
- macro_namespace: dbt_utils
search_order: ['spark_utils', 'dbt_utils']

seeds:
shopify_integration_tests:
+quote_columns: "{{ true if target.type in ('redshift', 'postgres') else false }}"
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dbt==0.19.1
dbt-spark==0.19.1
dbt-spark[PyHive]==0.19.1
dbt==0.20.1rc1
dbt-spark==0.20.1rc1
dbt-spark[PyHive]==0.20.1rc1
3 changes: 1 addition & 2 deletions packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
packages:

- package: fivetran/shopify_source
version: [">=0.4.0","<0.5.0"]
version: [">=0.5.0", "<0.6.0"]

0 comments on commit 8f7b438

Please sign in to comment.