airflow.providers.amazon.aws.transfers.hive_to_dynamodb

此模組包含用於將資料從 Hive 傳輸到 DynamoDB 的運算子。

HiveToDynamoDBOperator

將資料從 Hive 傳輸到 DynamoDB。

模組內容

airflow.providers.amazon.aws.transfers.hive_to_dynamodb.HiveToDynamoDBOperator(*, sql, table_name, table_keys, pre_process=None, pre_process_args=None, pre_process_kwargs=None, region_name=None, schema='default', hiveserver2_conn_id='hiveserver2_default', aws_conn_id='aws_default', **kwargs)[source]

基類: airflow.models.BaseOperator

將資料從 Hive 傳輸到 DynamoDB。

請注意,目前資料在推送到 DynamoDB 之前會載入到記憶體中,因此此運算子應僅用於資料量較小的情況。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南:Apache Hive 到 Amazon DynamoDB 資料傳輸運算子

引數:
  • sql (str) – 要針對 Hive 資料庫執行的 SQL 查詢。(模板化)

  • table_name (str) – 目標 DynamoDB 表

  • table_keys (list) – 分割槽鍵和排序鍵

  • pre_process (Callable | None) – 實現源資料的預處理

  • pre_process_args (list | None) – pre_process 函式引數列表

  • pre_process_kwargs (list | None) – pre_process 函式引數字典

  • region_name (str | None) – AWS 區域名稱 (示例: us-east-1)

  • schema (str) – Hive 資料庫模式

  • hiveserver2_conn_id (str) – 參考 :ref: Hive Server2 thrift 服務連線 ID <howto/connection:hiveserver2>。

  • aws_conn_id (str | None) – AWS 連線

template_fields: collections.abc.Sequence[str] = ('sql',)[source]
template_ext: collections.abc.Sequence[str] = ('.sql',)[source]
template_fields_renderers[source]
ui_color = '#a0e08c'[source]
sql[source]
table_name[source]
table_keys[source]
pre_process = None[source]
pre_process_args = None[source]
pre_process_kwargs = None[source]
region_name = None[source]
schema = 'default'[source]
hiveserver2_conn_id = 'hiveserver2_default'[source]
aws_conn_id = 'aws_default'[source]
execute(context)[source]

建立運算子時派生。

Context 是用於渲染 Jinja 模板的相同字典。

有關更多上下文資訊,請參閱 get_template_context。

此條目是否有幫助?