airflow.providers.apache.hive.transfers.hive_to_samba

此模組包含一個將資料從 Hive 移動到 Samba 的運算子。

模組內容

類別

HiveToSambaOperator

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

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

基底類別: airflow.models.BaseOperator

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

參數
  • hql (str) – 要匯出的 hql。(樣板化)

  • destination_filepath (str) – 將檔案推送至 samba 的檔案路徑

  • samba_conn_id (str) – samba 目標的參考

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

template_fields: collections.abc.Sequence[str] = ('hql', 'destination_filepath')[來源]
template_ext: collections.abc.Sequence[str] = ('.hql', '.sql')[來源]
template_fields_renderers[來源]
execute(context)[來源]

在建立運算子時衍生。

Context 是與呈現 jinja 範本時使用的字典相同。

請參閱 get_template_context 以取得更多上下文資訊。

此條目是否有幫助?