Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude partition from BigQuery table name #42130

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

moiseenkov
Copy link
Contributor

  • Bugfixed BigQuery table name splitting by excluding partition name following after the "$".
  • deprecated the function split_tablename which is identical to the method BigQueryHook.split_tablename.

@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Sep 10, 2024
Please enter the commit message for your changes. Lines starting
@potiuk potiuk merged commit 73f7d89 into apache:main Sep 11, 2024
55 checks passed
@nathadfield
Copy link
Collaborator

I think I have discovered an issue with this commit that is affecting tasks that use the BigQueryToBigQueryOperator when copying a table into specific partition of another table.

Results in an error like this.

google.api_core.exceptions.BadRequest: 400 Failed to copy Non partitioned table to Column partitioned table: not supported.; reason: invalid, message: Failed to copy Non partitioned table to Column partitioned table: not supported.

I will dig into it more tomorrow and hopefully have a fix for it ASAP.

@nathadfield
Copy link
Collaborator

@moiseenkov Why are we excluding the partition from the table_id?

@moiseenkov
Copy link
Contributor Author

@moiseenkov Why are we excluding the partition from the table_id?

The reason was that partitioning breaks integration of this operator with Google Cloud Dataplex when it is launched in Cloud Composer. Apparently, my fix introduced another bug, so we should probably revert it. Regarding the initial problem with integration, I think we can take care of it on the Cloud Composer's side. Sorry for troubling.

@nathadfield
Copy link
Collaborator

@moiseenkov No worries. It's not your fault. We should have better test coverage. Do you want to revert it?

@moiseenkov
Copy link
Contributor Author

@moiseenkov No worries. It's not your fault. We should have better test coverage. Do you want to revert it?

This PR contains one valuable deprecation which we'd like to keep. Thus we will introduce another PR that only reverts the breaking changes.

@nathadfield
Copy link
Collaborator

Sounds good! I will actually look at adding a test to the BigQueryToBigQueryOperator for this scenario too.

@moiseenkov
Copy link
Contributor Author

Thanks!

joaopamaral pushed a commit to joaopamaral/airflow that referenced this pull request Oct 21, 2024
Please enter the commit message for your changes. Lines starting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants