<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rakesh Sharma on Medium]]></title>
        <description><![CDATA[Stories by Rakesh Sharma on Medium]]></description>
        <link>https://medium.com/@rakeshsharma14317?source=rss-51ea688d6068------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vbNbgGJ4Op_oNIk4.jpg</url>
            <title>Stories by Rakesh Sharma on Medium</title>
            <link>https://medium.com/@rakeshsharma14317?source=rss-51ea688d6068------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:57:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rakeshsharma14317/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Publishing Half-Built Data: Versioned Data Releases for dbt on Snowflake]]></title>
            <link>https://medium.com/@rakeshsharma14317/stop-publishing-half-built-data-versioned-data-releases-for-dbt-on-snowflake-5b2e50ef274a?source=rss-51ea688d6068------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b2e50ef274a</guid>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[data-mesh]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Rakesh Sharma]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 13:01:06 GMT</pubDate>
            <atom:updated>2026-10-21T13:01:06.433Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How </em><em>dbt-atomic-promotion enables isolated builds, validated releases, stable consumer-facing schemas, and version-based recovery on Snowflake.</em></p><p><strong>Open source:</strong> <a href="https://github.com/redhat-data-and-ai/dbt-atomic-promotion">dbt-atomic-promotion on GitHub</a></p><h3>The problem: a successful build isn’t necessarily a successful release</h3><p>At 6:12 a.m., Finance opens its revenue dashboard. The revenue model reflects this morning’s run, but the customer dimension still reflects yesterday’s data. The dashboard joins the two and produces a number that looks plausible — but is wrong.</p><p>Meanwhile, a scheduled dbt run is building the next version. Some models complete, others are still running, and a downstream model fails.</p><p>The problem isn’t simply that a dbt job failed. It’s that building a data product and publishing it can be coupled together.</p><p>When production schemas are modified during a run, consumers may encounter intermediate states. A failed run doesn’t necessarily reverse changes from earlier successful model executions, and quality checks that happen after publication may discover issues only after data becomes visible.</p><p>For production data platforms, this creates four challenges:</p><ul><li><strong>Partial publication:</strong> Consumers may encounter a mixture of old and new data.</li><li><strong>Late validation:</strong> Quality issues may be discovered after publication.</li><li><strong>Coupled releases:</strong> Producer and consumer teams must coordinate dependencies and publication timing.</li><li><strong>Expensive recovery:</strong> Restoring a known-good state may require manual intervention or another build.</li></ul><p>These challenges become increasingly important in data mesh architectures, where independently owned data products are consumed through shared contracts and stable interfaces.</p><p>The question isn’t just how to build data faster. It’s how to release data safely.</p><h3>Before atomic promotion: what goes wrong?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KQi2sOkWJc4Po-qkfQWxYQ.png" /><figcaption><em>Figure 1. Common risks of in-place data publication, from intermediate states and failed builds to late validation and recovery challenges.</em></figcaption></figure><p>The diagram highlights five common scenarios:</p><ul><li><strong>A run is still in progress:</strong> Some models have completed while others are still building, potentially exposing intermediate states.</li><li><strong>A run fails:</strong> Earlier successful changes may remain in place.</li><li><strong>Tests fail:</strong> Invalid data may already be visible if validation happens after publication.</li><li><strong>Data products become coupled:</strong> Teams must coordinate schema changes, dependencies, and release timing.</li><li><strong>Recovery becomes expensive:</strong> Without a retained recovery target, restoring a known-good state can require additional work.</li></ul><p>Not every in-place dbt deployment experiences these failures. The risks depend on materializations, execution strategy, tests, and orchestration. The architectural concern is that building and publishing are not necessarily separate operations.</p><h3>The solution: separate building from publishing</h3><p>dbt-atomic-promotion introduces a versioned release workflow around dbt and Snowflake.</p><p>Instead of building directly into the schema consumers use, the workflow creates an isolated candidate schema, such as BUILD_MARTS_&lt;VERSION&gt;, using a Snowflake zero-copy clone.</p><p>dbt builds and tests the candidate while consumers continue reading from the existing MARTS schema. Once the required checks and promotion preflight succeed, the framework promotes the candidate through Snowflake schema swaps.</p><p>The workflow also records deployment history and retains versions according to the configured policy. If a release needs to be reversed, operators can restore a previous version or promote a specific retained version, subject to the availability of the required schemas and a valid promotion state.</p><p>The core principle is simple:</p><p><strong>Isolate the build. Validate before publication. Keep a recovery path.</strong></p><h3>Architecture: how atomic promotion works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OYI1HHM27UX25THUfGIJTg.png" /><figcaption><em>Figure 2. Build and validate in isolation, promote the candidate on success, and retain previous versions for recovery while keeping consumer-facing schema names stable.</em></figcaption></figure><p>The workflow has three main stages:</p><ul><li><strong>Build:</strong> Create an isolated, versioned candidate schema using a Snowflake zero-copy clone. Run dbt models and tests against the candidate without exposing candidate-build changes through the stable consumer-facing schema.</li><li><strong>Promote:</strong> Once the required checks pass, promote the candidate using Snowflake schema swaps. Consumers continue using the MARTS schema name.</li><li><strong>Recover:</strong> Track deployment history and retain previous versions according to the configured policy, providing a defined path to restore a previous version when needed.</li></ul><h3>What changes with atomic promotion?</h3><p><strong>Traditional dbt deployment</strong></p><ul><li><strong>Build:</strong> Models may be built directly into consumer-facing schemas.</li><li><strong>Risk:</strong> Depending on the execution strategy, consumers may encounter intermediate or mixed data states.</li><li><strong>Recovery:</strong> Restoring a previous state may require additional recovery steps.</li></ul><p><strong>Atomic promotion</strong></p><ul><li><strong>Build:</strong> A new version is prepared in an isolated candidate schema.</li><li><strong>Validation:</strong> dbt models and tests run before promotion.</li><li><strong>Promotion:</strong> The validated candidate is promoted to the consumer-facing schema.</li><li><strong>Recovery:</strong> A retained version can be promoted again when rollback is needed.</li></ul><p>The practical benefit is a more controlled release process, clearer deployment history, and a defined recovery path for production data products.</p><h3>Operationalizing it with Airflow</h3><p>The framework can fit into an existing Airflow pipeline without fundamentally changing how teams develop dbt models.</p><p>A typical workflow looks like this:</p><p>prepare_build_schemas → dbt build → promote_all → cleanup_build_schemas</p><p>Each step has a clear responsibility: prepare isolated schemas, build and validate the candidate, promote the validated version, and clean up temporary schemas according to the configured workflow.</p><p>For safer orchestration, configure the DAG to prevent overlapping deployment runs where required (for example, with max_active_runs=1). Configure promotion retries conservatively because promotion is a state-changing operation.</p><p>The framework maintains deployment logs, version inventory, and deployment summaries under promotion_logs by default, unless configured otherwise. This provides a useful audit trail for understanding deployed versions and investigating failures.</p><h3>Rollback and version recovery</h3><p>A deployment strategy is only as useful as its recovery path.</p><p>When a newly promoted version causes an issue, the framework provides operations to roll back to a previous version or promote a specific retained version.</p><p>To roll back to the previous version:</p><pre>dbt run-operation atomic_promotion.rollback_previous \<br>  --args &quot;{job_name: incident}&quot;</pre><p>To promote a specific retained version:</p><pre>dbt run-operation atomic_promotion.promote_all \<br>  --args &quot;{version: 1_4_1_20261012_060000, job_name: incident}&quot;</pre><p>Deployment logs and version inventory help operators identify the version to restore and investigate the incident without necessarily rebuilding the entire data product.</p><h3>Open source: dbt-atomic-promotion</h3><p>The goal of dbt-atomic-promotion is to make versioned data releases a practical pattern for teams using dbt and Snowflake.</p><p>Rather than having every team build its own schema-management, promotion, version-tracking, and rollback mechanisms, the library provides a reusable framework for integrating these capabilities into existing data pipelines.</p><p>It is particularly relevant for teams that:</p><ul><li>Run production dbt workloads on Snowflake.</li><li>Need controlled releases for critical data models.</li><li>Want to reduce the risk of exposing partially updated datasets.</li><li>Need deployment history and a defined recovery path.</li><li>Manage shared data products with downstream consumers that depend on stable interfaces.</li></ul><p>The framework complements existing dbt development and orchestration practices rather than replacing them.</p><p><strong>Explore the project, implementation details, and adoption instructions on GitHub:</strong></p><p><a href="https://github.com/redhat-data-and-ai/dbt-atomic-promotion"><strong>redhat-data-and-ai/dbt-atomic-promotion</strong></a></p><h3>Making data releases safer and more predictable</h3><p>As data platforms mature, deploying data becomes as important as building it.</p><p>Reliable pipelines need more than successful model execution. They need a controlled way to release changes, track deployed versions, protect consumers from incomplete updates, and recover when something goes wrong.</p><p>Atomic promotion brings these concerns into a repeatable workflow: <strong>build separately, validate before release, promote deliberately, and maintain a path to recovery.</strong></p><p>If you’re building production-grade dbt pipelines on Snowflake, explore dbt-atomic-promotion to see how versioned data releases could fit into your existing workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b2e50ef274a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>