Redshift - Delete
Overview
The Redshift - Delete Snap deletes rows from a Redshift table based on a specified WHERE clause condition.
- This is a Write-type Snap.
Works in Ultra Tasks
Prerequisites
A valid Redshift Account with the required permissions.
Snap views
| Type | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input |
This Snap has exactly one document input view. |
|
| Output |
This Snap has at most one document output view. |
|
| Learn more about Error handling. | ||
Examples
- Delete all records from a Redshift table: Delete all records from a Redshift table
- Delete records using expressions and conditions: Delete records using expressions and conditional logic
- ETL pipeline: Extract from MySQL, load to Redshift, and delete records: ETL pipeline with MySQL extraction and Redshift deletion
Snap settings
| Field/Field set | Description | ||
|---|---|---|---|
|
Label
|
Required. Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Redshift - Delete Example: Redshift - Delete |
||
|
Schema name
|
Specify the database schema name. Leave this field blank to use the default schema. Default value: N/A Example: public |
||
|
Table name
|
Required. Specify the name of the table from which to delete rows. Default value: N/A Example: employees |
||
|
Delete condition
|
Specify a valid SQL WHERE clause for the delete condition. If you leave this field blank, the Snap deletes all records from the table. CAUTION:
Using expressions that join strings together to create SQL queries or conditions has a potential SQL injection risk and is unsafe. Ensure that you understand all implications and risks involved before using concatenation of strings with expression enabled. Default value: N/A Example: Without using expressions:
Using expressions:
|
||
|
Number of retries
|
Specify the maximum number of retry attempts the Snap must make in case of network failure. Default value: 0 Example: 3 |
||
|
Retry interval (seconds)
|
Specify the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. Default value: 1 Example: 10 |
||
|
Snap execution
|
Select one of the three modes in which the Snap executes. Available options are:
Default value: Execute only Example: Validate & Execute |
||
Troubleshooting
| Error | Reason | Resolution |
|---|---|---|
| type "e" does not exist | This issue occurs due to incompatibilities with the recent upgrade in the Postgres JDBC drivers. | Download the latest 4.1 Amazon Redshift driver here and use this driver in your Redshift Account configuration and retry running the Pipeline. |