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

fix:query_and_wait now retains unknown query configuration_properties#1793

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
tswast merged 4 commits intomainfromissue1792-query_and_wait-invalid-job_config
Jan 23, 2024

Conversation

@tswast
Copy link
Contributor

@tswasttswast commentedJan 19, 2024
edited
Loading

fix: raiseValueError inquery_and_wait with wrongjob_config type

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as abug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes#1792
🦕

@tswasttswast requested review froma team ascode ownersJanuary 19, 2024 17:20
@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. api: bigqueryIssues related to the googleapis/python-bigquery API. labelsJan 19, 2024
@tswasttswast changed the titlefix:query_and_wait now retains unknown query configuration `_prope…fix:query_and_wait now retains unknown query configuration_propertiesJan 19, 2024
@tswasttswast requested a review fromLinchinJanuary 19, 2024 17:20
@tswasttswastenabled auto-merge (squash)January 19, 2024 20:26
@Linchin
Copy link
Contributor

Could you tell me more about the rationale of keeping unknown config fields?

@tswast
Copy link
ContributorAuthor

Could you tell me more about the rationale of keeping unknown config fields?

Two reasons: (1) as you can see from the removal of this code:

    # These keys are top level in job resource and query resource.    if "labels" in job_config_resource:        request_body["labels"] = job_config_resource["labels"]    if "dryRun" in job_config_resource:        request_body["dryRun"] = job_config_resource["dryRun"]

it allows for a cleaner conversion from query job insert request to jobs.query request.

(2) It allows for customers who want access to features that are in preview an not yet implemented in the client library to set REST API properties via settingQueryJobConfig._properties. This is a very common practice (see:#1398 (comment) for example) and is in fact a requirement for features that are in a "private" release. We don't support adding private features to our public client library, but this_properties feature allows such customers to use the public client library via this workaround.

Linchin reacted with heart emoji

@Linchin
Copy link
Contributor

That's great to know! Thank you

@tswasttswast merged commit4ba4342 intomainJan 23, 2024
@tswasttswast deleted the issue1792-query_and_wait-invalid-job_config branchJanuary 23, 2024 20:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@LinchinLinchinLinchin approved these changes

@Neenu1995Neenu1995Awaiting requested review from Neenu1995Neenu1995 was automatically assigned from googleapis/api-bigquery

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.

bug:query_and_wait drops unknown properties in the QueryJobConfig

3 participants

@tswast@Linchin@kiraksi

[8]ページ先頭

©2009-2025 Movatter.jp