SQL Parameterized Reader Component
The SQL Parameterized Reader component has an input channel that receives template values that it uses to fill in its query template to form a query whose results are returned. Each row will be output as a separate entity on the default channel.
Data Governance
The SQL Parameterized Reader component will register every data item it returns with the Data Governance System. The returned items are recorded as being derived from the data item that triggers the component.
Input Channels
queryParameters — Receives a SimpleMappedData object that contain the values to substitute into the queryTemplate to form a full query. The resultant query will be executed against the database and the result sent out via the default output channel. If the input object does not contain enough information to form a complete query, an error is sent out on the error output channel.
Output Channels
default — Outputs each row returned by the query one-at-a-time as a DatabaseRowData. When the last record is returned, the isLast flag of the DatabaseRowData object will be set.
noResults— Outputs a SignalData object if the query executes and no results are returned.
error — Outputs an ErrorOutput object if there is an error executing the query.
Parameters
resource — (SQL Database Resource) The resource defining the service to which this component should connect
queryTemplate — (String) The query template string. The query template uses placeholders of the form :variable , where the name of the variable matches the name of an entry in the SimpleMappedData object received on the queryParameters input channel. For example, SELECT * FROM Table WHERE foo > :example , will have the value of the “example” entry substituted in place of :example in the query before it is executed.