Capture Capture

yaml
type: "io.kestra.plugin.debezium.mongodb.Capture"

Wait for change data capture event on MongoDB server.

Examples

Replica set connection

yaml
id: "capture"
type: "io.kestra.plugin.debezium.mongodb.Capture"
snapshotMode: INITIAL
connectionString: mongodb://mongo_user:[email protected]:27017/?replicaSet=rs0
maxRecords: 100

Sharded connection

yaml
id: "capture"
type: "io.kestra.plugin.debezium.mongodb.Capture"
snapshotMode: INITIAL
connectionString: mongodb://mongo_user:[email protected]:27017,mongos1.example.com:27017/
maxRecords: 100

Replica set SRV connection

yaml
id: "capture"
type: "io.kestra.plugin.debezium.mongodb.Capture"
snapshotMode: INITIAL
connectionString: mongodb+srv://mongo_user:[email protected]/?replicaSet=rs0
maxRecords: 100

Sharded SRV connection

yaml
id: "capture"
type: "io.kestra.plugin.debezium.mongodb.Capture"
snapshotMode: INITIAL
connectionString: mongodb+srv://mongo_user:[email protected]/
maxRecords: 100

Properties

connectionString

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

Defines connection string to mongodb replica set or sharded

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
    • NO_DATA
    • WHEN_NEEDED

Specifies the criteria for running a snapshot when the connector starts.

Possible settings are:

  • 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.
  • NO_DATA: The connector captures the structure of all relevant tables, performing all the steps described in the default snapshot workflow, except that it does not create READ events to represent the data set at the point of the connector’s start-up.
  • 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 binlog location or GTID that is not available in the server.

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 the Debezium state file stored in the KV Store for that namespace.

excludedCollections

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

The name of the MongoDB database collection excluded from which to stream the changes.

A list of regular expressions that match the collection namespaces (for example, .) of all collections to be excluded

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.

includedCollections

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

The name of the MongoDB database collection included from which to stream the changes.

A list of regular expressions that match the collection namespaces (for example, .) of all collections to be monitored

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.

maxDuration

  • Type: string
  • Dynamic:
  • Required:
  • Format: duration

The maximum duration waiting for new rows.

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

maxRecords

  • Type: integer
  • Dynamic:
  • Required:

The maximum number of rows to fetch before stopping.

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

maxSnapshotDuration

  • Type: string
  • Dynamic:
  • Required:
  • Default: 3600.000000000
  • Format: duration

The maximum duration waiting for the snapshot to ends.

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

maxWait

  • Type: string
  • Dynamic:
  • Required:
  • Default: 10.000000000
  • Format: duration

The maximum total processing duration.

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

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.

username

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

Username on the remote server.

Outputs

size

  • Type: integer
  • Required:

The number of fetched rows

stateHistoryKey

  • Type: string
  • Required:

The KV Store key under which the state of the database history is stored

stateOffsetKey

  • Type: string
  • Required:

The KV Store key under which the state of the offset is stored

uris

  • Type: object
  • SubType: string
  • Required:

URI of the generated internal storage file

Definitions

Was this page helpful?