| :mod:`airflow.hooks.pig_hook` |
| ============================= |
| |
| .. py:module:: airflow.hooks.pig_hook |
| |
| |
| Module Contents |
| --------------- |
| |
| .. py:class:: PigCliHook(pig_cli_conn_id='pig_cli_default') |
| |
| Bases: :class:`airflow.hooks.base_hook.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"}`` |
| |
| |
| .. 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 |
| |
| |
| |
| |
| .. method:: kill(self) |
| |
| |
| |
| |