RealtimeTrigger RealtimeTrigger

yaml
type: "io.kestra.plugin.debezium.sqlserver.RealtimeTrigger"

Consume a message in real-time from a SQL Server 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.sqlserver.Trigger instead.

Examples

Consume a message from a SQL Server database via change data capture in real-time.

yaml
id: debezium-sqlserver
namespace: company.myteam

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: 61433
    username: sa
    password: password
    database: deb

Properties

database

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The name of the Microsoft SQL Server database from which to stream the changes.

deleted

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: ADD_FIELD
  • Possible Values:
    • 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.

deletedFieldName

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: deleted

The name of deleted field if deleted is ADD_FIELD.

format

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: INLINE
  • Possible Values:
    • 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 a record field.

hostname

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Hostname of the remote server.

ignoreDdl

  • Type: boolean
  • Dynamic:
  • Required: ✔️
  • Default: true

Ignore DDL statement.

Ignore CREATE, ALTER, DROP and TRUNCATE operations.

key

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: ADD_FIELD
  • Possible Values:
    • ADD_FIELD
    • DROP

Specify how to handle key.

Possible settings are:

  • ADD_FIELD: Add key(s) merged with columns.
  • DROP: Drop keys.

metadata

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: ADD_FIELD
  • Possible Values:
    • ADD_FIELD
    • DROP

Specify how to handle metadata.

Possible settings are:

  • ADD_FIELD: Add metadata in a column named metadata.
  • DROP: Drop metadata.

metadataFieldName

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: metadata

The name of metadata field if metadata is ADD_FIELD.

port

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Port of the remote server.

snapshotMode

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: INITIAL
  • Possible Values:
    • INITIAL
    • INITIAL_ONLY
    • SCHEMA_ONLY

Specifies 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

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: TABLE
  • Possible Values:
    • OFF
    • DATABASE
    • TABLE

Split table on separate output uris.

Possible settings are:

  • TABLE: This will split all rows by tables on output with name database.table
  • DATABASE: This will split all rows by databases on output with name database.
  • OFF: This will NOT split all rows resulting in a single data output.

stateName

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: debezium-state

The name of Debezium state file.

conditions

  • Type: array
  • SubType: Condition
  • Dynamic:
  • Required:

List of conditions in order to limit the flow trigger.

excludedColumns

  • Type: object
  • Dynamic: ✔️
  • Required:

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."

excludedDatabases

  • Type: object
  • Dynamic: ✔️
  • Required:

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

  • Type: object
  • Dynamic: ✔️
  • Required:

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.

includedColumns

  • Type: object
  • Dynamic: ✔️
  • Required:

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.

includedDatabases

  • Type: object
  • Dynamic: ✔️
  • Required:

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

  • Type: object
  • Dynamic: ✔️
  • Required:

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.

offsetsCommitMode

  • Type: string
  • Dynamic:
  • Required:
  • Default: ON_EACH_BATCH
  • Possible Values:
    • ON_EACH_BATCH
    • ON_STOP

How to commit the offsets to the state store.

Possible values are:

  • ON_EACH_BATCH: after each batch of records consumed by this trigger, the offsets will be stored in the state store. This avoids any duplicated records being consumed but can be costly if a lot of events are produced.
  • ON_STOP: when this trigger is stopped or killed, the offsets will be stored in the state store. This avoid any un-necessary write to the state store, but if the trigger is not stopped gracefully the state store may not be updated leading to duplicated records consumption.

password

  • Type: string
  • Dynamic: ✔️
  • Required:

Password on the remote server.

properties

  • Type: object
  • SubType: string
  • Dynamic: ✔️
  • Required:

Additional configuration properties.

Any additional configuration properties that is valid for the current driver.

serverId

  • Type: string
  • Dynamic:
  • Required:

stopAfter

  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

List of execution states after which a trigger should be stopped (a.k.a. disabled).

username

  • Type: string
  • Dynamic: ✔️
  • Required:

Username on the remote server.

Outputs

data

  • Type: object
  • Dynamic:
  • Required:

stream

  • Type: string
  • Dynamic:
  • Required:

Definitions

Was this page helpful?