airflow.providers.amazon.aws.hooks.quicksight

Module Contents

Classes

QuickSightHook

Interact with Amazon QuickSight.

class airflow.providers.amazon.aws.hooks.quicksight.QuickSightHook(*args, **kwargs)[source]

Bases: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook

Interact with Amazon QuickSight.

Provide thin wrapper around boto3.client("quicksight").

Additional arguments (such as aws_conn_id) may be specified and are passed down to the underlying AwsBaseHook.

NON_TERMINAL_STATES[source]
FAILED_STATES[source]
create_ingestion(data_set_id, ingestion_id, ingestion_type, wait_for_completion=True, check_interval=30, aws_account_id=None)[source]

Create and start a new SPICE ingestion for a dataset; refresh the SPICE datasets.

Parameters
  • data_set_id (str) – ID of the dataset used in the ingestion.

  • ingestion_id (str) – ID for the ingestion.

  • ingestion_type (str) – Type of ingestion: “INCREMENTAL_REFRESH”|”FULL_REFRESH”

  • wait_for_completion (bool) – if the program should keep running until job finishes

  • check_interval (int) – the time interval in seconds which the operator will check the status of QuickSight Ingestion

  • aws_account_id (str | None) – An AWS Account ID, if set to None then use associated AWS Account ID.

Returns

Returns descriptive information about the created data ingestion having Ingestion ARN, HTTP status, ingestion ID and ingestion status.

Return type

dict

get_status(aws_account_id, data_set_id, ingestion_id)[source]

Get the current status of QuickSight Create Ingestion API.

Parameters
  • aws_account_id (str | None) – An AWS Account ID, if set to None then use associated AWS Account ID.

  • data_set_id (str) – QuickSight Data Set ID

  • ingestion_id (str) – QuickSight Ingestion ID

Returns

An QuickSight Ingestion Status

Return type

str

get_error_info(aws_account_id, data_set_id, ingestion_id)[source]

Get info about the error if any.

Parameters
  • aws_account_id (str | None) – An AWS Account ID, if set to None then use associated AWS Account ID.

  • data_set_id (str) – QuickSight Data Set ID

  • ingestion_id (str) – QuickSight Ingestion ID

Returns

Error info dict containing the error type (key ‘Type’) and message (key ‘Message’) if available. Else, returns None.

Return type

dict | None

wait_for_state(aws_account_id, data_set_id, ingestion_id, target_state, check_interval)[source]

Check status of a QuickSight Create Ingestion API.

Parameters
  • aws_account_id (str | None) – An AWS Account ID, if set to None then use associated AWS Account ID.

  • data_set_id (str) – QuickSight Data Set ID

  • ingestion_id (str) – QuickSight Ingestion ID

  • target_state (set) – Describes the QuickSight Job’s Target State

  • check_interval (int) – the time interval in seconds which the operator will check the status of QuickSight Ingestion

Returns

response of describe_ingestion call after Ingestion is done

sts_hook()[source]

Was this entry helpful?