- 
                Notifications
    You must be signed in to change notification settings 
- Fork 207
Support the volatility config of function nodes #1414
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
base: main
Are you sure you want to change the base?
Support the volatility config of function nodes #1414
Conversation
…nsure we get `EventCatcher` from package
| {% if model.config.get('volatility') == 'deterministic' %} | ||
| IMMUTABLE | ||
| {% elif model.config.get('volatility') == 'stable' %} | ||
| {% do exceptions.raise_compiler_error("`Stable` function volatility is not supported for Snowflake") %} | 
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.
Alternatively we could
- Ignore stable
- Raise a warning
The benefit of doing so would be that switching a project from another data warehouse to snowflake wouldn't break functions declared "stable". The drawback of not raising an error is that a user might set stable for a function in snowflake, think doing so is doing so does something, but it doesn't 🤔
cc: @graciegoheen
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.
Relatedly, in dbt-bigquery we're just ignoring volatility. What we decided to do with stable in dbt-snowflake is also what we should do with any volatility setting in dbt-bigquery
36e15ee    to
    52aeb96      
    Compare
  
    
resolves #1345
Problem
dbt-core added the ability to set function node volatility in dbt-labs/dbt-core#12100. Thus in adapters we needed to begin interpolating the correct volatility value into the function materialization macros.
Solution
Checklist