Skip to content

No SQL error shown when using the JDBC operator #18482

Description

@jyotsa09

Apache Airflow version

2.2.0b1 (beta snapshot)

Operating System

Debian buster

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

astro dev start
Dockerfile - https://gist.github.com/jyotsa09/267940333ffae4d9f3a51ac19762c094#file-dockerfile

What happened

Both connection pointed to the same database where table "Person" doesn't exist.

When there is a SQL failure in PostgressOperator then logs are saying -

psycopg2.errors.UndefinedTable: relation "person" does not exist
LINE 1: Select * from Person

When there is a SQL failure in JDBCOperator then logs are just saying -

[2021-09-23, 19:06:22 UTC] {local_task_job.py:154} INFO - Task exited with return code

What you expected to happen

JDBCOperator should show "Task failed with exception" or something similar to Postgress.

How to reproduce

Use this dag - https://gist.github.com/jyotsa09/267940333ffae4d9f3a51ac19762c094
(Connection extras is in the gist.)

Anything else

Related: #16564

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions