public abstract class TimePartitioning extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TimePartitioning.Builder |
static class |
TimePartitioning.Type
[Optional] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one
partition per day, hour, month, and year, respectively.
|
Modifier and Type | Method and Description |
---|---|
abstract Long |
getExpirationMs()
Returns the number of milliseconds for which to keep the storage for a partition.
|
abstract String |
getField()
If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is
partitioned by this field.
|
abstract Boolean |
getRequirePartitionFilter()
If set to true, queries over this table require a partition filter (that can be used for
partition elimination) to be specified.
|
abstract TimePartitioning.Type |
getType()
Returns the time partitioning type.
|
static TimePartitioning.Builder |
newBuilder(TimePartitioning.Type type)
Returns a
TimePartitioning object given the time partitioning type. |
static TimePartitioning |
of(TimePartitioning.Type type)
Returns a
TimePartitioning object given the time partitioning type. |
static TimePartitioning |
of(TimePartitioning.Type type,
long expirationMs)
Returns a
TimePartitioning object given the time partitioning type and the partition's
expiration in milliseconds. |
abstract TimePartitioning.Builder |
toBuilder() |
public abstract TimePartitioning.Type getType()
@Nullable public abstract Long getExpirationMs()
@BetaApi @Nullable public abstract String getField()
@BetaApi @Nullable public abstract Boolean getRequirePartitionFilter()
public abstract TimePartitioning.Builder toBuilder()
public static TimePartitioning.Builder newBuilder(TimePartitioning.Type type)
TimePartitioning
object given the time partitioning type.public static TimePartitioning of(TimePartitioning.Type type)
TimePartitioning
object given the time partitioning type. The partitions will
not expire.public static TimePartitioning of(TimePartitioning.Type type, long expirationMs)
TimePartitioning
object given the time partitioning type and the partition's
expiration in milliseconds.type
- the time partitioning type.expirationMs
- the number of milliseconds for which to keep the storage for a partitionCopyright © 2023 Google LLC. All rights reserved.