-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add properties for new job statistics #3721
Add properties for new job statistics #3721
Conversation
Eases construction of a client with a new project, but the same credentials / http implementation.
I'm going to defer to @tswast for this. |
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.
Thanks! A couple suggestions.
See: | ||
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.queryPlan | ||
|
||
:rtype: list of dict |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -1277,6 +1297,170 @@ def from_api_repr(cls, resource, client): | |||
job._set_properties(resource) | |||
return job | |||
|
|||
@property | |||
def query_plan(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -83,6 +83,17 @@ def __init__(self, project=None, credentials=None, _http=None): | |||
project=project, credentials=credentials, _http=_http) | |||
self._connection = Connection(self) | |||
|
|||
def _clone(self, project): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
t_project = table['projectId'] | ||
t_client = clients_by_project.get(t_project) | ||
if t_client is None: | ||
t_client = client._clone(t_project) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -1390,6 +1390,20 @@ def referenced_tables(self): | |||
|
|||
return tables | |||
|
|||
@property | |||
def num_dml_affected_rows(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
See: | ||
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.schema | ||
|
||
:rtype: list of :class:`~google.cloud.bigquery.schema.SchemaField |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
See: | ||
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.undeclaredQueryParamters | ||
|
||
:rtype: list of dict |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
:returns: a new instance, bound to the supplied project, using | ||
the same credentials / http object as this instance. | ||
""" | ||
return self.__class__(project, self._credentials, self._http) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@tswast I'm going to break this up into separate PRs, targeting the |
Closes #3706.
Note for reviewers: commit-by-commit might be an easier path.