@@ -1184,6 +1184,19 @@ def update_dataset(
1184
1184
must be provided. If a field is listed in ``fields`` and is ``None`` in
1185
1185
``dataset``, it will be deleted.
1186
1186
1187
+ For example, to update the default expiration times, specify
1188
+ both properties in the ``fields`` argument:
1189
+
1190
+ .. code-block:: python
1191
+
1192
+ bigquery_client.update_dataset(
1193
+ dataset,
1194
+ [
1195
+ "default_partition_expiration_ms",
1196
+ "default_table_expiration_ms",
1197
+ ]
1198
+ )
1199
+
1187
1200
If ``dataset.etag`` is not ``None``, the update will only
1188
1201
succeed if the dataset on the server has the same ETag. Thus
1189
1202
reading a dataset with ``get_dataset``, changing its fields,
@@ -1198,19 +1211,6 @@ def update_dataset(
1198
1211
The properties of ``dataset`` to change. These are strings
1199
1212
corresponding to the properties of
1200
1213
:class:`~google.cloud.bigquery.dataset.Dataset`.
1201
-
1202
- For example, to update the default expiration times, specify
1203
- both properties in the ``fields`` argument:
1204
-
1205
- .. code-block:: python
1206
-
1207
- bigquery_client.update_dataset(
1208
- dataset,
1209
- [
1210
- "default_partition_expiration_ms",
1211
- "default_table_expiration_ms",
1212
- ]
1213
- )
1214
1214
retry (Optional[google.api_core.retry.Retry]):
1215
1215
How to retry the RPC.
1216
1216
timeout (Optional[float]):
@@ -1254,6 +1254,15 @@ def update_model(
1254
1254
must be provided. If a field is listed in ``fields`` and is ``None``
1255
1255
in ``model``, the field value will be deleted.
1256
1256
1257
+ For example, to update the descriptive properties of the model,
1258
+ specify them in the ``fields`` argument:
1259
+
1260
+ .. code-block:: python
1261
+
1262
+ bigquery_client.update_model(
1263
+ model, ["description", "friendly_name"]
1264
+ )
1265
+
1257
1266
If ``model.etag`` is not ``None``, the update will only succeed if
1258
1267
the model on the server has the same ETag. Thus reading a model with
1259
1268
``get_model``, changing its fields, and then passing it to
@@ -1266,15 +1275,6 @@ def update_model(
1266
1275
The properties of ``model`` to change. These are strings
1267
1276
corresponding to the properties of
1268
1277
:class:`~google.cloud.bigquery.model.Model`.
1269
-
1270
- For example, to update the descriptive properties of the model,
1271
- specify them in the ``fields`` argument:
1272
-
1273
- .. code-block:: python
1274
-
1275
- bigquery_client.update_model(
1276
- model, ["description", "friendly_name"]
1277
- )
1278
1278
retry (Optional[google.api_core.retry.Retry]):
1279
1279
A description of how to retry the API call.
1280
1280
timeout (Optional[float]):
@@ -1318,6 +1318,15 @@ def update_routine(
1318
1318
must be provided. If a field is listed in ``fields`` and is ``None``
1319
1319
in ``routine``, the field value will be deleted.
1320
1320
1321
+ For example, to update the description property of the routine,
1322
+ specify it in the ``fields`` argument:
1323
+
1324
+ .. code-block:: python
1325
+
1326
+ bigquery_client.update_routine(
1327
+ routine, ["description"]
1328
+ )
1329
+
1321
1330
.. warning::
1322
1331
During beta, partial updates are not supported. You must provide
1323
1332
all fields in the resource.
@@ -1336,15 +1345,6 @@ def update_routine(
1336
1345
fields (Sequence[str]):
1337
1346
The fields of ``routine`` to change, spelled as the
1338
1347
:class:`~google.cloud.bigquery.routine.Routine` properties.
1339
-
1340
- For example, to update the description property of the routine,
1341
- specify it in the ``fields`` argument:
1342
-
1343
- .. code-block:: python
1344
-
1345
- bigquery_client.update_routine(
1346
- routine, ["description"]
1347
- )
1348
1348
retry (Optional[google.api_core.retry.Retry]):
1349
1349
A description of how to retry the API call.
1350
1350
timeout (Optional[float]):
@@ -1392,6 +1392,16 @@ def update_table(
1392
1392
must be provided. If a field is listed in ``fields`` and is ``None``
1393
1393
in ``table``, the field value will be deleted.
1394
1394
1395
+ For example, to update the descriptive properties of the table,
1396
+ specify them in the ``fields`` argument:
1397
+
1398
+ .. code-block:: python
1399
+
1400
+ bigquery_client.update_table(
1401
+ table,
1402
+ ["description", "friendly_name"]
1403
+ )
1404
+
1395
1405
If ``table.etag`` is not ``None``, the update will only succeed if
1396
1406
the table on the server has the same ETag. Thus reading a table with
1397
1407
``get_table``, changing its fields, and then passing it to
@@ -1403,16 +1413,6 @@ def update_table(
1403
1413
fields (Sequence[str]):
1404
1414
The fields of ``table`` to change, spelled as the
1405
1415
:class:`~google.cloud.bigquery.table.Table` properties.
1406
-
1407
- For example, to update the descriptive properties of the table,
1408
- specify them in the ``fields`` argument:
1409
-
1410
- .. code-block:: python
1411
-
1412
- bigquery_client.update_table(
1413
- table,
1414
- ["description", "friendly_name"]
1415
- )
1416
1416
retry (Optional[google.api_core.retry.Retry]):
1417
1417
A description of how to retry the API call.
1418
1418
timeout (Optional[float]):
0 commit comments