CaptureChangeDebeziumDB2

Description:

Uses Debezium to retrieve Change Data Capture (CDC) events from an DB2 server. 'Capture mode' should be enabled for tables for witch events are to be captured. Debezium documentation describes a way of achieving it at https://debezium.io/documentation/reference/connectors/db2.html#setting-up-db2. A FlowFile will contain events that are accumulated since the last run. If no new events are captured no FlowFile is created. All events are ordered by the time at which the operation occurred. DB2 needs to be set up for CDC events to be available. Please refer to th Debezium documentation at https://debezium.io/documentation/reference/connectors/db2.html#setting-up-db2 for further details. IMPORTANT: Schema change events are not supported for DB2 by the current version of Debezium used by this Processor. IMPORTANT: The current version of Debezium used by this Processor may have a restriction of what versions of DB2 and its drivers it is compatible with. Please refer to the Debezium documentation for further details at https://debezium.io/releases/1.9/

Tags:

debezium, database, change, cdc, db2

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
DB2 Driver Class Namedb-driver-classcom.ibm.db2.jcc.DB2DriverThe class name of the DB2 database driver class
Supports Expression Language: true (will be evaluated using variable registry only)
DB2 Driver Location(s)db-driver-locationsComma-separated list of files/folders and/or URLs containing the DB2 driver JAR and its dependencies (if any).

This property expects a comma-separated list of resources. Each of the resources may be of any of the following types: URL, directory, file.

Supports Expression Language: true (will be evaluated using variable registry only)
Database History Cache Servicedb-history-cache-serviceController Service API:
DistributedMapCacheClient
Implementations: DistributedMapCacheClientService
RedisDistributedMapCacheClientService
HazelcastMapCacheClient
CouchbaseMapCacheClient
CassandraDistributedMapCache
SimpleRedisDistributedMapCacheClientService
HBase_2_ClientMapCacheService
Cache service to store database history used by Debezium.IMPORTANT: Debezium expects the content of this cache to remain consistent. For this reason only implementations that ensure the same content across all nodes should be used to make sure a Primary Node change doesn't cause any issues. The cache also must be persistent in order to support NiFi and cache provider restarts.
Hostdb-hostHost name of the database server
Supports Expression Language: true (will be evaluated using variable registry only)
Portdb-port50000Port of the database server
Supports Expression Language: true (will be evaluated using variable registry only)
Usernamedb-usernameUsername to access the database server
Supports Expression Language: true (will be evaluated using variable registry only)
Passworddb-passwordPassword to access the database server
Sensitive Property: true
Supports Expression Language: true (will be evaluated using variable registry only)
Output Record Formatoutput-record-formatWhole
  • Whole The entire record provided by Debezium per event will be written to the FlowFile.
  • Payload Extracted The 'payload' section of the record provided by Debezium per event will be extracted and written to the FlowFile.
  • Payload Wrapped Only the 'payload' section of the record provided by Debezium per event, will be retained, other sections will be removed before writing it to the FlowFile.
The format of the record to write into FlowFiles.
Database Namedb-nameName of the database to connect to.
Supports Expression Language: true (will be evaluated using variable registry only)
Schema Include Listdb-schema-include-listA comma-separated list of regular expressions that match schema names to be monitored. Must not be used with 'Schema Exclude List'.
Supports Expression Language: true (will be evaluated using variable registry only)
Schema Exclude Listdb-schema-exclude-listA comma-separated list of regular expressions that match schema names to be excluded from monitoring. Must not be used with 'Schema Include List'.
Supports Expression Language: true (will be evaluated using variable registry only)
Table Include Listdb-table-include-listA comma-separated list of regular expressions that match the fully-qualified names of tables to be monitored. Fully-qualified names for tables are of the form <schema_name>.<tableName>. Must not be used with 'Table Exclude List', and superseded by database inclusions/exclusions.
Supports Expression Language: true (will be evaluated using variable registry only)
Table Exclude Listdb-table-exclude-listA comma-separated list of regular expressions that match the fully-qualified names of tables to be excluded from monitoring. Fully-qualified names for tables are of the form <schema_name>.<tableName>. Must not be used with 'Table Include List', and superseded by database inclusions/exclusions.
Supports Expression Language: true (will be evaluated using variable registry only)
Column Include Listdb-column-include-listA 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 <schema_name>.<table_name>.<column_name>.
Supports Expression Language: true (will be evaluated using variable registry only)
Column Exclude Listdb-column-exclude-listA 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 <schema_name>.<table_name>.<column_name>.
Supports Expression Language: true (will be evaluated using variable registry only)

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
Additional Debezium config nameThe value for the additional Debezium config nameAdditional Debezium config can be provided. IMPORTANT: Debezium Json output format may be configured. Please refer to the Debezium documentation at https://debezium.io/documentation/reference/1.9/connectors.
Supports Expression Language: true (will be evaluated using variable registry only)

Relationships:

NameDescription
successSuccessfully created FlowFile with Debezium change events.

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

ScopeDescription
CLUSTEREvent offset data and database schema history needs to be kept and stored between runs.

Restricted:

This component is not restricted.

Input requirement:

This component does not allow an incoming relationship.

System Resource Considerations:

ResourceDescription
MEMORYA high volume of database changes may lead to large amount of memory consumption as the change events are asynchronously collected and held back until processed. Reducing the Scheduling Period may help to avoid this.