Skip to content
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

docs: document ScriptStatistics and other missing resource classes #1023

Merged
merged 2 commits into from Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/job_base.rst
@@ -0,0 +1,5 @@
Common Job Resource Classes
===========================

.. automodule:: google.cloud.bigquery.job.base
:members:
5 changes: 5 additions & 0 deletions docs/query.rst
@@ -0,0 +1,5 @@
Query Resource Classes
======================

.. automodule:: google.cloud.bigquery.query
:members:
17 changes: 8 additions & 9 deletions docs/reference.rst
Expand Up @@ -47,7 +47,6 @@ Job Classes
job.CopyJob
job.LoadJob
job.ExtractJob
job.UnknownJob

Job-Related Types
-----------------
Expand All @@ -68,7 +67,11 @@ Job-Related Types
job.SourceFormat
job.WriteDisposition
job.SchemaUpdateOption
job.TransactionInfo

.. toctree::
:maxdepth: 2

job_base


Dataset
Expand Down Expand Up @@ -134,14 +137,10 @@ Schema
Query
=====

.. autosummary::
:toctree: generated
.. toctree::
:maxdepth: 2

query.ArrayQueryParameter
query.ScalarQueryParameter
query.ScalarQueryParameterType
query.StructQueryParameter
query.UDFResource
query


Retries
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/bigquery/job/base.py
Expand Up @@ -19,7 +19,7 @@
import http
import threading
import typing
from typing import Dict, Optional
from typing import Dict, Optional, Sequence

from google.api_core import exceptions
import google.api_core.future.polling
Expand Down Expand Up @@ -193,7 +193,8 @@ def parent_job_id(self):
return _helpers._get_sub_prop(self._properties, ["statistics", "parentJobId"])

@property
def script_statistics(self):
def script_statistics(self) -> Optional["ScriptStatistics"]:
"""Statistics for a child job of a script."""
resource = _helpers._get_sub_prop(
self._properties, ["statistics", "scriptStatistics"]
)
Expand Down Expand Up @@ -968,9 +969,8 @@ def __init__(self, resource):
self._properties = resource

@property
def stack_frames(self):
"""List[ScriptStackFrame]: Stack trace where the current evaluation
happened.
def stack_frames(self) -> Sequence[ScriptStackFrame]:
"""Stack trace where the current evaluation happened.

Shows line/column/procedure name of each frame on the stack at the
point where the current evaluation happened.
Expand All @@ -982,7 +982,7 @@ def stack_frames(self):
]

@property
def evaluation_kind(self):
def evaluation_kind(self) -> Optional[str]:
"""str: Indicates the type of child job.

Possible values include ``STATEMENT`` and ``EXPRESSION``.
Expand Down