airflow.operators.hive_to_samba_operator

Module Contents

class airflow.operators.hive_to_samba_operator.Hive2SambaOperator(hql, destination_filepath, samba_conn_id='samba_default', hiveserver2_conn_id='hiveserver2_default', *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes hql code in a specific Hive database and loads the results of the query as a csv to a Samba location.

Parameters
  • hql (str) – the hql to be exported. (templated)

  • hiveserver2_conn_id (str) – reference to the hiveserver2 service

  • samba_conn_id (str) – reference to the samba destination

template_fields = ['hql', 'destination_filepath'][source]
template_ext = ['.hql', '.sql'][source]
execute(self, context)[source]

Was this entry helpful?