Debezium Oracle Trigger

Debezium Oracle Trigger

Certified

Trigger a flow via an Oracle change data capture event periodically and create one execution per batch

If you would like to consume each message from change data capture in real-time and create one execution per message, you can use the io.kestra.plugin.debezium.oracle.RealtimeTrigger instead.

yaml
type: io.kestra.plugin.debezium.oracle.Trigger

Consume messages from Oracle DB periodically.

yaml
id: oracle_trigger
namespace: company.team

tasks:
  - id: send_data
    type: io.kestra.plugin.core.log.Log
    message: "{{ trigger.uris }}"

triggers:
  - id: trigger
    type: io.kestra.plugin.debezium.oracle.Trigger
    snapshotMode: INITIAL_ONLY
    hostname: 127.0.0.1
    port: "1521"
    username: "{{ secret('ORACLE_USERNAME') }}"
    password: "{{ secret('ORACLE_PASSWORD') }}"
    sid: ORCLCDB
    maxRecords: 100
Properties

Hostname of the remote server

Port of the remote server

The name of the database to capture changes from

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

DefaultADD_FIELD
Possible Values
ADD_FIELDNULLDROP

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

The name of deleted field if deleted is ADD_FIELD

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.

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.

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.

DefaultINLINE
Possible Values
RAWINLINEWRAP

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

Ignore DDL statement

Ignore CREATE, ALTER, DROP and TRUNCATE operations.

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.

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.

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.

DefaultPT1M
Formatduration

Interval between polling.

The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.

DefaultADD_FIELD
Possible Values
ADD_FIELDDROP

Specify how to handle key

Possible settings are:

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

The maximum duration waiting for new rows

It's not a hard limit and is evaluated every second. It is taken into account after the snapshot if any.

The maximum number of rows to fetch before stopping

It's not a hard limit and is evaluated every second.

DefaultPT1H

The maximum duration waiting for the snapshot to end

It's not a hard limit and is evaluated every second. The properties 'maxRecords', 'maxDuration' and 'maxWait' are evaluated only after the snapshot is done.

DefaultPT10S

The maximum total processing duration

It's not a hard limit and is evaluated every second. It is taken into account after the snapshot if any.

DefaultADD_FIELD
Possible Values
ADD_FIELDDROP

Specify how to handle metadata

Possible settings are:

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

The name of metadata field if metadata is ADD_FIELD

DefaultON_STOP
Possible Values
ON_EACH_BATCHON_STOP

When 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 on the remote server

The name of the Oracle pluggable database that the connector captures changes from. Used in container database (CDB) installations only

For non-container database (non-CDB) installation, do not specify the pluggableDatabase property.

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

DefaultINITIAL
Possible Values
ALWAYSINITIALINITIAL_ONLYWHEN_NEEDEDNO_DATARECOVERY

Specifies the criteria for running a snapshot when the connector starts

Possible settings are:

  • ALWAYS: The connector runs a snapshot on each connector start.
  • 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 stream change events from the redo log.
  • WHEN_NEEDED: The connector runs a snapshot upon startup whenever it deems it necessary. That is, when no offsets are available, or when a previously recorded offset specifies a redo log position (SCN) that is not available on the server.
  • NO_DATA: The connector runs a snapshot of the schemas and not the data. This setting is useful when you do not need the topics to contain a consistent snapshot of the data but need them to have only the changes since the connector was started.
  • RECOVERY: This is a recovery setting for a connector that has already been capturing changes. When you restart the connector, this setting enables recovery of a corrupted or lost database history topic. You might set it periodically to "clean up" a database history topic that has been growing unexpectedly. Database history topics require infinite retention.
DefaultTABLE
Possible Values
OFFDATABASETABLE

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.
Defaultdebezium-state

The name of the Debezium state file stored in the KV Store for that namespace

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

Username on the remote server

Defaulttrue

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

The number of fetched rows

The KV Store key under which the combined Debezium state (offset + schema history) is stored

Both stateOffsetKey and stateHistoryKey point to the same combined entry written atomically. The entry holds a map with keys offsets and history so both states are always consistent.

SubTypestring

URI of the generated internal storage file