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 @@ -590,8 +590,6 @@ def partitioning_type(self):
590590 """Union[str, None]: Time partitioning of the table if it is
591591 partitioned (Defaults to :data:`None`).
592592
593- The only partitioning type that is currently supported is
594- :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`.
595593 """
596594 warnings .warn (
597595 "This method will be deprecated in future versions. Please use "
@@ -1993,6 +1991,9 @@ class TimePartitioningType(object):
19931991 DAY = "DAY"
19941992 """str: Generates one partition per day."""
19951993
1994+ HOUR = "HOUR"
1995+ """str: Generates one partition per hour."""
1996+
19961997
19971998class TimePartitioning (object ):
19981999 """Configures time-based partitioning for a table.
Original file line number Diff line number Diff line change @@ -1030,11 +1030,11 @@ def test_time_partitioning_setter(self):
10301030 dataset = DatasetReference (self .PROJECT , self .DS_ID )
10311031 table_ref = dataset .table (self .TABLE_NAME )
10321032 table = self ._make_one (table_ref )
1033- time_partitioning = TimePartitioning (type_ = TimePartitioningType .DAY )
1033+ time_partitioning = TimePartitioning (type_ = TimePartitioningType .HOUR )
10341034
10351035 table .time_partitioning = time_partitioning
10361036
1037- self .assertEqual (table .time_partitioning .type_ , TimePartitioningType .DAY )
1037+ self .assertEqual (table .time_partitioning .type_ , TimePartitioningType .HOUR )
10381038 # Both objects point to the same properties dict
10391039 self .assertIs (
10401040 table ._properties ["timePartitioning" ], time_partitioning ._properties
You can’t perform that action at this time.
0 commit comments