From c00dafe15edfb0f0f7cab02213d465125a92ba57 Mon Sep 17 00:00:00 2001 From: Maxime Date: Mon, 22 Jun 2015 06:02:18 +0000 Subject: [PATCH] Making HiveCliHook.run_cli return stdout --- airflow/hooks/hive_hooks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airflow/hooks/hive_hooks.py b/airflow/hooks/hive_hooks.py index c302aac7996ec..ac21cbb82386f 100644 --- a/airflow/hooks/hive_hooks.py +++ b/airflow/hooks/hive_hooks.py @@ -57,13 +57,17 @@ def run_cli(self, hql, schema=None): cwd=tmp_dir) all_err = '' self.sp = sp + stdout = "" for line in iter(sp.stdout.readline, ''): + stdout += line logging.info(line.strip()) sp.wait() if sp.returncode: raise AirflowException(all_err) + return stdout + def load_file( self, filepath,