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

fix: do not remove destinationTable from job config (#483) #484

Closed
wants to merge 1 commit into from

Conversation

dinigo
Copy link

@dinigo dinigo commented Jan 24, 2021

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #483 🦕

@dinigo dinigo requested review from a team and tswast and removed request for a team January 24, 2021 04:39
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 24, 2021
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Jan 24, 2021
@plamut plamut added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 25, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 25, 2021
@plamut
Copy link
Contributor

plamut commented Jan 25, 2021

@dinigo Thanks for the PR.

The changes need to be covered with the corresponding test(s), but it's not entirely clear what is the expected behavior here (as discussed on the ticket). Let's wait until that gets clarified.

@plamut plamut added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 25, 2021
@tswast
Copy link
Contributor

tswast commented Jan 25, 2021

As discussed in #483 the create_job function was initially added so that customers could retry jobs. Since the destination table isn't writable when it is an anonymous temporary table, we delete this property.

I agree that this was too aggressive, and to be a general create_job function we should only strip destinationTable when the temporary table datasetId begins with _ and the tableId begins with anon.

As @plamut unit tests need to be updated to cover this change in logic.

@tswast
Copy link
Contributor

tswast commented Jul 26, 2021

Now that we're considering a 3.0.0 release, I'd like us to revisit this request.

I believe to implement #539 @jimfulton will be adding a property to XYZJob classes with a copy of the original request that created the job. This could be used instead of trying to add/remove properties from the job resource that we get from the response.

Closing in favor of a future PR, tied to the 3.0.0 release.

@tswast tswast closed this Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Breaking Change] Don't remove destinationTable attribute in create_job
4 participants