-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/sunset full statement version #109
Feature/sunset full statement version #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-catfritz thanks for addressing this update so quickly! I have a few comments and requests before approval.
While we are sunsetting functionality, I don't want a customer to upgrade and it possibly cause catastrophic failures in their dbt project. Ideally, we create "soft" failures and provide informative messages so customers know what actions they need to take if the release notes were not reviewed prior to upgrading.
Let me know if you want to sync on my comments and if you want to brainstorm some ideas. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-joemarkiewicz thank you for the review comments! I have made the updates, and this is ready for re-review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-catfritz great work on this PR! This is nearly ready, I just have a few final comments before this is ready for approval and release.
README.md
Outdated
@@ -21,14 +21,15 @@ This package includes macros and scipts to be used within a dbt project to accur | |||
To use this dbt package, you must have the following: | |||
- At least one Fivetran Salesforce connector syncing data into your destination. | |||
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination. | |||
- **dbt Core**: This package is designed to work with dbt Core and is **not** compatible with dbt Cloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package is technically compatibile with dbt Core. It is only this section that is not. Could we remove this change and instead update this section to callout that it is only compatible with dbt Core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Updated!
macros/sfdc_formula_view.sql
Outdated
-- Raise a warning if users are trying to use full_statement_version=false. We are keeping the variable in the macro, however, since we don't want errors if they previously set it to true. | ||
{% if not full_statement_version %} | ||
{{ exceptions.warn("\ERROR: The full_statement_version=false, reserved_table_name, and fields_to_include parameters are no longer supported. Please update your " ~ this.identifier|upper ~ " model to remove these parameters.\n") }} | ||
* See full model error in log. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. That works for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments @fivetran-joemarkiewicz! I have made the updates, and it's ready for re-review!
README.md
Outdated
@@ -21,14 +21,15 @@ This package includes macros and scipts to be used within a dbt project to accur | |||
To use this dbt package, you must have the following: | |||
- At least one Fivetran Salesforce connector syncing data into your destination. | |||
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination. | |||
- **dbt Core**: This package is designed to work with dbt Core and is **not** compatible with dbt Cloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Updated!
macros/sfdc_formula_view.sql
Outdated
-- Raise a warning if users are trying to use full_statement_version=false. We are keeping the variable in the macro, however, since we don't want errors if they previously set it to true. | ||
{% if not full_statement_version %} | ||
{{ exceptions.warn("\ERROR: The full_statement_version=false, reserved_table_name, and fields_to_include parameters are no longer supported. Please update your " ~ this.identifier|upper ~ " model to remove these parameters.\n") }} | ||
* See full model error in log. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. That works for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-catfritz just a few last comments. Let me know once ready for re-review.
macros/sfdc_formula_view.sql
Outdated
@@ -1,4 +1,4 @@ | |||
{%- macro sfdc_formula_view(source_table, source_name='salesforce', reserved_table_name=source_table, fields_to_include=none, full_statement_version=true, materialization='view', using_quoted_identifiers=False) -%} | |||
{%- macro sfdc_formula_view(source_table, source_name='salesforce', materialization='view', using_quoted_identifiers=False, full_statement_version=true) -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was doing some final tests and noticed a major compilation error when testing what happens when I still have reserved_table_name
or fields_to_include
as a parameter. For example the following code:
{{ salesforce_formula_utils.sfdc_formula_view(
source_table='task_priority',
fields_to_include=['new_field','cool_field'])
}}
Results in the following full dbt project level compilation error (nothing else in the project can compile).
This error completely ignores the informative error message you provide in the logs. I don't want to risk potentially breaking an entire workflow because we wanted to remove these parameters. I know I recommended removing these, but given this error message this is too dangerous. I recommend we keep all the terminology that these fields are deprecated (because they are and don't do anything).
{%- macro sfdc_formula_view(source_table, source_name='salesforce', materialization='view', using_quoted_identifiers=False, full_statement_version=true) -%} | |
{%- macro sfdc_formula_view(source_table, source_name='salesforce', reserved_table_name=source_table, fields_to_include=none, full_statement_version=true, materialization='view', using_quoted_identifiers=False) -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From our discussion, I added the defaults for the variables back in but keeping the conditions for the warning the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-joemarkiewicz this is ready for re-review!
macros/sfdc_formula_view.sql
Outdated
@@ -1,4 +1,4 @@ | |||
{%- macro sfdc_formula_view(source_table, source_name='salesforce', reserved_table_name=source_table, fields_to_include=none, full_statement_version=true, materialization='view', using_quoted_identifiers=False) -%} | |||
{%- macro sfdc_formula_view(source_table, source_name='salesforce', materialization='view', using_quoted_identifiers=False, full_statement_version=true) -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From our discussion, I added the defaults for the variables back in but keeping the conditions for the warning the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks for all your work on this PR @fivetran-catfritz I have just one final CHANGELOG request but that won't block the approval. Once that last CHANGELOG update is applied this will be good for release review.
CHANGELOG.md
Outdated
|
||
## 🚨 Breaking Changes 🚨 | ||
- As announced in the [v0.9.2 August 2023 release](https://github.com/fivetran/dbt_salesforce_formula_utils/releases/tag/v0.9.2), the parameter `full_statement_version=false` has now been fully sunset from the `sfdc_formula_view` macro. You will now need to remove this parameter to avoid a compilation error. | ||
- As part of this deprecation, the parameters `reserved_table_name` and `fields_to_include` have also been deprecated and will also need to be removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also include a sub bullet mentioning all of the macros that were removed as part of this update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! just one suggestion to insert a link in one more place
Co-authored-by: Jamie Rodriguez <[email protected]>
PR Overview
This PR will address the following Issue/Feature:
full_statement_version=false
code #105This PR will result in the following new package version:
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
dbt run (if incremental models are present) && dbt testBefore marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
Consistency tests pass
When setting
full_statement_version=false
in a model, a compilation error is successfully thrown.Additional notes
full_statement_version=true
continues to be allowed so that users do not experience the below compilation failure since the macro cannot take an unexpected argument.If you had to summarize this PR in an emoji, which would it be?
💃