Query
Query runs a SQL statement through a Connection resource and returns the rows it selects.
Choosing a Schema and Tables first is what lets the SQL editor and the mappers know what is available. The statement itself is written on the Query tab, and its parameters are supplied through the Input mapping.
The activity has four tabs: Configuration, Query, Input, and Output.
Configuration
| Field | Required | Description |
|---|---|---|
| Name | Optional | Name of the component. |
| Description | Optional | Description of the component. |
| Connection | Optional | The database connection resource to run through. |
| Batch Size | Optional | Number of rows in each batch. |
| Schema | Optional | Schema to query within. |
| Tables | Optional | Tables to query. |
Schema and Tables are populated from the selected Connection.
Query
| Field | Required | Description |
|---|---|---|
| SQL Query | Optional | The SQL statement to run. |
The statement must be written in the dialect of the engine set as Type on the Connection resource.
Input
| Field | Required | Description |
|---|---|---|
| Inputs | Optional | Values supplied to the statement. |
Map parameters here rather than building them into the SQL string.
Output
| Field | Required | Description |
|---|---|---|
| Output | Optional | The rows returned by the query. |
The shape of the output follows the columns the statement selects, so the mapper reflects the statement rather than a fixed schema.