@@ -1980,20 +1980,37 @@ class TimePartitioningType(object):
1980
1980
HOUR = "HOUR"
1981
1981
"""str: Generates one partition per hour."""
1982
1982
1983
+ MONTH = "MONTH"
1984
+ """str: Generates one partition per month."""
1985
+
1986
+ YEAR = "YEAR"
1987
+ """str: Generates one partition per year."""
1988
+
1983
1989
1984
1990
class TimePartitioning (object ):
1985
1991
"""Configures time-based partitioning for a table.
1986
1992
1987
1993
Args:
1988
1994
type_ (Optional[google.cloud.bigquery.table.TimePartitioningType]):
1989
1995
Specifies the type of time partitioning to perform. Defaults to
1990
- :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`,
1991
- which is the only currently supported type.
1996
+ :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`.
1997
+
1998
+ Supported values are:
1999
+
2000
+ * :attr:`~google.cloud.bigquery.table.TimePartitioningType.HOUR`
2001
+ * :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`
2002
+ * :attr:`~google.cloud.bigquery.table.TimePartitioningType.MONTH`
2003
+ * :attr:`~google.cloud.bigquery.table.TimePartitioningType.YEAR`
2004
+
1992
2005
field (Optional[str]):
1993
2006
If set, the table is partitioned by this field. If not set, the
1994
2007
table is partitioned by pseudo column ``_PARTITIONTIME``. The field
1995
- must be a top-level ``TIMESTAMP`` or ``DATE`` field. Its mode must
1996
- be ``NULLABLE`` or ``REQUIRED``.
2008
+ must be a top-level ``TIMESTAMP``, ``DATETIME``, or ``DATE``
2009
+ field. Its mode must be ``NULLABLE`` or ``REQUIRED``.
2010
+
2011
+ See the `time-unit column-partitioned tables guide
2012
+ <https://cloud.google.com/bigquery/docs/creating-column-partitions>`_
2013
+ in the BigQuery documentation.
1997
2014
expiration_ms(Optional[int]):
1998
2015
Number of milliseconds for which to keep the storage for a
1999
2016
partition.
0 commit comments