Fix logging in load-data to print the query being executed

Change-Id: I4332e8d3a340f11e1bbb1f6c5126b0b9b4a2ad8e
Reviewed-on: http://gerrit.ent.cloudera.com:8080/949
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: Ishaan Joshi <ishaan@cloudera.com>
This commit is contained in:
Lenni Kuff
2013-11-16 15:30:59 -08:00
committed by Henry Robinson
parent 48c1efad8a
commit f579ee8b25

View File

@@ -113,6 +113,7 @@ def exec_impala_query_from_file(file_name, result_queue):
queries = sqlparse.split(query_file.read())
for query in queries:
query = sqlparse.format(query.rstrip(';'), strip_comments=True)
print '(%s):\n%s\n' % (file_name, query.strip())
result = impala_client.execute(query)
except Exception as e:
print "Data Loading from Impala failed with error: %s" % str(e)