RedshiftDataOperator

Amazon

Executes SQL Statements against an Amazon Redshift cluster using Redshift Data

View on GitHub

Last Updated: Mar. 2, 2023

Access Instructions

Install the Amazon provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

databasethe name of the database
sqlthe SQL statement or list of SQL statement to run
cluster_identifierunique identifier of a cluster
db_userthe database username
parametersthe parameters for the SQL statement
secret_arnthe name or ARN of the secret that enables db access
statement_namethe name of the SQL statement
with_eventindicates whether to send an event to EventBridge
wait_for_completionindicates whether to wait for a result, if True wait, if False don’t wait
poll_intervalhow often in seconds to check the query status
return_sql_resultif True will return the result of an SQL statement, if False (default) will return statement ID
aws_conn_idaws connection to use
regionaws region to use

Documentation

Executes SQL Statements against an Amazon Redshift cluster using Redshift Data

See also

For more information on how to use this operator, take a look at the guide: Execute a statement on an Amazon Redshift cluster

Was this page helpful?