feat(bigquery): add support for listing jobs by parent job#9225
Merged
plamut merged 3 commits intogoogleapis:masterfrom Sep 27, 2019
Merged
feat(bigquery): add support for listing jobs by parent job#9225plamut merged 3 commits intogoogleapis:masterfrom
plamut merged 3 commits intogoogleapis:masterfrom
Conversation
Contributor
Author
|
The system test failure is because the scripting feature is not enabled for the test project. |
Contributor
|
@shollyman is working on getting the project whitelisted. |
Contributor
Author
|
@busunkim96 Great, thanks! Let me know when done, so that I can restart the tests. |
Contributor
Author
|
It appears that the scripting feature has been enabled for the test project (the system test passes locally), re-running. Edit: The failure now is flakiness, will make the test more robust. |
tswast
approved these changes
Sep 26, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9190.
This PR adds the parent job filter to
client.list_jobs().How to test
Prerequisite: The (alpha) scripting feature must be enabled for your BigQuery project.
Create and run an SQL script on your project, then list jobs for that project. Find the parent job, i.e. the one whose
num_child_jobsproperty is greater than zero, and use its ID to list the jobs again using theparent_jobfilter. That call should correctly return only the parent job's child jobs.See the new system test in this PR for an example.
Note
There currently seems to be a backend bug - the job's
parentJobIdinformation is only returned when the jobs.list API endpoint is invoked with theparentJobIdfilter, but not when fetching jobs with a different filter such asminCreationTime.