GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `table_constraints` has no setter? · Issue #1990 · googleapis/python-bigquery

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

table_constraints has no setter? #1990

Copy link
Copy link
Closed
#2092
Closed
table_constraints has no setter?#1990
#2092
Copy link
Assignees
GaoleMeng
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.

Description

@roy-work
roy-work
opened on Aug 9, 2024
Issue body actions

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.)

Environment details

  • OS type and version: macOS 14.5
  • Python version: python --version: Python 3.12.3
  • pip version: pip --version
    pip 24.0 from /usr/local/lib/python3.12/site-packages/pip (python 3.12)
    
  • google-cloud-bigquery version: pip show google-cloud-bigquery
    Name: google-cloud-bigquery
    Version: 3.25.0
    Summary: Google BigQuery API client library
    Home-page: https://github.com/googleapis/python-bigquery
    Author: Google LLC
    Author-email: [email protected]
    License: Apache 2.0
    Location: <snip>
    Requires: google-api-core, google-auth, google-cloud-core, google-resumable-media, packaging, python-dateutil, requests
    Required-by:
    

Steps to reproduce

  1. Attempt to create a table w/ a primary key or FK
  2. Run into trouble.

Code example

Where a_bq_table is a Table, and constraints is a TableConstraints

In [72]: a_bq_table.table_constraints = constraints
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[72], line 1
----> 1 a_bq_table.table_constraints = constraints

AttributeError: property 'table_constraints' of 'Table' object has no setter

Stack trace

N/A

Reacted by Lkhagvadorj Sukhtsoodol

Activity

  1. product-auto-label
    added
    api: bigqueryIssues related to the googleapis/python-bigquery API.
    on Aug 9, 2024
  2. blunderbuss-gcf
    assigned
    GaoleMeng
    on Aug 9, 2024
  3. lkhagvadorj-amp
    added a commit that references this issue on Dec 20, 2024

    fix: adding property setter for table constraints, googleapis#1990

    fd5fbd0
  4. lkhagvadorj-amp
    added 2 commits that reference this issue on Feb 21, 2025

    fix: adding property setter for table constraints, googleapis#1990

    899382c

    fix: adding property setter for table constraints, googleapis#1990

    142f541
  5. Linchin
    added a commit that references this issue on Mar 4, 2025

    fix: adding property setter for table constraints, #1990 (#2092)

    f8572dd
  6. Linchin
    closed this as completedin #2092on Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @GaoleMeng
    GaoleMeng

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.