Title: `table_constraints` has no setter? · Issue #1990 · googleapis/python-bigquery · GitHub
Open Graph Title: `table_constraints` has no setter? · Issue #1990 · googleapis/python-bigquery
X Title: `table_constraints` has no setter? · Issue #1990 · googleapis/python-bigquery
Description: AFAICT, it does not seem possible to create a table with the Python library, as table_constraints is inexplicably unsettable. (You can't, AFAICT, create PK/FK constraints via the Console, either, so I am beginning to wonder how one does ...
Open Graph Description: AFAICT, it does not seem possible to create a table with the Python library, as table_constraints is inexplicably unsettable. (You can't, AFAICT, create PK/FK constraints via the Console, either, s...
X Description: AFAICT, it does not seem possible to create a table with the Python library, as table_constraints is inexplicably unsettable. (You can't, AFAICT, create PK/FK constraints via the Console, eithe...
Opengraph URL: https://github.com/googleapis/python-bigquery/issues/1990
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`table_constraints` has no setter?","articleBody":"AFAICT, it does not seem possible to create a table with the Python library, as `table_constraints` is inexplicably unsettable. (You can't, AFAICT, create PK/FK constraints via the Console, _either_, so I am beginning to wonder how one _does_ make use of this feature.)\r\n\r\n#### Environment details\r\n\r\n - OS type and version: macOS 14.5\r\n - Python version: `python --version`: `Python 3.12.3`\r\n - pip version: `pip --version`\r\n ```\r\n pip 24.0 from /usr/local/lib/python3.12/site-packages/pip (python 3.12)\r\n ```\r\n - `google-cloud-bigquery` version: `pip show google-cloud-bigquery`\r\n ```\r\n Name: google-cloud-bigquery\r\n Version: 3.25.0\r\n Summary: Google BigQuery API client library\r\n Home-page: https://github.com/googleapis/python-bigquery\r\n Author: Google LLC\r\n Author-email: googleapis-packages@google.com\r\n License: Apache 2.0\r\n Location: \u003csnip\u003e\r\n Requires: google-api-core, google-auth, google-cloud-core, google-resumable-media, packaging, python-dateutil, requests\r\n Required-by:\r\n ```\r\n\r\n#### Steps to reproduce\r\n\r\n 1. Attempt to create a table w/ a primary key or FK\r\n 2. Run into trouble.\r\n\r\n#### Code example\r\n\r\nWhere `a_bq_table` is a `Table`, and `constraints` is a [`TableConstraints`](https://cloud.google.com/python/docs/reference/bigquery/latest/google.cloud.bigquery.table.TableConstraints)\r\n```python\r\nIn [72]: a_bq_table.table_constraints = constraints\r\n---------------------------------------------------------------------------\r\nAttributeError Traceback (most recent call last)\r\nCell In[72], line 1\r\n----\u003e 1 a_bq_table.table_constraints = constraints\r\n\r\nAttributeError: property 'table_constraints' of 'Table' object has no setter\r\n```\r\n\r\n#### Stack trace\r\nN/A","author":{"url":"https://github.com/roy-work","@type":"Person","name":"roy-work"},"datePublished":"2024-08-09T22:04:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1990/python-bigquery/issues/1990"}
| 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:a5933bd8-7a9e-6da5-2b9b-42a2c12238d6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE52:1EA4:4DC598F:6D01E88:6A502ED6 |
| html-safe-nonce | ad6ca3c9d5653a13cfa65eef01a447dc63bfa5c797664d09454ea124b1012f1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTUyOjFFQTQ6NERDNTk4Rjo2RDAxRTg4OjZBNTAyRUQ2IiwidmlzaXRvcl9pZCI6Ijg1MjI3Mzk5NzUzMzk0OTY1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6563a264c242e6704642e92814878a6abc1833d11f0c17870ad871b0611c9ce4 |
| hovercard-subject-tag | issue:2458718742 |
| 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/1990/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ee4244cac08a29c6f8cc3d0d95616ee0a63878ef1e93f9aafd4dabbb2331f1ae/googleapis/python-bigquery/issues/1990 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ee4244cac08a29c6f8cc3d0d95616ee0a63878ef1e93f9aafd4dabbb2331f1ae/googleapis/python-bigquery/issues/1990 |
| og:image:alt | AFAICT, it does not seem possible to create a table with the Python library, as table_constraints is inexplicably unsettable. (You can't, AFAICT, create PK/FK constraints via the Console, either, s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | roy-work |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width