- Notifications
You must be signed in to change notification settings - Fork321
Closed
Description
AFAICT, it does not seem possible to create a table with the Python library, astable_constraints is inexplicably unsettable. (You can't, AFAICT, create PK/FK constraints via the Console,either, so I am beginning to wonder how onedoes make use of this feature.)
Environment details
- OS type and version: macOS 14.5
- Python version:
python --version:Python 3.12.3 - pip version:
pip --versionpip 24.0 from /usr/local/lib/python3.12/site-packages/pip (python 3.12) google-cloud-bigqueryversion:pip show google-cloud-bigqueryName: google-cloud-bigqueryVersion: 3.25.0Summary: Google BigQuery API client libraryHome-page: https://github.com/googleapis/python-bigqueryAuthor: Google LLCAuthor-email: googleapis-packages@google.comLicense: Apache 2.0Location: <snip>Requires: google-api-core, google-auth, google-cloud-core, google-resumable-media, packaging, python-dateutil, requestsRequired-by:
Steps to reproduce
- Attempt to create a table w/ a primary key or FK
- Run into trouble.
Code example
Wherea_bq_table is aTable, andconstraints is aTableConstraints
In [72]:a_bq_table.table_constraints=constraints---------------------------------------------------------------------------AttributeErrorTraceback (mostrecentcalllast)CellIn[72],line1---->1a_bq_table.table_constraints=constraintsAttributeError:property'table_constraints'of'Table'objecthasnosetter
Stack trace
N/A