diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e7b1d..ef85fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# dbt_salesforce_formula_utils v0.6.5 +## Features +- Inclusion of the `materialization` argument to the `sfdc_formula_view` macro. The argument is `view` by default. However, if a user wishes to override the materialization then they may do so with this argument. # dbt_salesforce_formula_utils v0.6.4 ## Under the Hood - The string `__table` is now appended to the table alias to match with the data provided within the connector. To ensure consistency across the board, the `reserved_table_name` argument is now ignored in place of the `{{source_table}}__table` format. ([#51](https://github.com/fivetran/dbt_salesforce_formula_utils/pull/51)) diff --git a/README.md b/README.md index fd30093..7ecb920 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ This macro generates the final sql needed to join the Salesforce formula fields * `source_table` (required): The table with which you are joining the formula fields. * `source_name` (optional, default 'salesforce'): The dbt source containing the table you want to join with formula fields. Must also contain the `fivetran_formula` table. * `fields_to_include` (optional, default is none): If a users wishes to only run the formula fields macro for designated fields then they may be applied within this variable. This variable will ensure the model only generates the sql for the designated fields. +* `materialization` (optional, default is `view`): By default the model will be materialized as a view. If you would like to materialize as a table, you can adjust using this argument. > Note: If you populate the `fields_to_include` argument then the package will exclusively look for those fields. If you have designated a field to be excluded within the `sfdc_exclude_formulas` variable, then this will be ignored and the field will be included in the final model. ---- diff --git a/dbt_project.yml b/dbt_project.yml index 096b541..46ac942 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'salesforce_formula_utils' -version: '0.6.4' +version: '0.6.5' config-version: 2 require-dbt-version: [">=1.0.0", "<2.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index b016403..3d20fc3 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,6 +1,6 @@ name: 'salesforce_formula_integration_tests' -version: '0.6.4' +version: '0.6.5' profile: 'integration_tests' config-version: 2 diff --git a/macros/sfdc_formula_view.sql b/macros/sfdc_formula_view.sql index 1b80897..0576cd1 100644 --- a/macros/sfdc_formula_view.sql +++ b/macros/sfdc_formula_view.sql @@ -1,9 +1,9 @@ -{%- macro sfdc_formula_view(source_table, source_name='salesforce', reserved_table_name=source_table, fields_to_include=none) -%} +{%- macro sfdc_formula_view(source_table, source_name='salesforce', reserved_table_name=source_table, fields_to_include=none, materialization='view') -%} -- Best practice for this model is to be materialized as view. That is why we have set that here. {{ config( - materialized = 'view' + materialized = materialization ) }}