Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/update disabling models #35

Merged
merged 6 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# dbt_salesforce v0.7.2
PR [#35](https://github.com/fivetran/dbt_salesforce/pull/35) incorporates the following updates:
## Bug Fixes
- Add all model variables to the README "Disabling Models" section
- Remove model variables from this package's `dbt_project.yml` to avoid potential conflict with a user's settings.


# dbt_salesforce v0.7.1
## Features
- Resolving bug in `salesforce__contact_enhanced` when using user passthrough columns.
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ vars:
```

### Disabling Models
Your connector may not be syncing all tabes that this package references. This might be because you are excluding those tables. If you are not using those tables, you can disable the corresponding functionality in the package by specifying the variable in your `dbt_project.yml`. The metrics from the disabled tables will not populate in downstream models. By default, all packages are assumed to be true. You only have to add variables for tables you want to disable, like so:
It is possible that your Salesforce connector does not sync every table that this package expects. If your syncs exclude certain tables, it is because you either don't use that functionality in Salesforce or actively excluded some tables from your syncs.

The `salesforce__user_role_enabled` variable below refers to the `user_role` table.
To disable the corresponding functionality in this package, you must add the corresponding variable(s) to your `dbt_project.yml`, which are listed below. By default, that is if none of these variables are added, all variables are assumed to be true. Add variables only for the tables you would like to disable:

```yml
# dbt_project.yml
Copy link
Contributor

@fivetran-avinash fivetran-avinash Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove lines 82-86 with the commented out dbt_project.yml and config-version: 2 line. Same with lines 66-70.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and I have updated. I also updated similarly in a few other similar code blocks for consistency.

Expand All @@ -86,6 +86,12 @@ config-version: 2

vars:
salesforce__user_role_enabled: false # Disable if you do not have the user_role table
salesforce__lead_enabled: false # Disable if you do not have the lead table
salesforce__event_enabled: false # Disable if you do not have the event table
salesforce__task_enabled: false # Disable if you do not have the task table
salesforce__opportunity_line_item_enabled: false # Disable if you do not have the opportunity_line_item table
salesforce__order_enabled: false # Disable if you do not have the order table
salesforce__product_2_enabled: false # Disable if you do not have the product_2 table

```
The corresponding metrics from the disabled tables will not populate in the downstream models.
Expand Down
8 changes: 0 additions & 8 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ vars:
user_role_pass_through_columns: []
user_pass_through_columns: []

# Variable for whether you are using the user_role table (default is set to True)
salesforce__user_role_enabled: true
salesforce__lead_enabled: true
salesforce__event_enabled: true
salesforce__task_enabled: true
salesforce__opportunity_line_item_enabled: true
salesforce__order_enabled: true
salesforce__product_2_enabled: true

clean-targets:
- target
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_integration_tests'
version: '0.7.1'
version: '0.7.2'
config-version: 2

profile: 'integration_tests'
Expand Down