Skip to content

Incorrect config name generated for BigQueryDeleteDataTransferConfigOperator #25718

@prajyotnaik3

Description

@prajyotnaik3

Apache Airflow version

2.3.3

What happened

When we try to delete a big query transfer config using BigQueryDeleteDataTransferConfigOperator, we are unable to find the config, as the generated transfer config name is erroneous.
As a result, although a transfer config id (that exists) is passed to the operator, we get an error saying that the transfer config doesn't exist.

What you think should happen instead

On further analysis, it was revealed that, in the bigquery_dts hook, the project name is incorrectly created as follows on the line 171:
project = f"/{project}/locations/{self.location}"
That is there's an extra / prefixed to the project.
Removing the extra / shall fix this bug.

How to reproduce

  1. Create a transfer config in the BQ data transfers/or use the operator BigQueryCreateDataTransferOperator (in a project located in Europe).
  2. Try to delete the transfer config using the BigQueryDeleteDataTransferConfigOperator by passing the location of the project along with the transfer config id. This step will throw the error.

Operating System

Windows 11

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions