GeezerVison is showing github.com — feat: add session and connection properties to QueryJobConfig by tswast · Pull Request #1024 · googleapis/python-bigquery
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Conversation
tswast
commented
Oct 15, 2021
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 a bug/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 internal issue 202792922 🦕
Closes #1026
Closes #1029
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know the exact acceptance criteria for this addition, but at a face value it more or less looks good to me. Had just a few nit comments about type annotations and docstrings.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a question about exposing SessionInfo in the generated docs.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
return self._properties.get("evaluationKind")
|
|
|
|
|
|
|
|
|
class SessionInfo(object):
|
plamut
Oct 26, 2021
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) Explicitly inheriting from object is not needed.
Also, shouldn't we expose this class in the top level namespace? And both new classes in the reference docs?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to docs via job_base.rst and query.rst. I noticed in #1023 that we'd missed a few classes, so I migrated some docs back to automodule. Even though I don't think it's the best UX to have so many classes in one page, I'd rather we not forget in the future.


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
#1029 is not that much different, the differences are the following:
- No
SessionInfo class, session_id is exposed directly on the QueryJob instance (similarly to query stats, e.g. estimated_bytes_processed).
- Accepting
None as a valid value, the new properties has mostly been marked as Optional[...]
- Contains a fix for the
script_options's docstring.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
No SessionInfo class, session_id is exposed directly on the QueryJob instance (similarly to query stats, e.g. estimated_bytes_processed).
That makes sense, but I'd rather stick with a close mapping to the actual REST API. I suspect it's a class because they might want to add a lot more session-related stats in the future.
Accepting None as a valid value, the new properties has mostly been marked as Optional[...]
The docs at https://cloud.google.com/bigquery/docs/reference/rest/v2/ConnectionProperty don't appear to indicate that key/value are optional. I'm not sure how useful a connection property will be without a key/value. Certainly the two existing ones require something for both.
Contains a fix for the script_options's docstring.
Good catch. Done!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
abdelmegahedgoogle
pushed a commit
to abdelmegahedgoogle/python-bigquery
that referenced
this pull request
Apr 17, 2023
…apis#1024)
* feat: add session and connection properties to QueryJobConfig
* add unit tests
* adjust types and add versionadded
* add missing url
* link to ConnectionProperty docs
* add resource classes to root module
Reviewers
1 more reviewer
plamut
plamut approved these changes
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
api: bigquery
Issues related to the googleapis/python-bigquery API.
cla: yes
This human has signed the Contributor License Agreement.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Add session support
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|