You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon scrutinizing the schema reflection for Big Query, I am able to discern the dataset lists and glean information about the columns to a certain extent. Although it's not a mandatory requirement, I have the capability to establish primary and foreign keys on tables. However, when I attempt to retrieve this information using an inspector, the following code doesn't yield the expected results:
Given this situation, I am wondering if there's an alternative method to extract this data without having to resort to SQL Queries on INFORMATION_SCHEMA?
Clearly these methods get_pk_constraint() and get_foreign_keys()aren't implemented in bigquery-sqlalchemy (even though it is possible now to define foreign & primary key constraints in BQ). Just wondering @arkeodev if you have any further insights/workarounds to obtain these constraints?
Activity
richard-sparq commentedon Jul 14, 2023
Clearly these methods
get_pk_constraint()andget_foreign_keys()aren't implemented in bigquery-sqlalchemy (even though it is possible now to define foreign & primary key constraints in BQ). Just wondering @arkeodev if you have any further insights/workarounds to obtain these constraints?bush-david commentedon Aug 1, 2023
Will there eventually be support for unenforced BQ primary and foreign key constrains in bigquery-sqlalchemy?
chalmerlowe commentedon Mar 2, 2026
This issue was moved from the following repo as part of the monorepo migration: googleapis/python-bigquery-sqlalchemy
daniel-sanche commentedon May 28, 2026
This issue is being bulk closed due to inactivity. Please re-open if you think this still requires attention, and we'll take another look. Thanks!