With companies now collecting millions of data points from their customers, it is essential to implement efficient retrieving and storing of this data for analysis.

If you are at all involved in building and managing systems, the chances are that you've heard of Change Data Capture (CDC). But what exactly is it? The acronym can be a bit confusing because most people think about 'capture' as something done by a person, such as taking notes during a meeting or capturing photos with a camera. However, when we talk about CDC, we're referring to computer software that tracks changes made over time within databases so that when new data is written, it can be extracted from those databases.

In simple terms, CDC is used to capture all data added or changed in your database over time into separate files organized based on specific criteria. The criteria can be several things, such as date range, and then loaded into new tables to be queried just like regular data. 

Table of Contents

  1. Change Data Capture Overview
  2. How Does CDC Work?
  3. Different Types of Change Data Capture Methods
  4. Trigger-based CDC 
  5. Log-Based CDC
  6. Who is Change Data Capture For?
  7. Change Data Capture in ETL
  8. Integrate.io and Change Data Capture

Change Data Capture Overview

The processes and techniques that detect changes made to a source table or source database, typically in real-time, are known as change data capture. The modified rows or entries are then transmitted via data replication to a target location, for example, from an AWS provider such as Amazon Redshift, Microsoft Azure SQL Data Warehouse, Oracle Data Integrator, or Snowflake.

CDC allows you to write changes to an offline storage location called a Change Data Capture target directly from the source database. When executing queries against Change_Table in future queries, you can observe what changed in your tables over time using historical CDC snapshots.

How Does CDC Work?

Change Data Capture works by recording changes made to a data source from the application, database management system, or ETL tool. You must execute the CDC process at least once per table for an initial load of historical changes to be recorded and applied later when querying Change_Table.

There are two main types of change capture: log-based and trigger-based.

Different Types of Change Data Capture Methods

Log-based methods require low overhead but can miss out on some transactions if there is no activity during the period between snapshots. In addition, log-based systems typically don't support complex updates such as multi-row inserts or deletes because they involve multiple operations on a single row.

In contrast, trigger-based methods only require the system time and usually provide better performance with complex updates. But they cannot record all transactions that occur during each interval between snapshots because of changes occurring outside of the monitoring window.

Trigger-based CDC 

Trigger Based Change Data is a change data capture mechanism that captures all the INSERT, UPDATE, and DELETES operations performed on tables or databases after a particular event (trigger) fires. It captures changes and propagates them to an appropriate location such as data warehouse/data marts, where they can be queried for further analysis.

Trigger-based CDC has been around for decades. It is widely used in various Oracle-based systems like GoldenGate, Data Guard (physical standby), Streams and RAC database cluster. However, it's less commonly used with other major relational DBMS platforms like Microsoft SQL Server, MySQL / MariaDB, PostgreSQL, although there are some third-party products available from providers like Integrate.io that provide similar functionality.

Log-Based CDC

Log Based Change Data is a change data capture mechanism that captures all the INSERT, UPDATE and DELETE operations performed on tables or databases after a particular event (log trigger) fires. Unlike Trigger-based CDC, Log-based CDC can also capture additional information such as the user who's performing this operation along with a timestamp and other details about what exactly happened during an update/delete/insert operation.

Log-Based CDC captures Row-level changes only. In other words, Column Level Changes are NOT captured.

Log-Based Change Data Capture architecture works by generating log records for each database transaction within your application, just like how database triggers work. Still, instead of inserting those logs into the table, they go to external storage.

Who is Change Data Capture For?

Change Data Capture is a great way to keep track of changes made on your platform. It's especially helpful for those heavily involved in data warehousing and ETL who need a system that can provide access to historical, row-level updates as well as column-level information for analytical purposes.

Change Data Capture is also an essential component if you're currently using replication or some other form of distributed processing since CDC processes change only the source records. This makes it possible to propagate these changes from one location (the source) directly into another with no duplication or loss of data whatsoever.

Any company dependent on data and analytics can use CDC, and it is beneficial for those who are working with Big Data or Hadoop. It allows you to track changes made since the last time CDC was run on your dataset, so if any new data has been added, it can be logged and used as a reference point for future analysis.

Change Data Capture in ETL

In today's data-rich world, data has become more essential in the fields of Business Intelligence (BI) and Enterprise Data Analytics. Almost every company activity depends on data. To make your data valuable, you must gather data from numerous sources and combine it in a single repository. This implies you'll need ETL or Data Integration tools.

Using something known as an ETL, you can combine data from different sources, cleanse it to ensure acceptable quality, and load it into a structured Data Warehouse. An ETL extracts data from one or more source systems transforms it into a new structure and loads it into your Data Warehouse.

ETL is designed to continuously capture changes made on the platform (inserts/updates/deletes) and update its underlying schema accordingly with each iteration of the ETL process.

Combining the power of ETLs with your CDC solution allows you to track and record every change made on your platform. If there's a new column in the source, you can add it during the ETL process. If any of the existing columns have changed, it will update accordingly during the next run.

This combination provides an efficient way for keeping up with changes that may affect data quality or business rules without requiring additional custom coding efforts from developers. The CDC solution tracks all these updates and displays them as part of its reporting offering better insights into day-to-day activities taking place within your database environment.

Integrate.io and Change Data Capture

One of the best ETL's for data integration, Integrate.io is an all-in-one data automation platform that helps you deal with your changing data and the need to integrate it into a single repository. It's one of the best tools for CDC because it ensures that every update occurs within each interval between snapshots. This means the information is applied to the target site during the next synchronization cycle. There won't be any data loss due to missing transactions outperforming outside the snapshot window period.

Integrate.io offers integrated change data capture capabilities in addition to ETL processes like aggregation and joins processing. This allows businesses using Oracle Golden Gate or other trigger-based solutions to get up and running quickly while still having access to advanced features such as automatic mapping generation.

Schedule a call and streamline your data transferring processes if you are ready to get started with Integrate.io today.