airflow.providers.apache.hive.transfers.hive_to_samba

此模組包含一個用於將資料從 Hive 移動到 Samba 的 operator。

HiveToSambaOperator

在特定的 Hive 資料庫中執行 hql 程式碼,並將結果作為 csv 檔案載入到 Samba 位置。

模組內容

airflow.providers.apache.hive.transfers.hive_to_samba.HiveToSambaOperator(*, hql, destination_filepath, samba_conn_id='samba_default', hiveserver2_conn_id='hiveserver2_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

在特定的 Hive 資料庫中執行 hql 程式碼,並將結果作為 csv 檔案載入到 Samba 位置。

引數:
  • hql (str) – 要匯出的 hql。(模板化的)

  • destination_filepath (str) – 檔案將被推送到 samba 的目標檔案路徑

  • samba_conn_id (str) – 對 samba 目標的引用

  • hiveserver2_conn_id (str) – 對 :ref: Hive Server2 thrift 服務連線 ID 的引用。

template_fields: collections.abc.Sequence[str] = ('hql', 'destination_filepath')[source]
template_ext: collections.abc.Sequence[str] = ('.hql', '.sql')[source]
template_fields_renderers[source]
hiveserver2_conn_id = 'hiveserver2_default'[source]
samba_conn_id = 'samba_default'[source]
destination_filepath[source]
hql[source]
execute(context)[source]

建立 operator 時派生。

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

有關更多 context,請參考 get_template_context。

此條目有幫助嗎?