SQL Input
Run a SELECT query and put the resulting records into the row stream
Processing
For every input row, the step generates a SQL query and outputs the returned records into the row stream.
Settings
Name | Type | Description |
---|---|---|
Connection |
dict |
The database connection to use. Evaluated for each input row |
Query |
string |
The SQL query executed. Must be a type of query that returns a result set. For example a Evaluated for each input row |
Query Parameters |
list |
Query Parameters Each parameter is bound to Evaluated for each input row |
Fetch Size |
long |
Ask database driver to fetch this many rows at a time. Balances memory consumption vs. number of network roundtrips. If set to Evaluated for each input row |
Row Limit |
long |
Ask database driver to limit result rows to a maximum number. Any additional result rows are silently dropped. If set to Evaluated for each input row |
Read fields
Defines how fields are extracted from query result rows.
Evaluated for each input row
- Type
- Data type of the field. Field values are implicitly cast to this type.
- Name
- Name of the field.
- Mapping
- Index used to access the data in the result record.
- Use an integer number
n
to access the n-th field.
Fields are indexed starting at 0. - Use a string to access a result record field by name.
- Use an integer number
- Conversion
- Optional function transforming the source field.
- Use
nil
to leave the source data as it is. - Supply a function
(x) -> any
, the record field value is passed in asx
and the return value is put into the output row.
Results
Name | Type | Description |
---|---|---|
record |
dict | Current query result record |