Skip to content

Commit

Permalink
Merge pull request #24 from fivetran/bugfix/timestamp_cast
Browse files Browse the repository at this point in the history
bugfix/timestamp_cast
  • Loading branch information
fivetran-joemarkiewicz authored Mar 2, 2022
2 parents 5f71271 + 7424b8e commit 3d90397
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# dbt_salesforce_source v0.4.2
## Fixes
- Casts the `created_date` and `closed_date` fields within the `stg_salesforce__opportunity` model to a timestamp using the `dbt_utils.type_timestamp()` macro. This is needed for Redshift users that see these fields being synced as `timestamptz` as the downstream date functions do not work with the timestamptz datatype.
# dbt_salesforce_source v0.4.1
## Features
- Support for Databricks compatibility! ([#20](https://github.com/fivetran/dbt_salesforce_source/pull/20))
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2

name: 'salesforce_source'
version: '0.4.1'
version: '0.4.2'


require-dbt-version: [">=1.0.0", "<2.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'salesforce_source_integration_tests'
version: '0.4.1'
version: '0.4.2'

config-version: 2

Expand Down
4 changes: 2 additions & 2 deletions models/stg_salesforce__opportunity.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ with source as (
account_id,
cast(amount as {{ dbt_utils.type_numeric() }}) as amount,
campaign_id,
close_date,
created_date,
cast(close_date as {{ dbt_utils.type_timestamp() }}) as close_date,
cast(created_date as {{ dbt_utils.type_timestamp() }}) as created_date,
description,
cast(expected_revenue as {{ dbt_utils.type_numeric() }}) as expected_revenue,
fiscal,
Expand Down

0 comments on commit 3d90397

Please sign in to comment.