:py:mod:`astronomer.providers.amazon.aws.hooks.redshift_data` ============================================================= .. py:module:: astronomer.providers.amazon.aws.hooks.redshift_data Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: astronomer.providers.amazon.aws.hooks.redshift_data.RedshiftDataHook .. py:class:: RedshiftDataHook(*args, poll_interval = 0, **kwargs) Bases: :py:obj:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook` RedshiftDataHook inherits from AwsBaseHook to connect with AWS redshift by using boto3 client_type as redshift-data we can interact with redshift cluster database and execute the query :param aws_conn_id: The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node). :param verify: Whether or not to verify SSL certificates. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html :param region_name: AWS region_name. If not specified then the default boto3 behaviour is used. :param client_type: boto3.client client_type. Eg 's3', 'emr' etc :param resource_type: boto3.resource resource_type. Eg 'dynamodb' etc :param config: Configuration for botocore client. (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html) :param poll_interval: polling period in seconds to check for the status .. py:method:: get_conn_params() Helper method to retrieve connection args .. py:method:: execute_query(sql, params) Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL) :param sql: list of query ids .. py:method:: get_query_status(query_ids) :async: Async function to get the Query status by query Ids. The function takes list of query_ids, makes async connection to redshift data to get the query status by query id and returns the query status. In case of success, it returns a list of query IDs of the queries that have a status `FINISHED`. In the case of partial failure meaning if any of queries fail or is aborted by the user we return an error as a whole. :param query_ids: list of query ids .. py:method:: is_still_running(qid) :async: Async function to check whether the query is still running to return True or in "PICKED", "STARTED" or "SUBMITTED" state to return False.