-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ct-2198: Unify constraints and check_constraints fields #7130
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
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.
This looks pretty good, except that the field I put in the wrong place should be moved :)
* first pass * rename tests * fix failing test * changelog * fix functional test * Update core/dbt/parser/base.py * Update core/dbt/parser/schemas.py
…#7115) * update to allow adapters to change model name resolution in py models * add changie * fix newline adds * move quoting into macro * use single quotes
Co-authored-by: Github Build Bot <buildbot@fishtownanalytics.com>
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 don't think this handles invalid column level constraint types.
core/dbt/include/global_project/macros/materializations/models/table/columns_spec_ddl.sql
Outdated
Show resolved
Hide resolved
plugins/postgres/dbt/include/postgres/macros/utils/columns_spec_ddl.sql
Outdated
Show resolved
Hide resolved
core/dbt/adapters/base/impl.py
Outdated
@@ -1262,6 +1265,39 @@ def get_incremental_strategy_macro(self, model_context, strategy: str): | |||
# This returns a callable macro | |||
return model_context[macro_name] | |||
|
|||
@classmethod | |||
def _parse_constraint(cls, raw_constraint: Dict[str, Any]) -> ColumnLevelConstraint: |
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.
naming nit: _parse_column_constraint
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! A couple comments, nothing blocking.
Already addressed requested changes.
resolves #7066
Description
Checklist
changie new
to create a changelog entry