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。

此条目有帮助吗?