subbota19 commented on code in PR #46672:
URL: https://github.com/apache/airflow/pull/46672#discussion_r1976704960


##########
providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py:
##########
@@ -455,16 +455,21 @@ def execute(self, context: Context) -> None:
                 method_name="execute_complete",
             )
         else:
-            statement_status = self.poll_on_queries()
-            if statement_status["error"]:
-                raise AirflowException(statement_status["error"])
+            while True:
+                statement_status = self.poll_on_queries()

Review Comment:
   Hi @eladkal !
   Thanks for the suggestion. Let me add one point - inside the 
[poll_on_queries](https://github.com/apache/airflow/blob/main/providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py#L463)
 method we actually do 
[sleep](https://github.com/apache/airflow/blob/main/providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py#L482)
 for _poll_interval_(by default it's 5 second), so I believe the while loop 
already has a mechanism to handle throttling issues.



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