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

feat: add LoadJobConfig.projection_fields to select DATASTORE_BACKUP fields #736

Merged
merged 5 commits into from
Jul 15, 2021
Merged
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions google/cloud/bigquery/job/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

"""Classes for load jobs."""

from typing import Optional, List

from google.cloud.bigquery.encryption_configuration import EncryptionConfiguration
from google.cloud.bigquery.external_config import HivePartitioningOptions
from google.cloud.bigquery.format_options import ParquetOptions
Expand All @@ -23,7 +25,6 @@
from google.cloud.bigquery.table import RangePartitioning
from google.cloud.bigquery.table import TableReference
from google.cloud.bigquery.table import TimePartitioning

from google.cloud.bigquery.job.base import _AsyncJob
from google.cloud.bigquery.job.base import _JobConfig
from google.cloud.bigquery.job.base import _JobReference
Expand Down Expand Up @@ -278,7 +279,7 @@ def null_marker(self, value):
self._set_sub_prop("nullMarker", value)

@property
def projection_fields(self):
def projection_fields(self) -> Optional[List[str]]:
tswast marked this conversation as resolved.
Show resolved Hide resolved
"""Optional[List[str]]: If
:attr:`google.cloud.bigquery.job.LoadJobConfig.source_format` is set to
"DATASTORE_BACKUP", indicates which entity properties to load into
Expand Down