Product News

Towards Data Contracts with Census: Iterate faster in dbt without breaking business workflows

Katy Yuan
Katy Yuan August 15, 2022

Katy is a Product Marketing Manager at Census who loves diving into startups, SaaS technology, and modern data platforms. When she's not working, you can find her playing pickleball or Ultimate Frisbee.

Reverse ETL is exciting because it syncs live data to your tools. Our customers use Census to power automated workflows like personalized referral emails or fresh product analytics for go-to-market teams. 

However, as data engineers know, one small edit in dbt can result in real business mistakes. Decisions are misinformed, machine learning models train on misleading data, or customers receive the wrong experience from your marketing, sales, and success organizations.

Our vision is to create an environment where Operations and Data teams can collaborate on data projects with confidence. Creating a reverse ETL sync also creates an implicit contract between teams that data will continue to be trustworthy, high quality, and available. Enforcing a Data Contract requires capabilities that alert the right people about changes that impact business workflows, so they can proactively prevent breakages.

Census already provides end-to-end visibility into your data flows via robust observability and monitoring features. These are critical to understanding and debugging reverse ETL syncs, and our customers currently use them to guarantee healthy data pipelines. However, we think the real opportunity is to prevent issues before they happen.

Today, Census takes the first step towards enabling Data Contracts for Reverse ETL by integrating with your data CI/CD process. We’re releasing dbt Continuous Integration (CI) Checks: a feature to help you double-check that your dbt work won’t break your Census syncs.

Announcing Census’s dbt CI Checks in GitHub

dbt is like your data cookbook. You use it to write recipes on how to transform raw ingredients into a wonderful meal – or in this case, a dataset. 🥘

When you’re working upstream in dbt, it can be hard to remember which reverse ETL syncs depend on a particular dbt model. You could potentially break a sync that keeps a live metric up-to-date. 

When using the Census dbt integration, dbt CI Checks will run in your GitHub account and let you know if you’re about to drop, rename, or move a dbt model that a Census sync depends on. 

Now, you can get an early warning if you're going to break your workflows when you make a change – directly within your GitHub pull request.

Successful CI Check in Github - no Census syncs affected!

How do Census’s dbt CI Checks work?

Check out our product documentation, or watch a handy video tutorial:

When you create a Pull Request (PR) in your dbt repository or commit to any branch with an open Pull Request, Census will run an integration test in your GitHub instance to confirm whether any Census syncs will break because the dbt model is being renamed, deleted, or moved to a different file path.

If the dbt model name or directory change will break a Census sync, Github will warn you before you merge the pull request.

You can see a report of what succeeded and failed, plus which Census syncs or dbt models the PR will affect. Hyperlinks back to Census will enable you to see exactly which data flows will be affected, so you can make plans to adjust your syncs after merging your PR.

When using the Census dbt integration, you can have further confidence that your modeling work in dbt won’t break downstream data. 

Get Started

Here’s how to enable dbt CI Checks for your dbt models in Census.

  1. Navigate to your organization’s dbt Models page.
  2. Go to the settings to ⚙️ Configure dbt Project.
  3. Click the “Enable CI/CD Tests in Github” button to enable dbt CI Checks for your organization. If you’re enabling this for the first time, you might have to grant additional permissions to Census within Github.

For help, follow the product docs, use the in-app chatbox, or reach out to support@getcensus.com with any questions.

👉 Chat with your dedicated Census data consultant or start using Census today with a free trial.

dbt + Census: Do more with your dbt models than just reporting 🤝

With dbt and Census, you can extend your dbt work beyond BI and dashboards. You’ve spent weeks building unified data models – now you can use our native dbt integration to connect those models and materialize them directly into your go-to-market tools.

dbt + Census enables you to:

  • Use centralized data models to quickly deliver standardized metrics to all your business apps
  • Keep all your transform logic in one repository and streamline the data team’s workflows
  • Automate your materialization schedule and data pipelines

Census compiles your models on the fly whenever a sync is scheduled so your data and your models are always up to date. 

If you're using dbt Cloud to run your dbt project, our integration goes even further. You can configure Census to automatically run syncs whenever your models have been rebuilt. See our docs on connecting and configuring dbt Cloud.

If you’re new to dbt-world, check out our explainer blog: What is dbt?

What’s next?

The release of dbt CI Checks expands our support for software engineering best practices for DataOps, and deepens our integration with dbt – one of the most popular data transformation tools in the Modern Data Stack.

Data Contracts will only become more important because downstream users make decisions based on live data flows. As data practitioners become more critical to their organizations, their data ecosystems are also becoming increasingly complex. Automated testing and detection is the only way data and analytics engineers can keep up with their infrastructure at scale.

In fact, we believe that in the near future, features like Census’s dbt CI Checks will be the default. On top of CI tests for data quality (like dbt Cloud’s native continuous integration testing), there will be checks on every dbt repo that ensure changes won’t break downstream processes. For Census’s CI Checks, the future will include checks on dropped and renamed columns, as well as validation that data type changes won’t disrupt your reverse ETL syncs.

Any thoughts? We’d love to chat with you about the future of DataOps, how to design tests, or dbt best practices. Find us in the Operational Analytics Club Slack community!

Related articles

Customer Stories
Built With Census Embedded: Labelbox Becomes Data Warehouse-Native
Built With Census Embedded: Labelbox Becomes Data Warehouse-Native

Every business’s best source of truth is in their cloud data warehouse. If you’re a SaaS provider, your customer’s best data is in their cloud data warehouse, too.

Best Practices
Keeping Data Private with the Composable CDP
Keeping Data Private with the Composable CDP

One of the benefits of composing your Customer Data Platform on your data warehouse is enforcing and maintaining strong controls over how, where, and to whom your data is exposed.

Product News
Sync data 100x faster on Snowflake with Census Live Syncs
Sync data 100x faster on Snowflake with Census Live Syncs

For years, working with high-quality data in real time was an elusive goal for data teams. Two hurdles blocked real-time data activation on Snowflake from becoming a reality: Lack of low-latency data flows and transformation pipelines The compute cost of running queries at high frequency in order to provide real-time insights Today, we’re solving both of those challenges by partnering with Snowflake to support our real-time Live Syncs, which can be 100 times faster and 100 times cheaper to operate than traditional Reverse ETL. You can create a Live Sync using any Snowflake table (including Dynamic Tables) as a source, and sync data to over 200 business tools within seconds. We’re proud to offer the fastest Reverse ETL platform on the planet, and the only one capable of real-time activation with Snowflake. 👉 Luke Ambrosetti discusses Live Sync architecture in-depth on Snowflake’s Medium blog here. Real-Time Composable CDP with Snowflake Developed alongside Snowflake’s product team, we’re excited to enable the fastest-ever data activation on Snowflake. Today marks a massive paradigm shift in how quickly companies can leverage their first-party data to stay ahead of their competition. In the past, businesses had to implement their real-time use cases outside their Data Cloud by building a separate fast path, through hosted custom infrastructure and event buses, or piles of if-this-then-that no-code hacks — all with painful limitations such as lack of scalability, data silos, and low adaptability. Census Live Syncs were born to tear down the latency barrier that previously prevented companies from centralizing these integrations with all of their others. Census Live Syncs and Snowflake now combine to offer real-time CDP capabilities without having to abandon the Data Cloud. This Composable CDP approach transforms the Data Cloud infrastructure that companies already have into an engine that drives business growth and revenue, delivering huge cost savings and data-driven decisions without complex engineering. Together we’re enabling marketing and business teams to interact with customers at the moment of intent, deliver the most personalized recommendations, and update AI models with the freshest insights. Doing the Math: 100x Faster and 100x Cheaper There are two primary ways to use Census Live Syncs — through Snowflake Dynamic Tables, or directly through Snowflake Streams. Near real time: Dynamic Tables have a target lag of minimum 1 minute (as of March 2024). Real time: Live Syncs can operate off a Snowflake Stream directly to achieve true real-time activation in single-digit seconds. Using a real-world example, one of our customers was looking for real-time activation to personalize in-app content immediately. They replaced their previous hourly process with Census Live Syncs, achieving an end-to-end latency of <1 minute. They observed that Live Syncs are 144 times cheaper and 150 times faster than their previous Reverse ETL process. It’s rare to offer customers multiple orders of magnitude of improvement as part of a product release, but we did the math. Continuous Syncs (traditional Reverse ETL) Census Live Syncs Improvement Cost 24 hours = 24 Snowflake credits. 24 * $2 * 30 = $1440/month ⅙ of a credit per day. ⅙ * $2 * 30 = $10/month 144x Speed Transformation hourly job + 15 minutes for ETL = 75 minutes on average 30 seconds on average 150x Cost The previous method of lowest latency Reverse ETL, called Continuous Syncs, required a Snowflake compute platform to be live 24/7 in order to continuously detect changes. This was expensive and also wasteful for datasets that don’t change often. Assuming that one Snowflake credit is on average $2, traditional Reverse ETL costs 24 credits * $2 * 30 days = $1440 per month. Using Snowflake’s Streams to detect changes offers a huge saving in credits to detect changes, just 1/6th of a single credit in equivalent cost, lowering the cost to $10 per month. Speed Real-time activation also requires ETL and transformation workflows to be low latency. In this example, our customer needed real-time activation of an event that occurs 10 times per day. First, we reduced their ETL processing time to 1 second with our HTTP Request source. On the activation side, Live Syncs activate data with subsecond latency. 1 second HTTP Live Sync + 1 minute Dynamic Table refresh + 1 second Census Snowflake Live Sync = 1 minute end-to-end latency. This process can be even faster when using Live Syncs with a Snowflake Stream. For this customer, using Census Live Syncs on Snowflake was 144x cheaper and 150x faster than their previous Reverse ETL process How Live Syncs work It’s easy to set up a real-time workflow with Snowflake as a source in three steps: