Add support for default_value_expression in SchemaField #1398
Labels
api: bigquery
Issues related to the googleapis/python-bigquery API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is your feature request related to a problem? Please describe.
I'm developing a wrapper library to use
pydantic.BaseModel
as means to define theTableSchema
. As part of this wrapper, I would like to provide "server default" values, such asCURRENT_DATETIME
,CURRENT_TIMESTAMP
, so on, todatetime.datetime
fields;Describe the solution you'd like
The field
"defaultValueExpression"
is a valid REST API field and would be a direct mapping from the initializer argumentdefault_value_expression
to the API"defaultValueExpression"
field.Describe alternatives you've considered
The alternative to this, would be construct a DDL statement for creating tables which columns can have default values via
DEFAULT
keywordWhich is very cumbersome and ugly, and useless, since the REST API already provides a field for default value expressions.
The text was updated successfully, but these errors were encountered: