Title: page_size is ignored when using to_dataframe_iterable with bqstorage_client · Issue #1256 · googleapis/python-bigquery · GitHub
Open Graph Title: page_size is ignored when using to_dataframe_iterable with bqstorage_client · Issue #1256 · googleapis/python-bigquery
X Title: page_size is ignored when using to_dataframe_iterable with bqstorage_client · Issue #1256 · googleapis/python-bigquery
Description: Environment details OS type and version: Debian 10 (dataproc image 2.0-debian10) Python version: python --version : Python 3.8.10 pip version: pip --version: pip 22.1 google-cloud-bigquery version: pip show google-cloud-bigquery : google...
Open Graph Description: Environment details OS type and version: Debian 10 (dataproc image 2.0-debian10) Python version: python --version : Python 3.8.10 pip version: pip --version: pip 22.1 google-cloud-bigquery version:...
X Description: Environment details OS type and version: Debian 10 (dataproc image 2.0-debian10) Python version: python --version : Python 3.8.10 pip version: pip --version: pip 22.1 google-cloud-bigquery version:...
Opengraph URL: https://github.com/googleapis/python-bigquery/issues/1256
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"page_size is ignored when using to_dataframe_iterable with bqstorage_client","articleBody":"#### Environment details\r\n\r\n - OS type and version: Debian 10 (dataproc image 2.0-debian10)\r\n - Python version: `python --version` : Python 3.8.10\r\n - pip version: `pip --version`: pip 22.1\r\n - `google-cloud-bigquery` version: `pip show google-cloud-bigquery` : google-cloud-bigquery==2.34.3, google-cloud-bigquery-storage==2.13.1\r\n\r\n#### Steps to reproduce\r\n\r\nDefine a job with page_size and use to_dataframe_iterable with a bqstorage_client. The page_size argument is ignored: the number of rows in the dataframes dont correspond to page_size\r\n\r\n#### Code example\r\n\r\n ```python\r\nfrom google.cloud import bigquery_storage\r\nfrom google.cloud import bigquery\r\n\r\nproject_name = 'my_project'\r\ntable_name = 'tmp.my_table'\r\nbq_client = bigquery.Client(project=project_name)\r\nbqstorageclient = bigquery_storage.BigQueryReadClient()\r\n\r\n# to_dataframe_iterable with list_rows and bqstorage_client. It ignores page_size and uses default\r\njob0 = bq_client.list_rows(\r\n table=table_name,\r\n page_size=100\r\n)\r\ni0 = job0.to_dataframe_iterable(bqstorage_client=bqstorageclient)\r\nprint(next(i0).shape) # (896, 32)\r\n\r\n# to_dataframe_iterable with list_rows. page_size is respected\r\njob1 = bq_client.list_rows(\r\n table=table_name,\r\n page_size=100\r\n)\r\ni1 = job1.to_dataframe_iterable()\r\nprint(next(i1).shape) # (100, 32)\r\n\r\n# to_dataframe_iterable with query and bqstorage_client. It ignores page_size and uses default\r\njob2 = bq_client.query(\r\n query='SELECT * FROM %s' % table_name,\r\n)\r\ni2 = job2.result(page_size=100).to_dataframe_iterable(bqstorage_client=bqstorageclient)\r\nprint(next(i2).shape) # (896, 32)\r\n\r\n# to_dataframe_iterable with query. page_size is respected\r\njob3 = bq_client.query(\r\n query='SELECT * FROM %s' % table_name,\r\n)\r\ni3 = job3.result(page_size=100).to_dataframe_iterable()\r\nprint(next(i3).shape) # (100, 32)\r\n```\r\n\r\n","author":{"url":"https://github.com/Lmmejia11","@type":"Person","name":"Lmmejia11"},"datePublished":"2022-05-19T15:02:18Z","url":"https://github.com/googleapis/python-bigquery/issues/1256"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:3d563880-6e8c-1e4f-f418-2349b18ff70f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93C4:3C9CC4:33F37:48DDE:6AFE1D87 |
| html-safe-nonce | 62ffe5278be8c9807f67b7aafd642a0668cd355ddfcef7902a935d0262021ad2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0M0OjNDOUNDNDozM0YzNzo0OERERTo2QUZFMUQ4NyIsInZpc2l0b3JfaWQiOiIyNjM4OTAzOTQ2NTU4NDQ2OTgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fa023029915adfa87b9a688f5f2c736f3479f46702d65b7c1fd8171839317403 |
| hovercard-subject-tag | issue:1241923460 |
| 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/python-bigquery/1256/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2126eba12f894a9aa3bcb9d86143d4a69a9df718be3847811c5e483569d198e6/googleapis/python-bigquery/issues/1256 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2126eba12f894a9aa3bcb9d86143d4a69a9df718be3847811c5e483569d198e6/googleapis/python-bigquery/issues/1256 |
| og:image:alt | Environment details OS type and version: Debian 10 (dataproc image 2.0-debian10) Python version: python --version : Python 3.8.10 pip version: pip --version: pip 22.1 google-cloud-bigquery version:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lmmejia11 |
| hostname | github.com |
| expected-hostname | github.com |
| None | d0525ab1464526bf4532a5551aa348cf100dff75ef808a96fc67a08b1d946aa9 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-bigquery git https://github.com/googleapis/python-bigquery.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992475 |
| octolytics-dimension-repository_nwo | googleapis/python-bigquery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992475 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-bigquery |
| 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 | fef3993a71fa20f7be8e167132fbf9619bc66e12 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width