RealtimeTrigger
Consume a message in real-time from a DB2 database via change data capture and create one execution per row.
If you would like to consume multiple messages processed within a given time frame and process them in batch, you can use the io.kestra.plugin.debezium.db2.Trigger instead.
type: "io.kestra.plugin.debezium.db2.RealtimeTrigger"
Consume a message from a DB2 database via change data capture in real-time.
id: debezium-db2
namespace: company.team
tasks:
- id: send_data
type: io.kestra.plugin.core.log.Log
message: "{{ trigger.data }}"
triggers:
- id: realtime
type: io.kestra.plugin.debezium.db2.RealtimeTrigger
hostname: 127.0.0.1
port: 50000
username: db2inst1
password: my_password
database: my_database
YES
The name of the DB2 database from which to stream the changes.
YES
deleted
The name of deleted field if deleted is ADD_FIELD
.
YES
Hostname of the remote server.
YES
ADD_FIELD
ADD_FIELD
DROP
Specify how to handle key.
Possible settings are:
ADD_FIELD
: Add key(s) merged with columns.DROP
: Drop keys.
YES
ADD_FIELD
ADD_FIELD
DROP
Specify how to handle metadata.
Possible settings are:
ADD_FIELD
: Add metadata in a column namedmetadata
.DROP
: Drop metadata.
YES
Port of the remote server.
YES
TABLE
OFF
DATABASE
TABLE
Split table on separate output uris
.
Possible settings are:
TABLE
: This will split all rows by tables on output with namedatabase.table
DATABASE
: This will split all rows by databases on output with namedatabase
.OFF
: This will NOT split all rows resulting in a singledata
output.
YES
ADD_FIELD
ADD_FIELD
NULL
DROP
Specify how to handle deleted rows.
Possible settings are:
ADD_FIELD
: Add a deleted field as boolean.NULL
: Send a row with all values as null.DROP
: Don't send deleted row.
YES
An optional, comma-separated list of regular expressions that match the fully-qualified names of columns to include in change event record values.
Fully-qualified names for columns are of the form databaseName.tableName.columnName. Do not also specify the includedColumns
connector configuration property."
YES
An optional, comma-separated list of regular expressions that match the names of databases for which you do not want to capture changes.
The connector captures changes in any database whose name is not in the excludedDatabases
. Do not also set the includedDatabases
connector configuration property.
YES
An optional, comma-separated list of regular expressions that match fully-qualified table identifiers for tables whose changes you do not want to capture.
The connector captures changes in any table not included in excludedTables
. Each identifier is of the form databaseName.tableName. Do not also specify the includedTables
connector configuration property.
YES
INLINE
RAW
INLINE
WRAP
The format of the output.
Possible settings are:
RAW
: Send raw data from debezium.INLINE
: Send a row like in the source with only data (remove after & before), all the columns will be present for each row.WRAP
: Send a row like INLINE but wrapped in arecord
field.
YES
true
Ignore DDL statement.
Ignore CREATE, ALTER, DROP and TRUNCATE operations.
YES
An optional, comma-separated list of regular expressions that match the fully-qualified names of columns to exclude from change event record values.
Fully-qualified names for columns are of the form databaseName.tableName.columnName. Do not also specify the excludedColumns
connector configuration property.
YES
An optional, comma-separated list of regular expressions that match the names of the databases for which to capture changes.
The connector does not capture changes in any database whose name is not in includedDatabases
. By default, the connector captures changes in all databases. Do not also set the excludedDatabases
connector configuration property.
YES
An optional, comma-separated list of regular expressions that match fully-qualified table identifiers of tables whose changes you want to capture.
The connector does not capture changes in any table not included in includedTables
. Each identifier is of the form databaseName.tableName. By default, the connector captures changes in every non-system table in each database whose changes are being captured. Do not also specify the excludedTables
connector configuration property.
YES
metadata
The name of metadata field if metadata is ADD_FIELD
.
YES
ON_EACH_BATCH
ON_EACH_BATCH
ON_STOP
How to commit the offsets to the KV Store.
Possible values are:
- ON_EACH_BATCH: after each batch of records consumed by this trigger, the offsets will be stored in the KV Store. This avoids any duplicated records being consumed but can be costly if many events are produced.
- ON_STOP: when this trigger is stopped or killed, the offsets will be stored in the KV Store. This avoid any un-necessary writes to the KV Store, but if the trigger is not stopped gracefully, the KV Store value may not be updated leading to duplicated records consumption.
YES
Password on the remote server.
YES
Additional configuration properties.
Any additional configuration properties that is valid for the current driver.
YES
INITIAL
ALWAYS
INITIAL
INITIAL_ONLY
WHEN_NEEDED
NO_DATA
RECOVERY
Specifies the criteria for running a snapshot when the connector starts.
Possible settings are:
ALWAYS
: The connector performs a snapshot every time that it starts.INITIAL
: The connector runs a snapshot only when no offsets have been recorded for the logical server name.INITIAL_ONLY
: The connector runs a snapshot only when no offsets have been recorded for the logical server name and then stops; i.e. it will not read change events from the binlog.WHEN_NEEDED
: After the connector starts, it performs a snapshot only if it detects one of the following circumstances: 1. It cannot detect any topic offsets. 2. A previously recorded offset specifies a log position that is not available on the server.NO_DATA
: The connector captures the structure of all relevant tables, performing all the steps described in the INITIAL, except that it does not create READ events to represent the data set at the point of the connector’s start-up.RECOVERY
: Set this option to restore a database schema history topic that is lost or corrupted. After a restart, the connector runs a snapshot that rebuilds the topic from the source tables.
YES
debezium-state
The name of the Debezium state file stored in the KV Store for that namespace.
NO
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
List of execution states after which a trigger should be stopped (a.k.a. disabled).
YES
Username on the remote server.
Data.
Data extracted.
Stream.
Stream source