Skip to content

Commit

Permalink
Merge pull request #33 from fivetran/customer/passthrough_fix
Browse files Browse the repository at this point in the history
Customer/passthrough fix
  • Loading branch information
fivetran-avinash authored Aug 25, 2022
2 parents 305474f + ce635e5 commit 6bdfbec
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# dbt_salesforce v0.7.1
## Features
- Resolving bug in `salesforce__contact_enhanced` when using user passthrough columns.
- Resolving bug in `salesforce__opportunity_line_item_enhanced` when using user passthrough columns.

## Contributors
- [@calder-holt](https://github.com/calder-holt) ([#32](https://github.com/fivetran/dbt_salesforce/pull/32))

# dbt_salesforce v0.7.0
🎉 Salesforce Package Updates 🎉

Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'salesforce'
version: '0.7.0'
version: '0.7.1'
require-dbt-version: [">=1.0.0", "<2.0.0"]
models:
salesforce:
Expand Down
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,14 +16,14 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: salesforce_integration_tests_3
schema: salesforce_integration_tests_4
threads: 8
bigquery:
type: bigquery
method: service-account
keyfile: "{{ env_var('GCLOUD_SERVICE_KEY_PATH') }}"
project: 'dbt-package-testing'
schema: salesforce_integration_tests_3
schema: salesforce_integration_tests_4
threads: 8
snowflake:
type: 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: salesforce_integration_tests_3
schema: salesforce_integration_tests_4
threads: 8
postgres:
type: postgres
Expand All @@ -42,12 +42,12 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: salesforce_integration_tests_3
schema: salesforce_integration_tests_4
threads: 8
spark:
type: spark
method: http
schema: salesforce_integration_tests_3
schema: salesforce_integration_tests_4
host: "{{ env_var('CI_SPARK_DBT_HOST') }}"
organization: "{{ env_var('CI_SPARK_DBT_ORGANIZATION') }}"
token: "{{ env_var('CI_SPARK_DBT_TOKEN') }}"
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'salesforce_integration_tests'
version: '0.7.0'
version: '0.7.1'
config-version: 2

profile: 'integration_tests'
Expand All @@ -24,7 +24,7 @@ vars:
salesforce_product_2_identifier: "sf_product_2_data"
salesforce_order_identifier: "sf_order_data"
salesforce_opportunity_line_item_identifier: "sf_opportunity_line_item_data"
salesforce_schema: salesforce_integration_tests_3
salesforce_schema: salesforce_integration_tests_4

seeds:
salesforce_integration_tests:
Expand Down
6 changes: 3 additions & 3 deletions models/salesforce__contact_enhanced.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ select

--The below scripts allows for pass through columns.
{% if var('contact_pass_through_columns',[]) != [] %}
, {{ var('contact_pass_through_columns') | join (", contact.")}}
, contact.{{ var('contact_pass_through_columns') | join (", contact.")}}

{% endif %}

{% if var('account_pass_through_columns',[]) != [] %}
, {{ var('account_pass_through_columns') | join (", account.")}}
, account.{{ var('account_pass_through_columns') | join (", account.")}}

{% endif %}

{% if var('user_pass_through_columns',[]) != [] %}
, {{ var('user_pass_through_columns') | join (", user.")}}
, salesforce_user.{{ var('user_pass_through_columns') | join (", salesforce_user.")}}

{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions models/salesforce__opportunity_line_item_enhanced.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ final as (

--The below script allows for pass through columns.
{% if var('opportunity_line_item_pass_through_columns',[]) != [] %}
, {{ var('opportunity_line_item_pass_through_columns') | join (", oli.")}}
, oli.{{ var('opportunity_line_item_pass_through_columns') | join (", oli.")}}

{% endif %}

{% if var('product_2_pass_through_columns',[]) != [] %}
, {{ var('product_2_pass_through_columns') | join (", product_2.")}}
, product_2.{{ var('product_2_pass_through_columns') | join (", product_2.")}}

{% endif %}

Expand Down

0 comments on commit 6bdfbec

Please sign in to comment.