Skip to main content

DatabaseRecordSink

Description

Provides a service to write records using a configured database connection.

Tags

connection, database, db, jdbc, record

Properties

In the list below required Properties are shown with an asterisk (*). Other properties 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 Connection Pooling Service *db-record-sink-dcbp-serviceController Service:
DBCPService

Implementations:
DBCPConnectionPoolLookup
DBCPConnectionPool
HikariCPConnectionPool
SnowflakeConnectionService
The Controller Service that is used to obtain a connection to the database for sending records.
Catalog Namedb-record-sink-catalog-nameThe name of the catalog that the statement should update. This may not apply for the database that you are updating. In this case, leave the field empty

Supports Expression Language, using FlowFile attributes and Environment variables.
Schema Namedb-record-sink-schema-nameThe name of the schema that the table belongs to. This may not apply for the database that you are updating. In this case, leave the field empty

Supports Expression Language, using FlowFile attributes and Environment variables.
Table Name *db-record-sink-table-nameThe name of the table that the statement should affect.

Supports Expression Language, using FlowFile attributes and Environment variables.
Translate Field Namesdb-record-sink-translate-field-namestrue
  • true
  • false
If true, the Processor will attempt to translate field names into the appropriate column names for the table specified. If false, the field names must match the column names exactly, or the column will not be updated
Unmatched Field Behaviordb-record-sink-unmatched-field-behaviorIgnore Unmatched Fields
  • Ignore Unmatched Fields
  • Fail on Unmatched Fields
If an incoming record has a field that does not map to any of the database table's columns, this property specifies how to handle the situation
Unmatched Column Behaviordb-record-sink-unmatched-column-behaviorFail on Unmatched Columns
  • Ignore Unmatched Columns
  • Warn on Unmatched Columns
  • Fail on Unmatched Columns
If an incoming record does not have a field mapping for all of the database table's columns, this property specifies how to handle the situation
Quote Column Identifiersdb-record-sink-quoted-identifiersfalse
  • true
  • false
Enabling this option will cause all column names to be quoted, allowing you to use reserved words as column names in your tables.
Quote Table Identifiersdb-record-sink-quoted-table-identifiersfalse
  • true
  • false
Enabling this option will cause the table name to be quoted to support the use of special characters in the table name.
Max Wait Time *db-record-sink-query-timeout0 secondsThe maximum amount of time allowed for a running SQL statement , zero means there is no limit. Max time less than 1 second will be equal to zero.

Supports Expression Language, using Environment variables.

State Management

This component does not store state.

Restricted

This component is not restricted.

System Resource Considerations

This component does not specify system resource considerations.

See Also