airflow.providers.amazon.aws.hooks.dynamodb

This module contains the Amazon DynamoDB Hook.

Module Contents

Classes

DynamoDBHook

Interact with Amazon DynamoDB.

class airflow.providers.amazon.aws.hooks.dynamodb.DynamoDBHook(*args, table_keys=None, table_name=None, **kwargs)[source]

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

Interact with Amazon DynamoDB.

Provide thick wrapper around boto3.resource("dynamodb").

Parameters
  • table_keys (list | None) – partition key and sort key

  • table_name (str | None) – target DynamoDB table

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

client()[source]

Return boto3 client.

write_batch_data(items)[source]

Write batch items to DynamoDB table with provisioned throughout capacity.

Parameters

items (Iterable) – list of DynamoDB items.

get_import_status(import_arn)[source]

Get import status from Dynamodb.

Parameters

import_arn (str) – The Amazon Resource Name (ARN) for the import.

Returns

Import status, Error code and Error message

Return type

tuple[str, str | None, str | None]

Was this entry helpful?