Redshift - Delete

Overview

The Redshift - Delete Snap deletes rows from a Redshift table based on a specified WHERE clause condition.

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

  1. Delete all records from a Redshift table: Delete all records from a Redshift table
  2. Delete records using expressions and conditions: Delete records using expressions and conditional logic
  3. ETL pipeline: Extract from MySQL, load to Redshift, and delete records: ETL pipeline with MySQL extraction and Redshift deletion

Snap settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description

Label

String

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

String/Expression/ Suggestion

Specify the database schema name. Leave this field blank to use the default schema.

Default value: N/A

Example: public

Table name

String/Expression/ Suggestion

Required.

Specify the name of the table from which to delete rows.

Default value: N/A

Example: employees

Delete condition

String/Expression/ Suggestion

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:

EmpId = 12
email = '[email protected]'

Using expressions:

"EMPNO=$EMPNO and ENAME=$EMPNAME"

Number of retries

Integer

Specify the maximum number of retry attempts the Snap must make in case of network failure.

Default value: 0

Example: 3

Retry interval (seconds)

Integer

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

Dropdown list

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

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.