Query Modes (Edge)
On This Page
In the Table Mode ingestion mode, Hevo reads each object using SQL queries. The query mode of the object defines which rows Hevo reads in each incremental run. Hevo suggests a query mode for each object based on its columns, and shows it in the Query Mode column of the Configure Objects page. You can change it while creating the Pipeline, and later by editing the Pipeline. Read Selecting the Query Mode of an Object.
Hevo supports the following query modes:
| Query mode | Use it when | Columns that you select |
|---|---|---|
| Full Load | The table has no column that tracks new or changed rows. | None |
| Delta - Timestamp | Rows are added and updated, and a timestamp column records the time of each change. | Timestamp Column and Timestamp Delay |
| Change Data Capture | Rows are added and updated, and the table has a timestamp column and an incrementing column. | Timestamp Column, Timestamp Delay, and Incrementing Column |
| Unique Incrementing Append Only | Rows are only added, never updated, and a unique key increases with each new row. | Unique Columns |
None of the query modes captures the rows deleted in the Source.
Selecting the Query Mode of an Object
To select the query mode while creating the Pipeline:

-
On the Configure Objects page, click Edit Fields for the object.
-
In the Query Mode section of the Field Selection panel, select the Query Mode, and then specify the columns that it needs. The fields shown depend on the query mode. For example, Change Data Capture shows Timestamp Column, Timestamp Delay, and Incrementing Column.

-
Optionally, select the Load Mode, Merge or Append. Both load modes are available with every query mode.
-
Click Apply Changes.
-
Click Save & Continue, and then click Confirm in the Confirm Changes dialog.
To change the query mode after the Pipeline is created:
-
Click Edit in the Pipeline Detailed View.
-
On the Configure Pipeline page, click Next.
-
On the Configure Objects page, click Edit Fields for the object, change the query mode or its columns, and then click Apply Changes.
-
Click Next, review the number of Objects with Query Mode Changes in the Confirm Changes dialog, and then click Confirm.
-
Review the configuration, and then click Save & Exit.
The Objects tab of the Pipeline shows the query mode of each object in the Query Mode column. Some changes require you to resync the object. Read Changing the Query Mode.
How Hevo Suggests a Query Mode
Hevo checks the columns of each table and suggests the first query mode in the following order that the table supports:
-
Change Data Capture: The table has an AUTO_INCREMENT column that is a unique key on its own, and a DATETIME or TIMESTAMP column with ON UPDATE CURRENT_TIMESTAMP. The timestamp column can allow NULL values, as Hevo reads the rows with a NULL timestamp using the AUTO_INCREMENT column.
-
Delta - Timestamp: The table does not match the above, but has a DATETIME or TIMESTAMP column with ON UPDATE CURRENT_TIMESTAMP that does not allow NULL values.
-
Unique Incrementing Append Only: The table has no such timestamp column, but has a primary key or a unique index, on one or more columns, in which every column does not allow NULL values and none is of type FLOAT, DOUBLE, or REAL.
-
Full Load: The table has none of the above, that is, no usable primary key or unique index, and no ON UPDATE CURRENT_TIMESTAMP column.
For the timestamp column, Hevo suggests a column with ON UPDATE CURRENT_TIMESTAMP before any other DATETIME or TIMESTAMP column, because MySQL updates it on every change to the row.
Full Load
In the Full Load query mode, Hevo reads all the rows of the table in every run and loads them to the Destination. Use this mode for small tables that have no column to track new or changed rows. For large tables, use another query mode, as reading the whole table in every run increases the load on your database.
-
All the rows read in every run are counted as Events.
-
If the table has no primary key, Hevo loads it in the Append load mode. As a result, the rows read in every run are added to the Destination table again, and the table contains duplicate rows.
Delta - Timestamp
In the Delta - Timestamp query mode, Hevo reads the rows whose timestamp is later than the latest timestamp read in the previous run. Use this mode when the table has a timestamp column that is updated every time a row is added or changed, such as a column with ON UPDATE CURRENT_TIMESTAMP.
You must specify the following:
-
Timestamp Column: A DATETIME or TIMESTAMP column that records when each row was last added or changed.
-
Timestamp Delay: The time, in seconds, by which Hevo stays behind the current time when it reads rows. Read Timestamp Delay.
Hevo runs a query similar to the following. The query is simplified to show which rows are read:
SELECT * FROM table
WHERE `timestamp_column` > last_read_timestamp
AND `timestamp_column` <= now() - timestamp_delay
ORDER BY `timestamp_column`, `primary_key` ASC;
Example: The orders table has an updated_at column. In the last run, Hevo read rows up to 10:00:00. At 10:15:00, order 1 is changed, so its updated_at becomes 10:15:00, and order 3 is added. In the next run, Hevo reads both orders 1 and 3, and the latest timestamp read becomes 10:15:00.
Note: Hevo does not read a row whose timestamp column is NULL in the incremental runs. Such a row is loaded by the historical load, and then not read again until its timestamp column is set. Select a timestamp column that does not allow NULL values.
Change Data Capture
The Change Data Capture query mode combines a timestamp column and an incrementing column. Hevo reads the rows that are added or changed using the timestamp column, and uses the incrementing column to order the rows that have the same timestamp. Use this mode to capture both new and changed rows when many rows can have the same timestamp.
You must specify the following:
-
Timestamp Column: A DATETIME or TIMESTAMP column that records when each row was last added or changed.
-
Timestamp Delay: The time, in seconds, by which Hevo stays behind the current time when it reads rows. Read Timestamp Delay.
-
Incrementing Column: A numeric or VARCHAR column whose value increases with each new row, such as an AUTO_INCREMENT ID.
Hevo runs a query similar to the following. The query is simplified to show which rows are read:
SELECT * FROM table
WHERE (`timestamp_column` > last_read_timestamp
OR (`timestamp_column` = last_read_timestamp AND `id_column` > last_read_id))
AND `timestamp_column` <= now() - timestamp_delay
ORDER BY `timestamp_column`, `id_column` ASC;
In this mode, Hevo also reads the new rows whose timestamp column is NULL, using the incrementing column. A change to such a row is read only after its timestamp column is set.
Example: The users table has an id column and an updated_at column. In the last run, Hevo read rows up to updated_at 10:00:00 and id 2. If user 1 is changed and user 3 is added, Hevo reads both in the next run, and stores the latest values of updated_at and id.
Unique Incrementing Append Only
In the Unique Incrementing Append Only query mode, Hevo reads the rows whose unique key is greater than the last key read. Use this mode when rows are only added to the table and never changed, such as a log or an events table.
You must specify the following:
- Unique Columns: The columns of one primary key or unique index of the table. You can select the columns in any order. Columns of type FLOAT, DOUBLE, or REAL cannot be used.
Hevo runs a query similar to the following. The query is simplified to show which rows are read:
SELECT * FROM table
WHERE `id_column` > last_read_id
ORDER BY `id_column` ASC;
In this mode, Hevo does not read the rows that are changed after they are loaded, or the rows that are deleted. To read changed rows, use the Delta - Timestamp or Change Data Capture query mode.
Note: If the unique key is a single integer column, each run reads rows only up to 100 key values below the highest key in the table, and leaves the newest rows for a later run. This ensures that a row from a transaction that is still open when the run starts is not skipped. If no new rows are added before the next run, that run reads up to the highest key. As a result:
-
New rows can reach the Destination one run later than they are added.
-
Hevo reads the rows within the last 100 key values again, for example, in the first incremental run after the historical load. In the Merge load mode, they update the existing rows. In the Append load mode, they are added again as duplicates. A change to a row in this range is also loaded when the row is read again.
Timestamp Delay
The Timestamp Delay is the time, in seconds, by which Hevo stays behind the current time when it reads rows in the Delta - Timestamp and Change Data Capture query modes. A row gets its timestamp when its statement runs, not when its transaction commits. If Hevo read rows up to the current time, a transaction that started earlier but committed after the run would add rows with a timestamp that Hevo has already passed, and these rows would never be read. The delay prevents this.
-
The default delay is 120 seconds. A lower value is accepted but has no effect, as Hevo never reads rows closer to the current time than the default delay.
-
Increase the delay if:
-
A write transaction can stay open longer than the delay, for example, in batch jobs or large imports. Set the delay longer than your longest transaction. For example, a job that keeps a transaction open for 10 minutes needs a delay of more than 600 seconds.
-
Your read replica often lags behind the primary by more than 60 seconds. Increase the delay by the usual lag.
-
Your application sets the value of the timestamp column, instead of the database. Add the expected difference between the application clock and the database clock, or the time between setting the value and committing the transaction.
-
-
Do not increase the delay to get data sooner. A longer delay makes data arrive later in the Destination. To get data sooner, increase the sync frequency of your Pipeline.
-
If the timestamp column is of type DATETIME, Hevo compares it with the current time in the time zone of your MySQL server. Ensure that your application writes the column in the same time zone, or use a TIMESTAMP column.
-
If your MySQL server uses a time zone with daylight saving time, rows written in the hour that repeats when the clocks go back can be skipped, unless the delay is more than an hour. To avoid this, use a TIMESTAMP column or a server time zone without daylight saving time.
Changing the Query Mode
When you change the query mode or its columns, Hevo checks whether it can continue reading from where it stopped:
| Change | What happens |
|---|---|
| You change the query mode to Full Load. | Hevo continues. It reads the whole table in the next run. |
| You change from Full Load to Delta - Timestamp or Change Data Capture. | Hevo continues from the time of the last full read. |
| You change between Delta - Timestamp and Change Data Capture, and keep the same timestamp column. | Hevo continues. It reads the rows with the last timestamp again, so some rows may be loaded again. |
| You change only the Timestamp Delay. | Hevo continues. |
| You select a different timestamp column or different unique columns, change from Unique Incrementing Append Only to Delta - Timestamp or Change Data Capture, or change to Unique Incrementing Append Only from any other query mode. | In the next run, the object fails, and a card appears in the Needs Attention tab with the Resync Object action. Resync the object from this card or from the Objects tab. Hevo runs the historical load for the object again and then continues with the new query mode. |
| The data type of the timestamp or unique column changes in the Source to a different type, for example, from INT to VARCHAR, or from DATETIME to TIMESTAMP. | The object fails and asks you to resync it. Changes within the same type, such as INT to BIGINT, do not need a resync. |
| The column used by the query mode is removed from the Source table or deselected. | The object becomes Inactive. Select another column or query mode to activate it. |
Limitations
-
None of the query modes captures the rows deleted in the Source.
-
In the Delta - Timestamp query mode, rows whose timestamp column is NULL are not read after the historical load.
-
In the Unique Incrementing Append Only query mode, changes to existing rows are not read.
-
The Full Load query mode reads the whole table in every run.
Revision History
Refer to the following table for the list of key updates made to this page:
| Date | Release | Description of Change |
|---|---|---|
| Dec-04-2026 | 2.55 | New document. |