Skip to content

feat: Add standardized SQL check representation for listeners#66849

Merged
mobuchowski merged 3 commits into
apache:mainfrom
kacpermuda:feat-sql-checks-unify
May 14, 2026
Merged

feat: Add standardized SQL check representation for listeners#66849
mobuchowski merged 3 commits into
apache:mainfrom
kacpermuda:feat-sql-checks-unify

Conversation

@kacpermuda
Copy link
Copy Markdown
Collaborator

@kacpermuda kacpermuda commented May 13, 2026

This Pr should have no impact on SQL workflows - every _check_results build within execute is wrapped in a broad try/except; failures are swallowed and the operator proceeds normally.

Introduces a standardized SQLCheckResult dataclass populated by all SQL check operators (SQLColumnCheckOperator, SQLTableCheckOperator, SQLCheckOperator, SQLValueCheckOperator, SQLIntervalCheckOperator, SQLThresholdCheckOperator, BranchSQLOperator) after execute(). Each operator exposes its check outcome — name, type, success, expected/actual values, SQL expression, severity — through a uniform self._check_results attribute. This is primarily intended for listeners that consume check results (e.g. OpenLineage DataQualityAssertionsDatasetFacet / TestRunFacet), but the uniform structure also opens the door to unified logging or alerting in the future. Full unit test coverage is added for each operator's _build_check_results method and its integration with execute().

Also bumping min. ol client in OL provider as a side benefit.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Comment thread providers/common/sql/src/airflow/providers/common/sql/operators/sql.py Outdated
@kacpermuda kacpermuda force-pushed the feat-sql-checks-unify branch from d0b5379 to fcb7d3c Compare May 13, 2026 11:34
@kacpermuda
Copy link
Copy Markdown
Collaborator Author

kacpermuda commented May 13, 2026

FAB provider compat test failure for 3.0 is unrelated, some jwt library change - to be fixed separately on main. EDIT: Fix in #66840

Comment thread providers/common/sql/src/airflow/providers/common/sql/operators/sql.py Outdated
@kacpermuda kacpermuda force-pushed the feat-sql-checks-unify branch 2 times, most recently from 70638e6 to 8977239 Compare May 13, 2026 15:13
Comment thread providers/common/sql/src/airflow/providers/common/sql/operators/sql.py Outdated
Comment thread providers/common/sql/src/airflow/providers/common/sql/operators/sql.py Outdated
@kacpermuda kacpermuda force-pushed the feat-sql-checks-unify branch from 8977239 to e85ec10 Compare May 13, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants