Description:

Execute provided SQL select query. Query result will be converted to Avro format. Streaming is used so arbitrarily large result sets are supported. This processor can be scheduled to run on a timer, or cron expression, using the standard scheduling methods, or it can be triggered by an incoming FlowFile. If it is triggered by an incoming FlowFile, then attributes of that FlowFile will be available when evaluating the select query. FlowFile attribute 'executesql.row.count' indicates how many rows were selected.

Tags:

sql, select, jdbc, query, database

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.

NameDefault ValueAllowable ValuesDescription
Database Connection Pooling ServiceController Service API:
DBCPService
Implementation:
DBCPConnectionPool
The Controller Service that is used to obtain connection to database
SQL select querySQL select query
Supports Expression Language: true
Max Wait Time0 secondsThe maximum amount of time allowed for a running SQL select query , zero means there is no limit. Max time less than 1 second will be equal to zero.

Relationships:

NameDescription
failureSQL query execution failed. Incoming FlowFile will be penalized and routed to this relationship
successSuccessfully created FlowFile from SQL query result set.

Reads Attributes:

None specified.

Writes Attributes:

None specified.