|
14 | 14 |
|
15 | 15 | """Classes for load jobs."""
|
16 | 16 |
|
17 |
| -from typing import FrozenSet, Iterable, Optional |
| 17 | +from typing import FrozenSet, List, Iterable, Optional |
18 | 18 |
|
19 | 19 | from google.cloud.bigquery.encryption_configuration import EncryptionConfiguration
|
20 | 20 | from google.cloud.bigquery.external_config import HivePartitioningOptions
|
|
25 | 25 | from google.cloud.bigquery.table import RangePartitioning
|
26 | 26 | from google.cloud.bigquery.table import TableReference
|
27 | 27 | from google.cloud.bigquery.table import TimePartitioning
|
28 |
| - |
29 | 28 | from google.cloud.bigquery.job.base import _AsyncJob
|
30 | 29 | from google.cloud.bigquery.job.base import _JobConfig
|
31 | 30 | from google.cloud.bigquery.job.base import _JobReference
|
@@ -300,6 +299,27 @@ def null_marker(self):
|
300 | 299 | def null_marker(self, value):
|
301 | 300 | self._set_sub_prop("nullMarker", value)
|
302 | 301 |
|
| 302 | + @property |
| 303 | + def projection_fields(self) -> Optional[List[str]]: |
| 304 | + """Optional[List[str]]: If |
| 305 | + :attr:`google.cloud.bigquery.job.LoadJobConfig.source_format` is set to |
| 306 | + "DATASTORE_BACKUP", indicates which entity properties to load into |
| 307 | + BigQuery from a Cloud Datastore backup. |
| 308 | +
|
| 309 | + Property names are case sensitive and must be top-level properties. If |
| 310 | + no properties are specified, BigQuery loads all properties. If any |
| 311 | + named property isn't found in the Cloud Datastore backup, an invalid |
| 312 | + error is returned in the job result. |
| 313 | +
|
| 314 | + See: |
| 315 | + https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationLoad.FIELDS.projection_fields |
| 316 | + """ |
| 317 | + return self._get_sub_prop("projectionFields") |
| 318 | + |
| 319 | + @projection_fields.setter |
| 320 | + def projection_fields(self, value: Optional[List[str]]): |
| 321 | + self._set_sub_prop("projectionFields", value) |
| 322 | + |
303 | 323 | @property
|
304 | 324 | def quote_character(self):
|
305 | 325 | """Optional[str]: Character used to quote data sections (CSV only).
|
|
0 commit comments