Skip to content

Releases: fivetran/dbt_salesforce_formula_utils

dbt_salesforce_formula_utils v0.5.0

20 Oct 15:51

Choose a tag to compare

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_include argument within the sfdc_formula_view macro. 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_table argument to the sfdc_formula_view_sql macro 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_fields macro which changes the nature of the old_formula_fields variable within the sfdc_formula_view macro 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

09 Sep 21:45
3f983dd

Choose a tag to compare

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_sql in the output of the macro. This releases removes the backticks and fixes the compilation error. PR #23

Inclusion Field Ability

16 Aug 22:32
fdb85d2

Choose a tag to compare

🎉 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_include as an argument within the salesforce_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_table argument to now be source_table.

Reserved Word "From" Bug Fix

04 Aug 15:20
7d0a639

Choose a tag to compare

🐞 Reserved Word "From" Bug Fix 🐞

This release includes the following non-breaking bug fixes:

  • Adjusts the logic within sfdc_formula_view_sql to replace only the exact from and left join phrases within the formula field sql. #19

Exact Match for Star Macro

30 Jul 03:59
94e03fe

Choose a tag to compare

🚧 Exact Match for Star Macro Addition 🚧

This release includes the following non-breaking updates:

  • Addition of the sfdc_star_exact macro 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

23 Jul 15:19
023f9f8

Choose a tag to compare

🎉 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.x release of the dbt-labls/dbt_utils package. If your project also utilizes a version of the fishtown-analytics/dbt_utils package 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_utils package 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

14 Jul 18:33
38612b8

Choose a tag to compare

🎉 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

09 Jul 16:47
7b90d47

Choose a tag to compare

🎉 Source Name Parameter Addition and Case Sensitivity Bug Fix 🎉

Happy Friday! This release includes the following non-breaking changes:

  • Addition of the source_name argument within macros. This argument is salesforce by 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

07 Jun 22:12
65b2f2f

Choose a tag to compare

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 sql column, then the formula will result in a NULL value instead of throwing an error. Issue #7

Initial Release

13 May 21:33

Choose a tag to compare

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.