forked from bellwether/minerva
better exception info
This commit is contained in:
parent
209f32a7de
commit
383185e6cb
1 changed files with 2 additions and 3 deletions
|
|
@ -29,7 +29,6 @@ class Athena:
|
||||||
e.run()
|
e.run()
|
||||||
return e
|
return e
|
||||||
|
|
||||||
|
|
||||||
class Execute:
|
class Execute:
|
||||||
"""
|
"""
|
||||||
Execute will not return results, but will execute the SQL and return the final state.
|
Execute will not return results, but will execute the SQL and return the final state.
|
||||||
|
|
@ -42,7 +41,7 @@ class Execute:
|
||||||
self.sql = sql
|
self.sql = sql
|
||||||
self.params = [str(p) for p in params]
|
self.params = [str(p) for p in params]
|
||||||
self.info_cache = None
|
self.info_cache = None
|
||||||
self.files = []
|
self.temps = []
|
||||||
|
|
||||||
# The string of the query
|
# The string of the query
|
||||||
def query(self):
|
def query(self):
|
||||||
|
|
@ -116,7 +115,7 @@ class Query(Execute):
|
||||||
else:
|
else:
|
||||||
print("Error")
|
print("Error")
|
||||||
print(self.info_cache['Status']['AthenaError']['ErrorMessage'])
|
print(self.info_cache['Status']['AthenaError']['ErrorMessage'])
|
||||||
raise
|
raise Exception(self.info_cache['Status']['AthenaError']['ErrorMessage'])
|
||||||
#return status # canceled or error
|
#return status # canceled or error
|
||||||
|
|
||||||
# Blocks until the query has finished running and then returns you a pyarrow
|
# Blocks until the query has finished running and then returns you a pyarrow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue