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.
sql, select, jdbc, query, database
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.
Name | Default Value | Allowable Values | Description |
---|---|---|---|
Database Connection Pooling Service | Controller Service API: DBCPService Implementation: DBCPConnectionPool | The Controller Service that is used to obtain connection to database | |
SQL select query | SQL select query Supports Expression Language: true | ||
Max Wait Time | 0 seconds | The 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. |
Name | Description |
---|---|
failure | SQL query execution failed. Incoming FlowFile will be penalized and routed to this relationship |
success | Successfully created FlowFile from SQL query result set. |