airflow.providers.amazon.aws.hooks.redshift_sql
¶
Module Contents¶
Classes¶
Execute statements against Amazon Redshift. |
- class airflow.providers.amazon.aws.hooks.redshift_sql.RedshiftSQLHook(*args, aws_conn_id='aws_default', **kwargs)[source]¶
Bases:
airflow.providers.common.sql.hooks.sql.DbApiHook
Execute statements against Amazon Redshift.
This hook requires the redshift_conn_id connection.
Note: For AWS IAM authentication, use iam in the extra connection parameters and set it to true. Leave the password field empty. This will use the “aws_default” connection to get the temporary token unless you override with aws_conn_id when initializing the hook. The cluster-identifier is extracted from the beginning of the host field, so is optional. It can however be overridden in the extra field. extras example:
{"iam":true}
- Parameters
redshift_conn_id – reference to Amazon Redshift connection id
Note
get_sqlalchemy_engine() and get_uri() depend on sqlalchemy-amazon-redshift
- get_iam_token(conn)[source]¶
Retrieve a temporary password to connect to Redshift.
Port is required. If none is provided, default is used for each service.