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

[CT-2293] Enforce model contracts for incremental materializations #7154

Closed
Tracked by #6747

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Mar 10, 2023

When contract is true, model contracts are enforced prior to table creation for table materializations.

Similarly, Incremental models would need to enforce contracts as part of the existing model contract validation that occurs in adapter-dispatched create_table_as macro calls in incremental materializations.

Acceptance criteria:

  • Introduce new adapter Integration tests that validate model contract is enforced and constraint DDL is generated for models with incremental materializations with contract: true. Ensure adapter tests pass in spark, redshift, snowflake, and bigquery repos.
  • Remove any existing detection / error messaging around limitations of using contract:true with certain SQL materializations. For example, here and here
  • Validate that and raise an error during parsing to ensure that materialized models with contract:true use the on_schema_change: append_new_columns option. (perhaps in the post_init method on the NodeConfig class here.

Related discussion / spiking: #6755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment