CaptureChangeDebeziumMySQL

Description:

Uses Debezium to retrieve Change Data Capture (CDC) events from a MySQL database. Binary logging needs to be enabled in the database for this to work. 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.

Tags:

debezium, database, change, cdc, mysql

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
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-port3306Port 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 Include Listdb-database-include-listA comma-separated list of regular expressions that match database names to be monitored. Must not be used with 'Database Exclude List'.
Supports Expression Language: true (will be evaluated using variable registry only)
Database Exclude Listdb-database-exclude-listA comma-separated list of regular expressions that match database names to be excluded from monitoring. Must not be used with 'Database 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 <databaseName>.<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 <databaseName>.<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 <database_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 <database_name>.<table_name>.<column_name>.
Supports Expression Language: true (will be evaluated using variable registry only)
Instance Idinstance-idUse this when you need multiple instances of this processor to connect to the same database. In that case make sure a unique number is assigned for each instance. If not set, a random number will be assigned.
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.