
Debezium Microsoft SQL Server RealtimeTrigger
CertifiedTrigger a flow via a SQL Server change data capture event in real-time and create one execution per row
Debezium Microsoft SQL Server RealtimeTrigger
Trigger a flow via a SQL Server change data capture event in real-time 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.sqlserver.Trigger instead.
type: io.kestra.plugin.debezium.sqlserver.RealtimeTriggerExamples
Consume a message from a SQL Server database via change data capture in real-time.
id: debezium_sqlserver
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.sqlserver.RealtimeTrigger
hostname: 127.0.0.1
port: "1433"
username: "{{ secret('SQLSERVER_USERNAME') }}"
password: "{{ secret('SQLSERVER_PASSWORD') }}"
database: deb
Properties
database *Requiredstring
The name of the Microsoft SQL Server database from which to stream the changes
hostname *Requiredstring
Hostname of the remote server
port *Requiredstring
Port of the remote server
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
deleted string
ADD_FIELDADD_FIELDNULLDROPSpecify 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.
deletedFieldName string
deletedThe name of deleted field if deleted is ADD_FIELD
excludedColumns object
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 includedColumns connector configuration property.
excludedDatabases object
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.
excludedTables object
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.
format string
INLINERAWINLINEWRAPThe 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 arecordfield.
ignoreDdl booleanstring
trueIgnore DDL statement
Ignore CREATE, ALTER, DROP and TRUNCATE operations.
includedColumns object
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 excludedColumns connector configuration property.
includedDatabases object
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.
includedTables object
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.
key string
ADD_FIELDADD_FIELDDROPSpecify how to handle key
Possible settings are:
ADD_FIELD: Add key(s) merged with columns.DROP: Drop keys.
metadata string
ADD_FIELDADD_FIELDDROPSpecify how to handle metadata
Possible settings are:
ADD_FIELD: Add metadata in a column namedmetadata.DROP: Drop metadata.
metadataFieldName string
metadataThe name of metadata field if metadata is ADD_FIELD
offsetsCommitMode string
ON_STOPON_EACH_BATCHON_STOPWhen to commit the offsets to the KV Store
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 avoids 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.
password string
Password on the remote server
properties object
Additional configuration properties
Any additional configuration properties that is valid for the current driver.
Properties that make Debezium or the JDBC driver load arbitrary classes, or that move Debezium's offset and schema history storage, are rejected: connector.class, converters, transforms*, predicates*, post.processors*, config.providers*, *.converter*, topic.naming.strategy, sourceinfo.struct.maker, transaction.metadata.factory, offset.storage*, the schema.history.internal backend and its Kafka client settings, and class-loading or local-file JDBC parameters under database.* / driver.* (for example socketFactory, sslfactory, queryInterceptors, autoDeserialize, allowLoadLocalInfile).
serverId Non-dynamicstring
Unique identifier for the Debezium SQL Server connector
snapshotMode string
INITIALINITIALINITIAL_ONLYSCHEMA_ONLYSpecifies the criteria for running a snapshot when the connector starts
Possible settings are:
INITIAL: Takes a snapshot of structure and data of captured tables; useful if topics should be populated with a complete representation of the data from the captured tables.INITIAL_ONLY: Takes a snapshot of structure and data like initial but instead does not transition into streaming changes once the snapshot has completed.SCHEMA_ONLY: Takes a snapshot of the structure of captured tables only; useful if only changes happening from now onwards should be propagated to topics.
splitTable string
TABLEOFFDATABASETABLESplit table on separate output uris
Possible settings are:
TABLE: This will split all rows by tables on output with namedatabase.tableDATABASE: This will split all rows by databases on output with namedatabase.OFF: This will NOT split all rows resulting in a singledataoutput.
stateName string
debezium-stateThe name of the Debezium state file stored in the KV Store for that namespace
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
username string
Username on the remote server
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
data object
Data
Data extracted.
stream string
Stream
Stream source