Send feedback
Class TimePartitioning (2.41.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.41.0 keyboard_arrow_down
public abstract class TimePartitioning implements Serializable
Objects of this class allow to configure table partitioning based on time. By dividing a large
table into smaller partitions, you can improve query performance and reduce the number of bytes
billed by restricting the amount of data scanned.
See Also: Partitioned Tables
Static Methods
newBuilder(TimePartitioning.Type type)
public static TimePartitioning . Builder newBuilder ( TimePartitioning . Type type )
Returns a TimePartitioning
object given the time partitioning type.
of(TimePartitioning.Type type)
public static TimePartitioning of ( TimePartitioning . Type type )
Returns a TimePartitioning
object given the time partitioning type. The partitions will
not expire.
of(TimePartitioning.Type type, long expirationMs)
public static TimePartitioning of ( TimePartitioning . Type type , long expirationMs )
Returns a TimePartitioning
object given the time partitioning type and the partition's
expiration in milliseconds.
Parameters
Name
Description
type
TimePartitioning.Type
the time partitioning type.
expirationMs
long
the number of milliseconds for which to keep the storage for a partition
Methods
getExpirationMs()
public abstract Long getExpirationMs ()
Returns the number of milliseconds for which to keep the storage for a partition. When expired,
the storage for the partition is reclaimed. If null, the partion does not expire.
Returns
Type
Description
Long
getField()
public abstract String getField ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is
partitioned by this field.
Returns
Type
Description
String
getRequirePartitionFilter()
public abstract Boolean getRequirePartitionFilter ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
If set to true, queries over this table require a partition filter (that can be used for
partition elimination) to be specified.
getType()
public abstract TimePartitioning . Type getType ()
Returns the time partitioning type.
toBuilder()
public abstract TimePartitioning . Builder toBuilder ()
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-04 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-10-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-04 UTC."]]