| :py:mod:`airflow.providers.apache.pig.hooks.pig` |
| ================================================ |
| |
| .. py:module:: airflow.providers.apache.pig.hooks.pig |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.apache.pig.hooks.pig.PigCliHook |
| |
| |
| |
| |
| .. py:class:: PigCliHook(pig_cli_conn_id = default_conn_name) |
| |
| Bases: :py:obj:`airflow.hooks.base.BaseHook` |
| |
| Simple wrapper around the pig CLI. |
| |
| Note that you can also set default pig CLI properties using the |
| ``pig_properties`` to be used in your connection as in |
| ``{"pig_properties": "-Dpig.tmpfilecompression=true"}`` |
| |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = pig_cli_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = pig_cli_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = pig_cli |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = Pig Client Wrapper |
| |
| |
| |
| .. py:method:: run_cli(self, pig, pig_opts = None, verbose = True) |
| |
| Run an pig script using the pig cli |
| |
| >>> ph = PigCliHook() |
| >>> result = ph.run_cli("ls /;", pig_opts="-x mapreduce") |
| >>> ("hdfs://" in result) |
| True |
| |
| |
| .. py:method:: kill(self) |
| |
| Kill Pig job |
| |
| |
| |