Skip to content

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

@MichelleArk

Description

@MichelleArk

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions