Releases: fivetran/dbt_salesforce_formula_utils
dbt_salesforce_formula_utils v0.5.0
The v0.5.0 release of the dbt_salesforce_formula_utils package contains the below breaking and non-breaking changes. Refer to the CHANGELOG for more details on the below changes.
🚨 Breaking changes
- Update to the
fields_to_includeargument within thesfdc_formula_viewmacro. The macro now MUST be passed through as an array (using brackets[]) rather than a string (using parenthesis()). (#28)- This fixes a bug where more than one field to include would not work and you would be required to add two or more fields (#25). Additionally, passing the argument in as an array aligns more with dbt best practices.
Bug Fixes
- Addition of the
reserved_tableargument to thesfdc_formula_view_sqlmacro which resolves a bug identified where a duplicate alias error would occur due to aliasing not properly being accounted for in the final compile query. (#30)
Under the hood
- Addition of the
sfdc_old_formula_fieldsmacro which changes the nature of theold_formula_fieldsvariable within thesfdc_formula_viewmacro to exclude only formula fields that are related to the base table. (29)- Previously, if a formula field existed as a base field for another table then it would be erroneously excluded. With this update those fields will not be excluded.
Contributors
BigQuery Backtick Fix
BigQuery Backtick Bug Fix
This release includes the following bug fixes:
- BigQuery users noticed backticks were placed in the incorrect locations within the compiled
view_sqlin the output of the macro. This releases removes the backticks and fixes the compilation error. PR #23
Inclusion Field Ability
🎉 Inclusion Field Argument Addition 🎉
This release adds the ability for users to define the macro in a way that it will only run for desired fields! Other details related to this release are:
- The ability for a user to declare
fields_to_includeas an argument within thesalesforce_formula_utils.sfdc_formula_view()macro. If a user defines this argument then the macro will only include the specified fields in the output of the model. - Addition of the breaking change to rename the
join_to_tableargument to now besource_table.
Reserved Word "From" Bug Fix
🐞 Reserved Word "From" Bug Fix 🐞
This release includes the following non-breaking bug fixes:
- Adjusts the logic within
sfdc_formula_view_sqlto replace only the exactfromandleft joinphrases within the formula field sql. #19
Exact Match for Star Macro
🚧 Exact Match for Star Macro Addition 🚧
This release includes the following non-breaking updates:
- Addition of the
sfdc_star_exactmacro which allows the exclusion fields of the star macro to only exclude fields if they are an exact match. In previous releases, the star util would exclude substring matches. This PR fixes those scenarios.
dbt 0.20.0 Compatibility
🎉 dbt 0.20.0 Compatibility 🎉
🚨 This is a breaking change! 🚨 dbt v0.20.0 or greater is required for this release. If you are not ready to upgrade, consider using a previous release of this package.
Additional considerations when upgrading to this package:
- This package utilizes the latest
v0.7.xrelease of thedbt-labls/dbt_utilspackage. If your project also utilizes a version of thefishtown-analytics/dbt_utilspackage then you will receive a duplicate package error. If this is the case you will need to consider upgrading your other packages to be compatible with this update or use a previous release of this package. - Similar to the above point, all previous Fivetran dbt packages utilize the
fishtown-analytics/dbt_utilspackage and you will need to upgrade all Fivetran dbt packages to the latest dbt 0.20.0 compatibility releases in order for your packages to run without package conflicts.
View SQL And Reference Package Updates
🎉 Salesforce Formula Utils Package Updates 🎉
This release of the package contains a 🚨 breaking change 🚨. The breaking change takes form of directly referencing the new view_sql field which should be populated within your fivetran_formula table. If you do not have this column within your table then this release of the package will not be compatible.
Other updates to the package include:
- Updates to the way the macros are able to perform recursive referencing of third degree and above formula references. This feature will work in some but not all cases. You may still need to exclude tertiary formula reference fields. Issue #11
- Allows the macro to capture all reference formulas within the formula. Issue #13
- Ability to point your macro to a different source that is not explicitly defined as
salesforce. Issue #6
Source Name Parameter and Case Sensitive Fix
🎉 Source Name Parameter Addition and Case Sensitivity Bug Fix 🎉
Happy Friday! This release includes the following non-breaking changes:
- Addition of the
source_nameargument within macros. This argument issalesforceby default, but if a user wishes to point the macro to a different named source then they will be able to using this argument. PR #6 - Bug fix to allow upper case all lookup fields to allow Snowflake to determine duplicates and remove them in the final query.
Referential Formula and Null Bug Fix
This release includes the following non-breaking changes:
- Ability for the macro to generate accurate sql for formulas that reference other formulas. This is limited to two degrees of reference. Any reference above tertiary will not generate accurately. Issue #2
- Adds functionality to pass NULL sql values through for reference formulas. If a formula references a formula with a NULL value within the
sqlcolumn, then the formula will result in a NULL value instead of throwing an error. Issue #7
Initial Release
This is the initial release of the packages!
This package contains a number of macros designed to be used within models of a dbt project to create a new transformed view which appends Salesforce formula fields to the Fivetran synced Salesforce tables.