Skip to content

Commit

Permalink
Merge pull request #182 from fivetran/bugfix/redshift_empty_tables
Browse files Browse the repository at this point in the history
make patch update to account for upstream changes
  • Loading branch information
fivetran-reneeli authored Jan 13, 2025
2 parents be1ba2f + bb47018 commit 9751431
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 17 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# dbt_zendesk v0.20.0

## [Upstream Under-the-Hood Updates](https://github.com/fivetran/dbt_zendesk_source/releases/tag/v0.15.0)
- (Affects Redshift only) Updates the `union_zendesk_connections` macro to use a limit 1 instead of limit 0 for empty tables.
- When a table is empty, Redshift ignores explicit data casts and will materialize every column as a `varchar`. Redshift users may experience errors in downstream transformations as a consequence.
- For each staging model, if the source table is not found, the package will create a empty table with 0 rows for non-Redshift warehouses and a table with 1 all-`null` row for Redshift destinations. The 1 row will ensure that Redshift will respect the package's datatype casts.

## Documentation Update
- Moved badges at top of the README below the H1 header to be consistent with popular README formats.

# dbt_zendesk v0.19.3
[PR #185](https://github.com/fivetran/dbt_zendesk/pull/185) includes the following updates:

Expand Down Expand Up @@ -27,7 +37,6 @@
## Documentation Updates
- [Updated README](https://github.com/fivetran/dbt_zendesk?tab=readme-ov-file#step-4-enabledisable-models-for-non-existent-sources) with instructions on how to disable `brand` and `organization` sources.


# dbt_zendesk v0.19.1
[PR #180](https://github.com/fivetran/dbt_zendesk/pull/180) includes the following update:

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<p align="center">
# Zendesk Support Modeling dbt Package ([Docs](https://fivetran.github.io/dbt_zendesk/))

<p align="left">
<a alt="License"
href="https://github.com/fivetran/dbt_zendesk/blob/main/LICENSE">
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" /></a>
Expand All @@ -13,7 +15,6 @@
<img src="https://img.shields.io/badge/Fivetran_Quickstart_Compatible%3F-yes-green.svg" /></a>
</p>

# Zendesk Support Modeling dbt Package ([Docs](https://fivetran.github.io/dbt_zendesk/))
## What does this dbt package do?
- Produces modeled tables that leverage Zendesk Support data from [Fivetran's connector](https://fivetran.com/docs/applications/zendesk) in the format described by [this ERD](https://fivetran.com/docs/applications/zendesk#schemainformation) and build off the output of our [zendesk source package](https://github.com/fivetran/dbt_zendesk_source).
- Enables you to better understand the performance of your Support team. It calculates metrics focused on response times, resolution times, and work times for you to analyze. It performs the following actions:
Expand Down Expand Up @@ -65,7 +66,7 @@ Include the following zendesk package version in your `packages.yml` file:
```yml
packages:
- package: fivetran/zendesk
version: [">=0.19.0", "<0.20.0"]
version: [">=0.20.0", "<0.21.0"]
```
> **Note**: Do not include the Zendesk Support source package. The Zendesk Support transform package already has a dependency on the source in its own `packages.yml` file.
Expand Down Expand Up @@ -290,7 +291,7 @@ This dbt package is dependent on the following dbt packages. These dependencies
```yml
packages:
- package: fivetran/zendesk_source
version: [">=0.14.0", "<0.15.0"]
version: [">=0.15.0", "<0.16.0"]
- package: fivetran/fivetran_utils
version: [">=0.4.0", "<0.5.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: 'zendesk'
version: '0.19.3'
version: '0.20.0'

config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
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.

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: zendesk_integration_tests_61
schema: zendesk_integration_tests_63
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: zendesk_integration_tests_61
schema: zendesk_integration_tests_63
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: zendesk_integration_tests_61
schema: zendesk_integration_tests_63
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: zendesk_integration_tests_61
schema: zendesk_integration_tests_63
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: zendesk_integration_tests_61
schema: zendesk_integration_tests_63
threads: 8
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
config-version: 2

name: 'zendesk_integration_tests'
version: '0.19.3'
version: '0.20.0'

profile: 'integration_tests'

vars:
zendesk_schema: zendesk_integration_tests_61
zendesk_schema: zendesk_integration_tests_63

zendesk_source:
zendesk_organization_identifier: "organization_data"
Expand Down
5 changes: 3 additions & 2 deletions packages.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
packages:
- package: fivetran/zendesk_source
version: [">=0.14.0", "<0.15.0"]
version: [">=0.15.0", "<0.16.0"]

- package: calogica/dbt_date
version: [">=0.9.0", "<1.0.0"]
version: [">=0.9.0", "<1.0.0"]

0 comments on commit 9751431

Please sign in to comment.