Title: BigQuery: Allow partial schema in `load_table_from_dataframe` · Issue #8140 · googleapis/google-cloud-python · GitHub
Open Graph Title: BigQuery: Allow partial schema in `load_table_from_dataframe` · Issue #8140 · googleapis/google-cloud-python
X Title: BigQuery: Allow partial schema in `load_table_from_dataframe` · Issue #8140 · googleapis/google-cloud-python
Description: As discussed in #8105 (comment) and implemented in pandas-gbq at googleapis/python-bigquery-pandas#218, often times the default schema detection works well enough for pandas -> BQ, and only one or two of many columns need to be overridde...
Open Graph Description: As discussed in #8105 (comment) and implemented in pandas-gbq at googleapis/python-bigquery-pandas#218, often times the default schema detection works well enough for pandas -> BQ, and only one or ...
X Description: As discussed in #8105 (comment) and implemented in pandas-gbq at googleapis/python-bigquery-pandas#218, often times the default schema detection works well enough for pandas -> BQ, and only one ...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/8140
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BigQuery: Allow partial schema in `load_table_from_dataframe`","articleBody":"As discussed in https://github.com/googleapis/google-cloud-python/pull/8105#discussion_r286997609 and implemented in pandas-gbq at https://github.com/pydata/pandas-gbq/issues/218, often times the default schema detection works well enough for pandas -> BQ, and only one or two of many columns need to be overridden.\r\n\r\nExample:\r\n\r\n```python\r\ndf = pandas.DataFrame({... lots of columns ..., \"needs_manual_schema\": [...]})\r\njob_config = bigquery.LoadJobConfig(schema=[\r\n bigquery.SchemaField(\"needs_manual_schema\", \"BOOLEAN\"),\r\n])\r\nclient.load_table_from_dataframe(\r\n df, \"my_dataset.my_table\", job_config=job_config,\r\n)\r\n# All columns from df are uploaded, but only df[\"needs_manual_schema\"] is\r\n# coerced into a specific type (BOOLEAN).\r\n```\r\n","author":{"url":"https://github.com/tswast","@type":"Person","name":"tswast"},"datePublished":"2019-05-24T17:58:14Z","url":"https://github.com/googleapis/google-cloud-python/issues/8140"}
| 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:f8957c52-251c-7ab2-4698-fd45200d1045 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D50:1E69A9:46EDE:63846:6AFE120A |
| html-safe-nonce | c74443d80fbc97154584a9f19b5bc2f8c5c914f2beb691c4219deb95f7c80bc8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDUwOjFFNjlBOTo0NkVERTo2Mzg0Njo2QUZFMTIwQSIsInZpc2l0b3JfaWQiOiI5MTQwMDc0MTI1OTcxMDk4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d8658c0f06bb9df92816921d94cf1840fcbc3ffa826ac62dc817244ad96b0d1e |
| hovercard-subject-tag | issue:448288950 |
| 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/8140/issue_layout |
| twitter:image | https://opengraph.githubassets.com/820a5f98c1563dfb91af49f4f852409697acd933d8e74c5661e08d7903df9390/googleapis/google-cloud-python/issues/8140 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/820a5f98c1563dfb91af49f4f852409697acd933d8e74c5661e08d7903df9390/googleapis/google-cloud-python/issues/8140 |
| og:image:alt | As discussed in #8105 (comment) and implemented in pandas-gbq at googleapis/python-bigquery-pandas#218, often times the default schema detection works well enough for pandas -> BQ, and only one or ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tswast |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cd8a1d79ccbf9aecac62781f79072482a49047fb982b8c9e2ad4aca8bf6a9af |
| 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 | 05539640a34afe6142a519483d78ddd766a1304a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width