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
#2335 Add support for session properties in model defaults #2596
Conversation
feat: add support for session properties in model defaults TobikoData#2335
Make sure to run |
@@ -2698,6 +2698,47 @@ def test_model_table_properties_conflicts() -> None: | |||
sql_model.physical_properties | |||
|
|||
|
|||
def test_session_properties_on_model_and_project(sushi_context): |
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.
Let's also add a test when there are only defaults but nothing is set in the model definition.
} | ||
|
||
|
||
def test_project_level_session_properties(sushi_context): |
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 adding this test! Since you caught an edge case which involved a Python model would it make sense to add a test which tests specifically the dict
route?
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 a lot for addressing comments!
This should allow you to set session_properties on the project configuration which will then be propagated on the models. If custom properties are also set on the specific model, those will not be overwritten by the default ones. It might need some more work when adding the default props to handle quoted/unquoted identifiers better; right now, it sets them by default as quoted=False.