Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add default value expression to SchemaField#1408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@aribray
Copy link
Contributor

@aribrayaribray commentedNov 14, 2022
edited
Loading

Addsdefault_value_expression to SchemaField.

        default_value_expression: str, Optional            Used to specify the default value of a field using a SQL expression. It can only be set for            top level fields (columns).            You can use a struct or array expression to specify default value for the entire struct or            array. The valid SQL expressions are:            - Literals for all data types, including STRUCT and ARRAY.            - The following functions:                `CURRENT_TIMESTAMP`                `CURRENT_TIME`                `CURRENT_DATE`                `CURRENT_DATETIME`                `GENERATE_UUID`                `RAND`                `SESSION_USER`                `ST_GEOPOINT`            - Struct or array composed with the above allowed functions, for example:                "[CURRENT_DATE(), DATE '2020-01-01'"]

Googlers see 241007941

@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. api: bigqueryIssues related to the googleapis/python-bigquery API. labelsNov 14, 2022
@aribrayaribray marked this pull request as ready for reviewNovember 15, 2022 01:25
@aribrayaribray requested a review froma teamNovember 15, 2022 01:25
@aribrayaribray requested a review froma team as acode ownerNovember 15, 2022 01:25
@aribrayaribray merged commit207aa50 intogoogleapis:mainNov 15, 2022
@aribrayaribray deleted the aribray--default-value-expression branchNovember 15, 2022 20:57
@aribrayaribray changed the titlefeat: add default value expressionfeat: add default value expression to SchemaFieldNov 15, 2022
FurcyPin added a commit to FurcyPin/bigquery-frame that referenced this pull requestDec 3, 2022
Following this change:googleapis/python-bigquery#1408the SchemaField __init__ and __repr__ method have evolved.This broke some tests.
FurcyPin added a commit to FurcyPin/bigquery-frame that referenced this pull requestDec 24, 2022
Following this change:googleapis/python-bigquery#1408the SchemaField __init__ and __repr__ method have evolved.This broke some tests.
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull requestApr 17, 2023
* feat: Adds default_value_expression to SchemaField
name:str,
field_type:str,
mode:str="NULLABLE",
default_value_expression:str=None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

FYI:@shollyman , this was a breaking change. Python allows for this to be both positional and keyword argument unless you use*, syntax added to Python 3.0https://peps.python.org/pep-3102/

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tswasttswasttswast left review comments

@shollymanshollymanshollyman approved these changes

Assignees

No one assigned

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: mPull request size is medium.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@aribray@tswast@shollyman

[8]ページ先頭

©2009-2025 Movatter.jp