Skip to content

Commit

Permalink
Merge pull request #6 from fivetran/bugfix/cast-to-boolean
Browse files Browse the repository at this point in the history
Update stg_qualtrics__survey_response.sql
  • Loading branch information
fivetran-catfritz authored Apr 30, 2024
2 parents 7420a38 + 580938f commit 36dfc65
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 8 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# v0.2.1 dbt_qualtrics_source

[PR #6](https://github.com/fivetran/dbt_qualtrics_source/pull/6) includes the following updates:

## Bug Fix
- Updated model `stg_qualtrics__survey_response` to use a case statement to determine the `is_finished` boolean value instead of a straight cast to boolean.
- This is necessary for warehouses that do not support the straight cast.

## Under the Hood
- Updated the integration tests seed `survey_response` to test both possible values for `finished`.

# v0.2.0 dbt_qualtrics_source

[PR #5](https://github.com/fivetran/dbt_qualtrics_source/pull/5) includes the following updates:
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: 'qualtrics_source'
version: '0.2.0'
version: '0.2.1'
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/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.

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: 'qualtrics_source_integration_tests'
version: '0.2.0'
version: '0.2.1'
profile: 'integration_tests'
config-version: 2

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/seeds/survey_response.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ R_3e9aZTqhcgXRH0o,2023-05-02 00:11:25.529000,email,9,2022-12-07 08:59:21.000000,
R_2DUphVbjGZGkvkg,2023-05-02 00:11:13.034000,anonymous,118,2022-10-17 10:52:34.000000,0,182.69.177.103,2022-10-24 10:52:34.000000,,,12,,,,2022-10-24 10:52:34.000000,2022-10-17 10:50:36.000000,0,SV_6Jcja72TpOiHjdX,EN
R_1LIOcMY4EdVCU3r,2023-05-02 00:11:25.566000,anonymous,26,2022-12-07 10:04:28.000000,0,182.69.177.44,2022-12-14 10:04:31.000000,,,20,,,,2022-12-14 10:04:31.000000,2022-12-07 10:04:01.000000,0,SV_6Jcja72TpOiHjdX,EN
R_3q9HmgV7GfTQP6o,2023-05-02 00:11:25.381000,anonymous,8,2022-10-19 13:38:21.000000,0,49.204.210.134,2022-12-07 07:58:37.000000,,,32,,,,2022-10-26 14:47:34.000000,2022-10-19 13:38:13.000000,0,SV_6Jcja72TpOiHjdX,EN
R_3lDZ9xxqR5Ptexd,2023-05-02 00:11:43.953000,email,32,2023-02-28 12:40:15.000000,0,122.162.147.254,2023-03-21 12:47:06.000000,,,23,jatin.aggarwal1406@gmail.com,Jatin,Aggarwak=l,2023-02-28 12:44:17.000000,2023-02-28 12:39:43.000000,0,SV_6Jcja72TpOiHjdX,EN
R_3lDZ9xxqR5Ptexd,2023-05-02 00:11:43.953000,email,32,2023-02-28 12:40:15.000000,1,122.162.147.254,2023-03-21 12:47:06.000000,,,23,jatin.aggarwal1406@gmail.com,Jatin,Aggarwak=l,2023-02-28 12:44:17.000000,2023-02-28 12:39:43.000000,0,SV_6Jcja72TpOiHjdX,EN
2 changes: 1 addition & 1 deletion models/stg_qualtrics__survey_response.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final as (
distribution_channel,
duration_in_seconds,
cast(end_date as {{ dbt.type_timestamp() }}) as finished_at,
cast(finished as {{ dbt.type_boolean() }}) as is_finished,
cast(case when finished = 1 then true else false end as {{ dbt.type_boolean() }}) as is_finished,
id as response_id,
ip_address,
cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_at,
Expand Down

0 comments on commit 36dfc65

Please sign in to comment.