|
27 | 27 | fromgoogle.cloud.bigquery.datasetimportDataset |
28 | 28 | fromgoogle.cloud.bigquery.datasetimportDatasetListItem |
29 | 29 | fromgoogle.cloud.bigquery.datasetimportDatasetReference |
| 30 | +fromgoogle.cloud.bigquery.encryption_configurationimportEncryptionConfiguration |
30 | 31 | fromgoogle.cloud.bigquery.external_configimportExternalConfig |
| 32 | +fromgoogle.cloud.bigqueryimport_helpers |
31 | 33 | fromgoogle.cloud.bigquery.queryimport_query_param_from_api_repr |
32 | 34 | fromgoogle.cloud.bigquery.queryimportArrayQueryParameter |
33 | 35 | fromgoogle.cloud.bigquery.queryimportScalarQueryParameter |
|
37 | 39 | fromgoogle.cloud.bigquery.routineimportRoutineReference |
38 | 40 | fromgoogle.cloud.bigquery.schemaimportSchemaField |
39 | 41 | fromgoogle.cloud.bigquery.tableimport_EmptyRowIterator |
| 42 | +fromgoogle.cloud.bigquery.tableimportRangePartitioning |
40 | 43 | fromgoogle.cloud.bigquery.tableimport_table_arg_to_table_ref |
41 | 44 | fromgoogle.cloud.bigquery.tableimportTableReference |
42 | 45 | fromgoogle.cloud.bigquery.tableimportTable |
43 | 46 | fromgoogle.cloud.bigquery.tableimportTimePartitioning |
44 | | -fromgoogle.cloud.bigqueryimport_helpers |
45 | | -fromgoogle.cloud.bigquery.encryption_configurationimportEncryptionConfiguration |
46 | 47 |
|
47 | 48 | _DONE_STATE="DONE" |
48 | 49 | _STOPPED_REASON="stopped" |
@@ -1180,6 +1181,40 @@ def quote_character(self): |
1180 | 1181 | defquote_character(self,value): |
1181 | 1182 | self._set_sub_prop("quote",value) |
1182 | 1183 |
|
| 1184 | +@property |
| 1185 | +defrange_partitioning(self): |
| 1186 | +"""Optional[google.cloud.bigquery.table.RangePartitioning]: |
| 1187 | + Configures range-based partitioning for destination table. |
| 1188 | +
|
| 1189 | + .. note:: |
| 1190 | + **Beta**. The integer range partitioning feature is in a |
| 1191 | + pre-release state and might change or have limited support. |
| 1192 | +
|
| 1193 | + Only specify at most one of |
| 1194 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.time_partitioning` or |
| 1195 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.range_partitioning`. |
| 1196 | +
|
| 1197 | + Raises: |
| 1198 | + ValueError: |
| 1199 | + If the value is not |
| 1200 | + :class:`~google.cloud.bigquery.table.RangePartitioning` or |
| 1201 | + :data:`None`. |
| 1202 | + """ |
| 1203 | +resource=self._get_sub_prop("rangePartitioning") |
| 1204 | +ifresourceisnotNone: |
| 1205 | +returnRangePartitioning(_properties=resource) |
| 1206 | + |
| 1207 | +@range_partitioning.setter |
| 1208 | +defrange_partitioning(self,value): |
| 1209 | +resource=value |
| 1210 | +ifisinstance(value,RangePartitioning): |
| 1211 | +resource=value._properties |
| 1212 | +elifvalueisnotNone: |
| 1213 | +raiseValueError( |
| 1214 | +"Expected value to be RangePartitioning or None, got {}.".format(value) |
| 1215 | + ) |
| 1216 | +self._set_sub_prop("rangePartitioning",resource) |
| 1217 | + |
1183 | 1218 | @property |
1184 | 1219 | defschema(self): |
1185 | 1220 | """List[google.cloud.bigquery.schema.SchemaField]: Schema of the |
@@ -1249,6 +1284,10 @@ def source_format(self, value): |
1249 | 1284 | deftime_partitioning(self): |
1250 | 1285 | """google.cloud.bigquery.table.TimePartitioning: Specifies time-based |
1251 | 1286 | partitioning for the destination table. |
| 1287 | +
|
| 1288 | + Only specify at most one of |
| 1289 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.time_partitioning` or |
| 1290 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.range_partitioning`. |
1252 | 1291 | """ |
1253 | 1292 | prop=self._get_sub_prop("timePartitioning") |
1254 | 1293 | ifpropisnotNone: |
@@ -1463,6 +1502,13 @@ def destination_table_friendly_name(self): |
1463 | 1502 | """ |
1464 | 1503 | returnself._configuration.destination_table_friendly_name |
1465 | 1504 |
|
| 1505 | +@property |
| 1506 | +defrange_partitioning(self): |
| 1507 | +"""See |
| 1508 | + :attr:`google.cloud.bigquery.job.LoadJobConfig.range_partitioning`. |
| 1509 | + """ |
| 1510 | +returnself._configuration.range_partitioning |
| 1511 | + |
1466 | 1512 | @property |
1467 | 1513 | deftime_partitioning(self): |
1468 | 1514 | """See |
@@ -2242,6 +2288,40 @@ def query_parameters(self): |
2242 | 2288 | defquery_parameters(self,values): |
2243 | 2289 | self._set_sub_prop("queryParameters",_to_api_repr_query_parameters(values)) |
2244 | 2290 |
|
| 2291 | +@property |
| 2292 | +defrange_partitioning(self): |
| 2293 | +"""Optional[google.cloud.bigquery.table.RangePartitioning]: |
| 2294 | + Configures range-based partitioning for destination table. |
| 2295 | +
|
| 2296 | + .. note:: |
| 2297 | + **Beta**. The integer range partitioning feature is in a |
| 2298 | + pre-release state and might change or have limited support. |
| 2299 | +
|
| 2300 | + Only specify at most one of |
| 2301 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.time_partitioning` or |
| 2302 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.range_partitioning`. |
| 2303 | +
|
| 2304 | + Raises: |
| 2305 | + ValueError: |
| 2306 | + If the value is not |
| 2307 | + :class:`~google.cloud.bigquery.table.RangePartitioning` or |
| 2308 | + :data:`None`. |
| 2309 | + """ |
| 2310 | +resource=self._get_sub_prop("rangePartitioning") |
| 2311 | +ifresourceisnotNone: |
| 2312 | +returnRangePartitioning(_properties=resource) |
| 2313 | + |
| 2314 | +@range_partitioning.setter |
| 2315 | +defrange_partitioning(self,value): |
| 2316 | +resource=value |
| 2317 | +ifisinstance(value,RangePartitioning): |
| 2318 | +resource=value._properties |
| 2319 | +elifvalueisnotNone: |
| 2320 | +raiseValueError( |
| 2321 | +"Expected value to be RangePartitioning or None, got {}.".format(value) |
| 2322 | + ) |
| 2323 | +self._set_sub_prop("rangePartitioning",resource) |
| 2324 | + |
2245 | 2325 | @property |
2246 | 2326 | defudf_resources(self): |
2247 | 2327 | """List[google.cloud.bigquery.query.UDFResource]: user |
@@ -2318,8 +2398,18 @@ def table_definitions(self, values): |
2318 | 2398 |
|
2319 | 2399 | @property |
2320 | 2400 | deftime_partitioning(self): |
2321 | | -"""google.cloud.bigquery.table.TimePartitioning: Specifies time-based |
2322 | | - partitioning for the destination table. |
| 2401 | +"""Optional[google.cloud.bigquery.table.TimePartitioning]: Specifies |
| 2402 | + time-based partitioning for the destination table. |
| 2403 | +
|
| 2404 | + Only specify at most one of |
| 2405 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.time_partitioning` or |
| 2406 | + :attr:`~google.cloud.bigquery.job.LoadJobConfig.range_partitioning`. |
| 2407 | +
|
| 2408 | + Raises: |
| 2409 | + ValueError: |
| 2410 | + If the value is not |
| 2411 | + :class:`~google.cloud.bigquery.table.TimePartitioning` or |
| 2412 | + :data:`None`. |
2323 | 2413 | """ |
2324 | 2414 | prop=self._get_sub_prop("timePartitioning") |
2325 | 2415 | ifpropisnotNone: |
@@ -2552,6 +2642,13 @@ def maximum_bytes_billed(self): |
2552 | 2642 | """ |
2553 | 2643 | returnself._configuration.maximum_bytes_billed |
2554 | 2644 |
|
| 2645 | +@property |
| 2646 | +defrange_partitioning(self): |
| 2647 | +"""See |
| 2648 | + :attr:`google.cloud.bigquery.job.QueryJobConfig.range_partitioning`. |
| 2649 | + """ |
| 2650 | +returnself._configuration.range_partitioning |
| 2651 | + |
2555 | 2652 | @property |
2556 | 2653 | deftable_definitions(self): |
2557 | 2654 | """See |
|