utkarsharma2 commented on code in PR #31596:
URL: https://github.com/apache/airflow/pull/31596#discussion_r1251846823


##########
airflow/providers/snowflake/hooks/snowflake_sql_api.py:
##########
@@ -254,3 +246,30 @@ def get_sql_api_query_status(self, query_id: str) -> 
dict[str, str | list[str]]:
             }
         else:
             return {"status": "error", "message": resp["message"]}
+
+    def get_sql_api_query_status(self, query_id: str) -> dict[str, str | 
list[str]]:
+        """
+        Based on the query id async HTTP request is made to snowflake SQL API 
and return response.
+
+        :param query_id: statement handle id for the individual statements.
+        """
+        self.log.info("Retrieving status for query id %s", query_id)
+        header, params, url = self.get_request_url_header_params(query_id)
+        response = requests.get(url, params=params, headers=header)
+        status_code = response.status_code
+        resp = response.json()
+        return self._process_response(status_code, resp)
+
+    async def get_sql_api_query_status_async(self, query_id: str) -> dict[str, 
str | list[str]]:
+        """
+        Based on the query id async HTTP request is made to snowflake SQL API 
and return response.
+
+        :param query_id: statement handle id for the individual statements.
+        """
+        self.log.info("Retrieving status for query id %s", {query_id})

Review Comment:
   ```suggestion
           self.log.info("Retrieving status for query id %s", query_id)
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to