Skip to content
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

Merged
merged 7 commits into from May 13, 2024

Conversation

ciprian-cgr
Copy link
Contributor

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.

@CLAassistant
Copy link

CLAassistant commented May 11, 2024

CLA assistant check
All committers have signed the CLA.

@ciprian-cgr ciprian-cgr reopened this May 11, 2024
@izeigerman
Copy link
Member

izeigerman commented May 12, 2024

Make sure to run make style to run linters and the code formatter

@@ -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):
Copy link
Member

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):
Copy link
Member

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?

Copy link
Member

@izeigerman izeigerman left a 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!

@izeigerman izeigerman merged commit 3f2643a into TobikoData:main May 13, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants