镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions google/cloud/bigquery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ def get_service_account_email(
before using ``retry``.

Returns:
str: service account email address
str:
service account email address

Example:

Expand Down Expand Up @@ -1932,7 +1933,8 @@ def job_from_resource(
resource (Dict): one job resource from API response

Returns:
The job instance, constructed via the resource.
Union[job.CopyJob, job.ExtractJob, job.LoadJob, job.QueryJob, job.UnknownJob]:
The job instance, constructed via the resource.
"""
config = resource.get("configuration", {})
if "load" in config:
Expand Down Expand Up @@ -2064,7 +2066,8 @@ def get_job(
before using ``retry``.

Returns:
Job instance, based on the resource returned by the API.
Union[job.LoadJob, job.CopyJob, job.ExtractJob, job.QueryJob, job.UnknownJob]:
Job instance, based on the resource returned by the API.
"""
extra_params = {"projection": "full"}

Expand Down Expand Up @@ -3954,12 +3957,13 @@ def _schema_to_json_file_object(self, schema_list, file_obj):
"""
json.dump(schema_list, file_obj, indent=2, sort_keys=True)

def schema_from_json(self, file_or_path: "PathType"):
def schema_from_json(self, file_or_path: "PathType") -> List[SchemaField]:
"""Takes a file object or file path that contains json that describes
a table schema.

Returns:
List of schema field objects.
List[SchemaField]:
List of :class:`~google.cloud.bigquery.schema.SchemaField` objects.
"""
if isinstance(file_or_path, io.IOBase):
return self._schema_from_json_file_object(file_or_path)
Expand Down