Conversation
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @bmoore813 |
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @bmoore813 |
Problem
Today,
dbt buildreplaces a table before running its data tests. If those tests fail, downstream dbt tasks can stop, but other consumers can already see the failed data.This PR proposes an opt-in publication gate for Snowflake SQL table models and includes an implementation for maintainer review. The goal is to agree on the behavior and limited initial scope before considering broader warehouse or materialization support.
Solution
{{ config(materialized='table', wap=true) }}For an opted-in model,
dbt build:CREATE OR REPLACE TABLE … CLONE …only when every required audit reportsPASS.Failed or warning audits leave the existing published table unchanged and retain the working table for inspection. An audit failure on a first build leaves the published table absent. No additional schema is created. The model's public relation, manifest identity, and ordinary downstream
ref()calls stay unchanged.The first version supports only native permanent/transient Snowflake SQL models using the built-in
tablematerialization. The flag defaults to false and supports project inheritance. Incremental and other materializations, custom materializations, model hooks, SQL headers, and multi-relation audits are outside this initial scope.dbt runanddbt clonereject selected WAP models; standalonedbt testcontinues to test published data. Retry creates a fresh working table and reruns all required audits. The implementation adds a publication dependency to scheduling, scopes working-table references to audits, and prevents cached SQL or audit results from bypassing the gate.The branch includes design and implementation notes and live acceptance instructions.
Tradeoffs and requested feedback
Maintainer feedback is requested on the
wapconfiguration, strictPASSgate, command behavior, and limited initial scope. An associated feature issue and interface approval are still needed before merge.Validation
--all-targets -- -D warnings; formatting andgit diff --checkpass.Checklist