PR #56 includes the following updates:
- 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.
- 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
.
PR #55 includes the following updates:
- 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.
- Added validation test to ensure the final column names generated before and after this update remain the same.
PR #52 includes the following updates:
- 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.
- Updated structure of model
int_salesforce__date_spine
for improved performance and maintainability. - Updated maintainer pull request template.
PR #48 includes the following updates:
- 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
- Documents how users without an
opportunity
table can still have the package run successfully for them. See README for details.
- Included auto-releaser GitHub Actions workflow to automate future releases.
Please note that this data model will now create a new transformation for all your Salesforce objects (tables) to replicate and include the relevant Salesforce formula fields. With the addition of formula fields, your transformation schema will change to <connector_schema> + _quickstart
, rather than inheriting the schema from your connector. Please make sure you adjust downstream queries accordingly. If you wish to disable any of these new transformations you may remove them within the UI.
If you are not already a Quickstart Data Model user, you can find out more information here!
π£ THIS IS A MAJOR PACKAGE RELEASE! π£ More details below.
PR #45 includes the following updates:
- 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.
-
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.
- 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.
PR #44 introduces the following update:
- 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.
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.
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
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 |
- Incorporated the new
fivetran_utils.drop_schemas_automation
macro into the end of each Buildkite integration test job. - Updated the pull request templates.
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"]
.
PR #35 incorporates the following updates:
- 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.
- Resolving bug in
salesforce__contact_enhanced
when using user passthrough columns. - Resolving bug in
salesforce__opportunity_line_item_enhanced
when using user passthrough columns.
π Salesforce Package Updates π
PR #30 includes various updates to the Salesforce package! To improve its utility, the changes include the following:
- Creating a new
salesforce__contact_enhanced
,salesforce__daily_activity
, andsalesforce__opportunity_line_item_enhanced
model as well as updating thesalesforce__opportunity_enhanced
model. - Allowing formula fields to be added as passthrough columns. We added integration with the Salesforce Formula package by embedding the macro outputs as part of our staging models so that your custom formula fields can be included.
- Add enable/disable configs for tables that you may not be syncing
- Add identifier variables in case a source table has a different name from the default
- Add history mode configs for the new source tables
- Add passthrough column configs for additional columns that you wish to populate in the end models
- Updated package to align with most recent standards:
- Updated formatting in our
sql
files. - The README has been updated to reflect our rehaul of our documentation style to make it more straightforward. (#28)
- Updated formatting in our
- Support for Databricks compatibility! (#24)
- Added feature to disable
user_role
table if not being synced. This will build the models while ignoring metrics depending on theuser_role
table.
π dbt v1.0.0 Compatibility π
- Adjusts the
require-dbt-version
to now be within the range [">=1.0.0", "<2.0.0"]. Additionally, the package has been updated for dbt v1.0.0 compatibility. If you are using a dbt version <1.0.0, you will need to upgrade in order to leverage the latest version of the package.- For help upgrading your package, I recommend reviewing this GitHub repo's Release Notes on what changes have been implemented since your last upgrade.
- For help upgrading your dbt project to dbt v1.0.0, I recommend reviewing dbt-labs upgrading to 1.0.0 docs for more details on what changes must be made.
- Upgrades the package dependency to refer to the latest
dbt_salesforce_source
. Additionally, the latestdbt_salesforce_source
package has a dependency on the latestdbt_fivetran_utils
. Further, the latestdbt_fivetran_utils
package also has a dependency ondbt_utils
[">=0.8.0", "<0.9.0"].- Please note, if you are installing a version of
dbt_utils
in yourpackages.yml
that is not in the range above then you will encounter a package dependency error.
- Please note, if you are installing a version of
Refer to the relevant release notes on the Github repository for specific details for the previous releases. Thank you!