@@ -294,14 +294,65 @@ To add metadata to a table:
294294
295295.. code- block:: python
296296
297- table = Table(' mytable' , ... , bigquery_description = ' my table description' , bigquery_friendly_name = ' my table friendly name' )
297+ table = Table(' mytable' , ... ,
298+ bigquery_description = ' my table description' ,
299+ bigquery_friendly_name = ' my table friendly name' ,
300+ bigquery_default_rounding_mode = " ROUND_HALF_EVEN" ,
301+ bigquery_expiration_timestamp = datetime.datetime.fromisoformat(" 2038-01-01T00:00:00+00:00" ),
302+ )
298303
299304To add metadata to a column:
300305
301306.. code- block:: python
302307
303308 Column(' mycolumn' , doc = ' my column description' )
304309
310+ To create a clustered table:
311+
312+ .. code- block:: python
313+
314+ table = Table(' mytable' , ... , bigquery_clustering_fields = [" a" , " b" , " c" ])
315+
316+ To create a time- unit column- partitioned table:
317+
318+ .. code- block:: python
319+
320+ from google.cloud import bigquery
321+
322+ table = Table(' mytable' , ... ,
323+ bigquery_time_partitioning = bigquery.TimePartitioning(
324+ field = " mytimestamp" ,
325+ type_ = " MONTH" ,
326+ expiration_ms = 1000 * 60 * 60 * 24 * 30 * 6 , # 6 months
327+ ),
328+ bigquery_require_partition_filter = True ,
329+ )
330+
331+ To create an ingestion- time partitioned table:
332+
333+ .. code- block:: python
334+
335+ from google.cloud import bigquery
336+
337+ table = Table(' mytable' , ... ,
338+ bigquery_time_partitioning = bigquery.TimePartitioning(),
339+ bigquery_require_partition_filter = True ,
340+ )
341+
342+ To create an integer- range partitioned table
343+
344+ .. code- block:: python
345+
346+ from google.cloud import bigquery
347+
348+ table = Table(' mytable' , ... ,
349+ bigquery_range_partitioning = bigquery.RangePartitioning(
350+ field = " zipcode" ,
351+ range_ = bigquery.PartitionRange(start = 0 , end = 100000 , interval = 10 ),
352+ ),
353+ bigquery_require_partition_filter = True ,
354+ )
355+
305356
306357Threading and Multiprocessing
307358^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments