forked from bellwether/minerva
Adding ResultConfiguration for specific output location for Athena
This commit is contained in:
parent
72fd7fe005
commit
757bc74bfd
1 changed files with 4 additions and 1 deletions
|
|
@ -44,11 +44,14 @@ class Execute:
|
||||||
return self.sql
|
return self.sql
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
config = {"OutputLocation": self.athena.output}
|
||||||
if self.params:
|
if self.params:
|
||||||
resp = self.client.start_query_execution(QueryString=self.query(),
|
resp = self.client.start_query_execution(QueryString=self.query(),
|
||||||
|
ResultConfiguration=config,
|
||||||
ExecutionParameters=self.params)
|
ExecutionParameters=self.params)
|
||||||
else:
|
else:
|
||||||
resp = self.client.start_query_execution(QueryString=self.query())
|
resp = self.client.start_query_execution(QueryString=self.query(),
|
||||||
|
ResultConfiguration=config)
|
||||||
|
|
||||||
self.query_id = resp['QueryExecutionId']
|
self.query_id = resp['QueryExecutionId']
|
||||||
return resp
|
return resp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue