Skip to main content

Prerequisites

Before you can define the settings in the Change Processing tab, you need to ensure that at least one special "Context" column exists in your source database tables. Context column(s) are basically columns in a table that enable Replicate to determine whether the data has changed. You can add Context columns specifically for the purpose of change processing (either using a script or manually) or you can use existing columns that contain suitable "Context" data.

Information note

You can create and reference any number of Context columns in a table as long as the Context column names are the same for all source tables. Additionally, each value in the Context column(s) must be unique.

Information note

When working with non-datetime Context columns such as integers that are not based on epoch time (for example, counters, strings, and numeric values), the values of those columns should be created by a singleton entity. This is required to ensure that the results are returned in the correct sequence (thereby preventing loss of data) when the Context column values are generated by multiple concurrent processes. It is strongly recommended not to generate Context column values from multiple concurrent sources as doing so poses a high risk of losing events.

In the example below, the Context column cf has been added to the table. The cf column contains TIMESTAMPs that enable Replicate to determine whether a change occurred (by comparing the current TIMESTAMP with the TIMESTAMP stored in its repository).

By default, all changes are assumed to be INSERTs. If UPDATE and DELETE operations are also performed on the source tables, you can write an UPDATE and/or DELETE expression (described below) that will enable Replicate to identify the operation type.

An example of a table in Replicate. A context column, cf, has been added, containing timestamps.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!