You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "JDarDagran (via GitHub)" <gi...@apache.org> on 2023/11/06 08:33:06 UTC

Re: [PR] openlineage, aws: Add OpenLineage support for AthenaOperator. [airflow]

JDarDagran commented on code in PR #35090:
URL: https://github.com/apache/airflow/pull/35090#discussion_r1382929616


##########
airflow/providers/amazon/aws/hooks/athena.py:
##########
@@ -121,7 +122,26 @@ def run_query(
         self.log.info("Query execution id: %s", query_execution_id)
         return query_execution_id
 
-    def check_query_status(self, query_execution_id: str) -> str | None:
+    def get_query_execution(self, query_execution_id: str, use_cached_response: bool = False) -> dict:
+        """Get information about a single execution of a query.
+
+        .. seealso::
+            - :external+boto3:py:meth:`Athena.Client.get_query_execution`
+
+        :param query_execution_id: Id of submitted athena query
+        :param use_cached_response: If True, use execution information cache
+        """
+        # second check if to satisfy mypy
+        if use_cached_response or not hasattr(self._get_query_execution, "__wrapped__"):
+            return self._get_query_execution(query_execution_id=query_execution_id)
+        return self._get_query_execution.__wrapped__(self, query_execution_id=query_execution_id)

Review Comment:
   @Taragolis would you mind looking at the changes? Thanks in advance!



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org