Implement unenforced constraints on CreateTable DDL statement #901
Labels
api: bigquery
Issues related to the googleapis/python-bigquery-sqlalchemy API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
According to your (Google) own words, defining unenforced primary keys can make a difference. Having the SQLAlchemy DDL constructs implementation now emit the necessary statements would be really neat.
By this I mean for a python statement like:
Have the following statement emitted:
Instead of the following actual one:
Would make things much nicer.
Similarly, for explicit constraint (example from you blog post), if:
Would produce the following SQL statement:
I'd reckon that, to not change the existing behavior unexpectedly for the users, it could be necessary to add a feature toggle. So that one can electivelly enable the feature or not.
E.g. a dialect keyword maybe?
Only if
bigquery_emitconstraints
is set to true, are the constraints part of the SQL statement.The text was updated successfully, but these errors were encountered: