Skip to content

SQLTableCheckOperator issue with Oracle table alias #44135

Description

@igvog

Apache Airflow version

2.10.0

If "Other Airflow 2 version" selected, which one?

2

What happened?

SQLTableCheckOperator operator generate SQL with table "AS" alias and table alias with "AS" not working in Oracle database.
Needs to fix sql_check_template depends on connection type remove "AS".

What you think should happen instead?

No response

How to reproduce

from airflow.providers.common.sql.operators.sql import SQLTableCheckOperator

SQLTableCheckOperator(
        task_id="your_task",
        table="yout_table",
        checks={
            "row_count_check": {"check_statement": "COUNT(*) = 1000"}        },
        partition_clause="BALANCE_DATE = to_date('2024-11-11','yyyy-mm-dd')",
        conn_id=connection_should_be_oracle_db
    )

Operating System

ubuntu

Versions of Apache Airflow Providers

apache-airflow-providers-common-sql==1.7.2

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions