ashb commented on a change in pull request #6075: [AIRFLOW-5266] Allow 
aws_athena_hook to get all query results
URL: https://github.com/apache/airflow/pull/6075#discussion_r373780628
 
 

 ##########
 File path: airflow/providers/amazon/aws/hooks/athena.py
 ##########
 @@ -133,7 +133,17 @@ def get_query_results(self, query_execution_id):
         elif query_state in self.INTERMEDIATE_STATES or query_state in 
self.FAILURE_STATES:
             self.log.error('Query is in {state} state. Cannot fetch 
results'.format(state=query_state))
             return None
-        return 
self.get_conn().get_query_results(QueryExecutionId=query_execution_id)
+        result_params = {'QueryExecutionId': query_execution_id,
+                         'MaxResults': max_results}
+        results = self.get_conn().get_query_results(**result_params)
 
 Review comment:
   Yes, see 
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/athena.html#paginators
 and 
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/paginators.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to