Title: Synchronous query API hides job · Issue #1278 · googleapis/google-cloud-python · GitHub
Open Graph Title: Synchronous query API hides job · Issue #1278 · googleapis/google-cloud-python
X Title: Synchronous query API hides job · Issue #1278 · googleapis/google-cloud-python
Description: Under the covers, the resources returned by synchronous jobs/query API and the follow-on jobs/getQueryResults API obscure most information found in the underlying jobs resource for the query job. I'm up against this issue while trying to...
Open Graph Description: Under the covers, the resources returned by synchronous jobs/query API and the follow-on jobs/getQueryResults API obscure most information found in the underlying jobs resource for the query job. I...
X Description: Under the covers, the resources returned by synchronous jobs/query API and the follow-on jobs/getQueryResults API obscure most information found in the underlying jobs resource for the query job. I...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/1278
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Synchronous query API hides job","articleBody":"Under the covers, the resources returned by [synchronous `jobs/query` API](https://cloud.google.com/bigquery/docs/reference/v2/jobs/query) and the [follow-on `jobs/getQueryResults` API](https://cloud.google.com/bigquery/docs/reference/v2/jobs/getQueryResults) obscure most information found in the underlying [`jobs` resource](https://cloud.google.com/bigquery/docs/reference/v2/jobs#resource) for the query job.\n\nI'm up against this issue while trying to implement `Client.list_jobs`, which calls the [`jobs/list` API](https://cloud.google.com/bigquery/docs/reference/v2/jobs/list) and tries to return instances of the appropriate job class. That API call returns job resources for synchronous queries which are effectively indistinguishable from those created for asynchronous queries (I've only been able to tell them apart by checking that the `datasetId` of the `destinationTable` does not match any of the \"public\" datasets for the project).\n\nBecause of this discrepancy, I believe that the current `jobs.RunSyncQueryJob` class is misnamed: instead, it should be called something like `query.QueryResults`: this new/renamed class would not pretend to be a job, but instead would have a `job` accessor which created/returned a `jobs.QueryJob` instance (which would be renamed from the current `jobs.RunAsyncQueryJob`). `Client.list_jobs` would then always return instances of `jobs.QueryJob`, even for synchronous queries.\n\n@dhermes, @jgeewax please comment if you disagree with this conclusion.\n","author":{"url":"https://github.com/tseaver","@type":"Person","name":"tseaver"},"datePublished":"2015-12-09T20:35:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1278/google-cloud-python/issues/1278"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b367865a-86f2-e47d-57f9-b47973f7b2e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2FA:5CED0:7BB73D:A6BA65:6A4D3A4B |
| html-safe-nonce | 79474691ab53214a790b7591a26c0bf944ea7f500293076ec74806d8119e1ab3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkZBOjVDRUQwOjdCQjczRDpBNkJBNjU6NkE0RDNBNEIiLCJ2aXNpdG9yX2lkIjoiMzE5NDYxNTUyNzE1OTcwODIzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 77992a6e6aed60d769099388bdc4f7726b701feabe8d52bf27cd324ce8140bc7 |
| hovercard-subject-tag | issue:121333263 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/1278/issue_layout |
| twitter:image | https://opengraph.githubassets.com/44eb62d4c4f93e83efb5a3b3028100c9f2c6fc29b58dabcd12f538f45e89056d/googleapis/google-cloud-python/issues/1278 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/44eb62d4c4f93e83efb5a3b3028100c9f2c6fc29b58dabcd12f538f45e89056d/googleapis/google-cloud-python/issues/1278 |
| og:image:alt | Under the covers, the resources returned by synchronous jobs/query API and the follow-on jobs/getQueryResults API obscure most information found in the underlying jobs resource for the query job. I... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tseaver |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width