File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -583,8 +583,6 @@ def partitioning_type(self):
583583 """Union[str, None]: Time partitioning of the table if it is
584584 partitioned (Defaults to :data:`None`).
585585
586- The only partitioning type that is currently supported is
587- :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`.
588586 """
589587 warnings .warn (
590588 "This method will be deprecated in future versions. Please use "
@@ -1980,6 +1978,9 @@ class TimePartitioningType(object):
19801978 DAY = "DAY"
19811979 """str: Generates one partition per day."""
19821980
1981+ HOUR = "HOUR"
1982+ """str: Generates one partition per hour."""
1983+
19831984
19841985class TimePartitioning (object ):
19851986 """Configures time-based partitioning for a table.
Original file line number Diff line number Diff line change @@ -1024,11 +1024,11 @@ def test_time_partitioning_setter(self):
10241024 dataset = DatasetReference (self .PROJECT , self .DS_ID )
10251025 table_ref = dataset .table (self .TABLE_NAME )
10261026 table = self ._make_one (table_ref )
1027- time_partitioning = TimePartitioning (type_ = TimePartitioningType .DAY )
1027+ time_partitioning = TimePartitioning (type_ = TimePartitioningType .HOUR )
10281028
10291029 table .time_partitioning = time_partitioning
10301030
1031- self .assertEqual (table .time_partitioning .type_ , TimePartitioningType .DAY )
1031+ self .assertEqual (table .time_partitioning .type_ , TimePartitioningType .HOUR )
10321032 # Both objects point to the same properties dict
10331033 self .assertIs (
10341034 table ._properties ["timePartitioning" ], time_partitioning ._properties
You can’t perform that action at this time.
0 commit comments