alessandrolacorte commented on code in PR #26932:
URL: https://github.com/apache/airflow/pull/26932#discussion_r990994476


##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -250,7 +250,7 @@ def execute(self, context: Context):
             records = hook.get_first(self.sql)
 
             if not records:
-                raise AirflowException(f"The following query returned zero 
rows: {self.sql}")
+                raise AirflowFailException(f"The following query returned zero 
rows: {self.sql}")

Review Comment:
   I don't understand what you mean. I think we are not understanding each 
other. I am speaking of something totally different. You are encapsulating when 
you throw this error, right? You throw this error if the condition in your SQL 
is not met, not if you can't reach the DB. So, the query returns True or False, 
then if it is False you throw the error `AirflowFailException`, in any other 
case you throw `AirflowException`. Can we agree on this? 



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