Title: [QUESTION][BigQuery] would it be possible to have extract_table_to_storage support with an optional query · Issue #2361 · googleapis/google-cloud-python · GitHub
Open Graph Title: [QUESTION][BigQuery] would it be possible to have extract_table_to_storage support with an optional query · Issue #2361 · googleapis/google-cloud-python
X Title: [QUESTION][BigQuery] would it be possible to have extract_table_to_storage support with an optional query · Issue #2361 · googleapis/google-cloud-python
Description: Hi Would be great to have a query as an optional field to the extract_table_to_storage method in the google.cloud.bigquery.client.py , so that it will be easy with code to extract the data from the desired table with the custom query and...
Open Graph Description: Hi Would be great to have a query as an optional field to the extract_table_to_storage method in the google.cloud.bigquery.client.py , so that it will be easy with code to extract the data from the...
X Description: Hi Would be great to have a query as an optional field to the extract_table_to_storage method in the google.cloud.bigquery.client.py , so that it will be easy with code to extract the data from the...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/2361
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[QUESTION][BigQuery] would it be possible to have extract_table_to_storage support with an optional query ","articleBody":"Hi\n\nWould be great to have a query as an optional field to the extract_table_to_storage method in the google.cloud.bigquery.client.py , so that it will be easy with code to extract the data from the desired table with the custom query and write to GS, or is there any other way to directly write the custom query data after creating the job \n\n``` python\nimport uuid \nfrom gcloud import bigquery\nclient = bigquery.Client(project='test-sample')\nquery = \"\"\"\\\nSELECT * FROM test_database.activity \\\nwhere activity_date = DATE_ADD(CURRENT_DATE(), -1, 'DAY') order by activity_date;\"\"\"\ndataset = client.dataset('test_database')\njob_name = 'test_job_name_' + str(uuid.uuid4())\nquery_job = client.run_async_query('fullname-age-query-job', query)\njob = bigquery_client.extract_table_to_storage(\n client.run_async_query(job_name, query), destination)\n```\n\n or is there any other way for this work around, i have some tables as partitioned tables and some with out partition tables, and would need to export some times the data from partitioned and the non-partitioned tables for a given date for analysis with other tools. \n\nThanks \n","author":{"url":"https://github.com/vrcs","@type":"Person","name":"vrcs"},"datePublished":"2016-09-20T12:27:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2361/google-cloud-python/issues/2361"}
| 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:e7d32675-42ba-5488-c301-5f6729cdd2c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB30:2E1914:D29A82:11CFCE0:6A4D5979 |
| html-safe-nonce | d5c0cbe928453771c84c915b41a703d32665153658d0775003e48a50d0f7b6dd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjMwOjJFMTkxNDpEMjlBODI6MTFDRkNFMDo2QTRENTk3OSIsInZpc2l0b3JfaWQiOiI3NDEyNTg1MTM2MjYzMDkyNjAxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c656974d0c579ca7871427a1d3ddfa182187a750d3c1d6bbaa13e1bd666ab6e2 |
| hovercard-subject-tag | issue:178045701 |
| 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/2361/issue_layout |
| twitter:image | https://opengraph.githubassets.com/785bf72fc340a0f2a148df98d151bc682c562b1d3484f4c838c775fa18da05a1/googleapis/google-cloud-python/issues/2361 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/785bf72fc340a0f2a148df98d151bc682c562b1d3484f4c838c775fa18da05a1/googleapis/google-cloud-python/issues/2361 |
| og:image:alt | Hi Would be great to have a query as an optional field to the extract_table_to_storage method in the google.cloud.bigquery.client.py , so that it will be easy with code to extract the data from the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vrcs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2a1443ff9733a3016431263ea73c93d8fe00c195eb4a7670ac30e7848f045441 |
| 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 | f3bdd3157ea1f0fd738d408eceeead721acf1dc3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width