Redshift SQL Operator Async¶
To executes SQL statements on an Amazon Redshift cluster asynchronously
RedshiftSQLOperatorAsync
.
task_create_table = RedshiftSQLOperatorAsync(
task_id="task_create_table",
sql="""
CREATE TABLE IF NOT EXISTS fruit (
fruit_id INTEGER,
name VARCHAR NOT NULL,
color VARCHAR NOT NULL
);
""",
redshift_conn_id=REDSHIFT_CONN_ID,
)
# https://github.com/astronomer/astronomer-providers/tree/main/astronomer/providers/amazon/aws/example_dags/example_redshift_sql.py