Releases: fivetran/dbt_salesforce
v1.1.1 dbt_salesforce
PR #56 includes the following updates:
Bugfix
- Updated the logic for model
int_salesforce__date_spine
to reference thestg_*
staging models instead of the source tables.- This was necessary since the staging models account for multiple spellings of column names while the source tables do not.
Under the hood
- Added
--depends_on:
comments toint_salesforce__date_spine
to prevent errors duringdbt run
. - Added
flags.WHICH in ('run', 'build')
as a condition inint_salesforce__date_spine
to prevent call statements from querying the staging models during adbt compile
.
Full Changelog: v1.1.0...v1.1.1
v1.1.0 dbt_salesforce
PR #55 includes the following updates:
🚨 Breaking Change 🚨
- This change is made breaking due to changes made in the source package. See the v1.1.0 dbt_salesforce_source release notes for more details.
- Added logic to support user-specified scenarios where the Fivetran Salesforce connector syncs column names using the original Salesforce API naming convention. For example, while Fivetran typically provides the column as
created_date
, some users might choose to receive it asCreatedDate
according to the API naming. This update ensures the package is automatically compatible with both naming conventions.- Specifically, the package now performs a COALESCE, preferring the original Salesforce API naming. If the original naming is not present, the Fivetran version is used instead.
- Renamed columns are now explicitly cast to prevent conflicts during the COALESCE.
- ❗This change is considered breaking since the resulting column types may differ from prior versions of this package.
Under the hood
- Added validation test to ensure the final column names generated before and after this update remain the same.
Full Changelog: v1.0.2...v1.1.0
v1.0.2 dbt_salesforce
PR #52 includes the following updates:
Bug fixes
- Updated model
int_salesforce__date_spine
to accommodate when the Salesforcelead
object exists but has no records. In this case, the model now defaults to a range of one-month from the current date.
Under the hood
- Updated structure of model
int_salesforce__date_spine
for improved performance and maintainability. - Updated maintainer pull request template.
Full Changelog: v1.0.1...v1.0.2
v1.0.1 dbt_salesforce
PR #48 includes the following updates:
Bug Fix
- Aligns the
last_date_query
logic in theint_salesforce__date_spine
model with thefirst_date_query
logic. This ensures that users with emptyopportunity
tables will have a valid end-date (based onlead
instead ofopportunity
) for thesalesforce__daily_activity
end model.- Also adds coalesce-logic to
int_salesforce__date_spine
to ensure a succesful run withoutlead
data.
- Also adds coalesce-logic to
Documentation
- Documents how users without an
opportunity
table can still have the package run successfully for them. See README for details.
Under the Hood
- Included auto-releaser GitHub Actions workflow to automate future releases.
Full Changelog: v1.0.0...v1.0.1
v1.0.0 dbt_salesforce
📣 THIS IS A MAJOR PACKAGE RELEASE! 📣 More details below.
PR #45 includes the following updates:
🚨 Breaking Change 🚨
- We have removed all
tmp
models in the dependentdbt_salesforce_source
package, and will use thefivetran_utils.fill_staging_column
macro to compare directly to our source models in your schemas.
🚀 Feature Updates 🚀
-
We have added daily history mode models in the
models/salesforce_history
folder based off of Fivetran's history mode feature, pulling from source models indbt_salesforce_source
. This will allow customers to utilize the Fivetran history mode feature, which records every version of each record in the source table from the moment this mode is activated in the equivalent tables. -
IMPORTANT: All fields in your Salesforce history mode connector that are being synced are being included in the end models. To change which fields are brought in via end models, you will need to update the fields you are bringing in via your history mode connector in Fivetran and then run a
dbt run --full-refresh
. See the DECISIONLOG for more details. -
Below are the new models included in this update:
Model added | Description |
---|---|
salesforce__account_daily_history | Each record is a daily record in an account, starting with its first active date and updating up toward either the current date (if still active) or its last active date. |
salesforce__contact_daily_history | Each record is a daily record in an contact, starting with its first active date and updating up toward either the current date (if still active) or its last active date. |
salesforce__opportunity_daily_history | Each record is a daily record in an opportunity, starting with its first active date and updating up toward either the current date (if still active) or its last active date. |
-
All history models are incremental due to the volume of data being ingested.
-
We support the option to pull from both your standard Salesforce and History Mode connectors simultaneously from their specific database/schemas. We also support pulling from just your History Mode connector on its own and bypassing the standard connector on its own. See more detailed instructions for configuring your history mode database and schema variables in the README.
-
These models are disabled by default due to their size, so you will need to set the below variable configurations for each of the individual models you want to utilize in your
dbt_project.yml
. More details are available in the README.
vars:
salesforce__[history_model]_enabled: true ##Ex: salesforce__account_history_enabled: true
- We've added variable configuration that will allow you to filter the history start and end dates to filter down the data you ingest in each model. See the
Setting the date range for the Salesforce Daily History models
section in the README for more details.
🔎 Under The Hood 🔎
- We have deprecated the
using_[source]_history_mode_active_records
variables. The introduction of the new history mode capabilities in this package made these variables redundant.
v0.9.3 dbt_salesforce
PR #44 introduces the following update:
🪲 Bug Fix ⚒️
- Updated the
first_date_query
logic inint_salesforce__date_spine
to select first date from the minimumcreated_date
on theopportunity
source when thelead
source is not available.
Full Changelog: v0.9.2...v0.9.3
v0.9.2 dbt_salesforce
Documentation and Notice Updates
PR #42 includes the following update:
- Notices were added to both the top of the CHANGELOG and within the README to alert users of the Quickstart Data Model that Salesforce formulas will be replicated in the Fivetran transformation. For non Quickstart Data Model users there will be no change following this update.
- If you would like to learn more about the Quickstart Data Model for Salesforce you can find more information here.
Full Changelog: v0.9.1...v0.9.2
v0.9.1 dbt_salesforce
Bug Fixes
PR #40 includes the following bug fixes.
- The
salesforce__opportunity_pass_through_columns
passthrough variable config has been removed from thesalesforce__opportunity_enhanced
to ensure duplicate columns are not introduced when leveraging the opportunity passthrough functionality.- When using the
salesforce__opportunity_pass_through_columns
variable, you will still see the results populated in thesalesforce__opportunity_enhanced
. The fields are already introduced via theopportunity.*
in the select statement.
- When using the
Full Changelog: v0.9.0...v0.9.1
v0.9.0 dbt_salesforce
🚨 Breaking Changes 🚨:
PR #38 includes the following breaking changes:
-
Updates the old passthrough column methodology to allow for aliasing and/or transformations of any field names brought in. This is useful, for example, if you wish to bring in fields across different Salesforce objects that may have the same names and wish to alias them to avoid confusion, particularly if any of the objects are joined together.
-
Additionally, in the
salesforce__opportunity_enhanced
model, the oldopportunity_enhanced_pass_through_columns
variable has been replaced with the existing variables from the staging models (see below). This is because we updated thesalesforce__opportunity_enhanced
model with regards to how custom fields passed through from theuser
table are dealt with. Since theuser
model is joined in two times, once as information about an opportunity owner and the other about an opportunity manager, to avoid ambiguity, custom fields passed through from the user table will be suffixed based on whether it belongs to a user who is an_owner
or a_manager
. -
Finally, we have added the
salesforce__
prefix to all the passthrough variables:
Old | New |
---|---|
account_pass_through_columns | salesforce__account_pass_through_columns |
contact_pass_through_columns | salesforce__contact_pass_through_columns |
event_pass_through_columns | salesforce__event_pass_through_columns |
lead_pass_through_columns | salesforce__lead_pass_through_columns |
opportunity_pass_through_columns | salesforce__opportunity_pass_through_columns |
opportunity_line_item_pass_through_columns | salesforce__opportunity_line_item_pass_through_columns |
order_pass_through_columns | salesforce__order_pass_through_columns |
product_2_pass_through_columns | salesforce__product_2_pass_through_columns |
task_pass_through_columns | salesforce__task_pass_through_columns |
user_role_pass_through_columns | salesforce__user_role_pass_through_columns |
user_pass_through_columns | salesforce__user_pass_through_columns |
Under the Hood:
- Incorporated the new
fivetran_utils.drop_schemas_automation
macro into the end of each Buildkite integration test job. - Updated the pull request templates.
dbt_salesforce v0.8.0
🚨 Breaking Changes 🚨:
PR #36 includes the following breaking changes:
- Dispatch update for dbt-utils to dbt-core cross-db macros migration. Specifically
{{ dbt_utils.<macro> }}
have been updated to{{ dbt.<macro> }}
for the below macros:any_value
bool_or
cast_bool_to_text
concat
date_trunc
dateadd
datediff
escape_single_quotes
except
hash
intersect
last_day
length
listagg
position
replace
right
safe_cast
split_part
string_literal
type_bigint
type_float
type_int
type_numeric
type_string
type_timestamp
array_append
array_concat
array_construct
- For
current_timestamp
andcurrent_timestamp_in_utc
macros, the dispatch AND the macro names have been updated to the below, respectively:dbt.current_timestamp_backcompat
dbt.current_timestamp_in_utc_backcompat
- Dependencies on
fivetran/fivetran_utils
have been upgraded, previously[">=0.3.0", "<0.4.0"]
now[">=0.4.0", "<0.5.0"]
.