blob: 4a07c9e627b6acf11eff4d53178eb8ddb35d7782 [file] [log] [blame]
:py:mod:`airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb`
============================================================================
.. py:module:: airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb
.. autoapi-nested-parse::
This DAG will not work unless you create an Amazon EMR cluster running
Apache Hive and copy data into it following steps 1-4 (inclusive) here:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/EMRforDynamoDB.Tutorial.html
Module Contents
---------------
Functions
~~~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.create_dynamodb_table
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.get_dynamodb_item_count
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.delete_dynamodb_table
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.configure_hive_connection
Attributes
~~~~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.DYNAMODB_TABLE_NAME
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.HIVE_CONNECTION_ID
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.HIVE_HOSTNAME
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.DYNAMODB_TABLE_HASH_KEY
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.HIVE_SQL
airflow.providers.amazon.aws.example_dags.example_hive_to_dynamodb.doc_md
.. py:data:: DYNAMODB_TABLE_NAME
:annotation: = example_hive_to_dynamodb_table
.. py:data:: HIVE_CONNECTION_ID
.. py:data:: HIVE_HOSTNAME
.. py:data:: DYNAMODB_TABLE_HASH_KEY
:annotation: = feature_id
.. py:data:: HIVE_SQL
:annotation: = SELECT feature_id, feature_name, feature_class, state_alpha FROM hive_features
.. py:function:: create_dynamodb_table()
.. py:function:: get_dynamodb_item_count()
A DynamoDB table has an ItemCount value, but it is only updated every six hours.
To verify this DAG worked, we will scan the table and count the items manually.
.. py:function:: delete_dynamodb_table()
.. py:function:: configure_hive_connection()
.. py:data:: doc_md