Skip to content

Commit

Permalink
MagicBot/add-model-counts updates (#94)
Browse files Browse the repository at this point in the history
Co-authored-by: Avinash Kunnath <[email protected]>
  • Loading branch information
fivetran-catfritz and fivetran-avinash authored Jan 22, 2025
1 parent c76ad39 commit b5a6f5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- For each staging model, if the source table is not found in any of your schemas, the package will create a table with one row with null values for Redshift destinations. There will be no change in behavior in other non-Redshift warehouses.
- This is necessary as Redshift will ignore explicit data casts when a table is completely empty and materialize every column as a `varchar`. This throws errors in downstream transformations in the `shopify` package. The 1 row will ensure that Redshift will respect the package's datatype casts.

## Documentation
- Corrected references to connectors and connections in the README. ([#94](https://github.com/fivetran/dbt_shopify_source/pull/94))

# dbt_shopify_source v0.14.0
[PR #93](https://github.com/fivetran/dbt_shopify_source/pull/93) includes the following changes:

Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
## How do I use the dbt package?
### Step 1: Prerequisites
To use this dbt package, you must have the following:
- At least one Fivetran Shopify connector syncing data into your destination.
- At least one Fivetran Shopify connection syncing data into your destination.
- A **BigQuery**, **Snowflake**, **Redshift**, **Databricks**, or **PostgreSQL** destination.

#### Databricks dispatch configuration
Expand All @@ -49,7 +49,7 @@ packages:
```

### Step 3: Define database and schema variables
#### Single connector
#### Single connection
By default, this package runs using your destination and the `shopify` schema. If this is not where your Shopify data is (for example, if your Shopify schema is named `shopify_fivetran` and your `issue` table is named `usa_issue`), add the following configuration to your root `dbt_project.yml` file:

```yml
Expand All @@ -58,8 +58,8 @@ vars:
shopify_schema: your_schema_name
```

#### Union multiple connectors
If you have multiple Shopify connectors in Fivetran and would like to use this package on all of them simultaneously, we have provided functionality to do so. The package will union all of the data together and pass the unioned table into the transformations. You will be able to see which source it came from in the `source_relation` column of each model. To use this functionality, you will need to set either the `shopify_union_schemas` OR `shopify_union_databases` variables (cannot do both) in your root `dbt_project.yml` file:
#### Union multiple connections
If you have multiple Shopify connections in Fivetran and would like to use this package on all of them simultaneously, we have provided functionality to do so. The package will union all of the data together and pass the unioned table into the transformations. You will be able to see which source it came from in the `source_relation` column of each model. To use this functionality, you will need to set either the `shopify_union_schemas` OR `shopify_union_databases` variables (cannot do both) in your root `dbt_project.yml` file:

```yml
# dbt_project.yml
Expand Down Expand Up @@ -142,8 +142,10 @@ models:
+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. This config is available only when running the package on a single connector:

#### Change the source table references (not available if unioning multiple Shopify connections)
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: This config is available only when running the package on a single connection:

> 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.

```yml
Expand Down

0 comments on commit b5a6f5f

Please sign in to comment.