You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQLTableCheckOperator builds multiple checks in such a way that if two or more checks are given, and one is not a fully aggregated statement, then the SQL fails as it is missing a GROUP BY clause.
SQLColumnCheckOperator provides only the last SQL query built from the columns, so when a check fails, it will only give the correct SQL in the exception statement by coincidence.
What you think should happen instead
Multiple checks should not need a GROUP BY clause
Either the correct SQL statement, or no SQL statement, should be returned in the exception message.
How to reproduce
For the SQLTableCheckOperator, using the operator like so:
Apache Airflow Provider(s)
common-sql
Versions of Apache Airflow Providers
apache-airflow-providers-common-sql==1.0.0
Apache Airflow version
2.3.3 (latest released)
Operating System
macOS Monterey 12.3.1
Deployment
Astronomer
Deployment details
No response
What happened
SQLTableCheckOperator
builds multiple checks in such a way that if two or more checks are given, and one is not a fully aggregated statement, then the SQL fails as it is missing aGROUP BY
clause.SQLColumnCheckOperator
provides only the last SQL query built from the columns, so when a check fails, it will only give the correct SQL in the exception statement by coincidence.What you think should happen instead
GROUP BY
clauseHow to reproduce
For the
SQLTableCheckOperator
, using the operator like so:For the
SQLColumnCheckOperator
, using the operator like so:and ensuring that any of the
ID
,LAND_DAMAGE_COST
, orPROPERTY_DAMAGE_COST
checks fail.An example DAG with the correct environment and data can be found here.
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: