Upsert
Upsert writes rows through a Connection resource, inserting or updating depending on the statement.
As with Query, select the Schema and Tables first, write the statement on the Query tab, and supply its values 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. |
| Schema | Optional | Schema to write within. |
| Tables | Optional | Tables to write to. |
| Batch Size | Optional | Number of rows in each batch. |
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. Whether a row is inserted or updated is determined by the statement, not by a setting on this activity.
Input
| Field | Required | Description |
|---|---|---|
| Inputs | Optional | Values supplied to the statement. |
Output
| Field | Required | Description |
|---|---|---|
| Output | Optional | The result of the statement. |