Interface KeyValuePartitionLayout.LocationTableBuilder
- All Known Implementing Classes:
LocationTableBuilderCsv,LocationTableBuilderDefinition
- Enclosing class:
- KeyValuePartitionLayout<TLK extends TableLocationKey,
TARGET_FILE_TYPE>
public static interface KeyValuePartitionLayout.LocationTableBuilder
Interface for implementations to perform type coercion and specify a table of partition values for observed table
locations.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacceptLocation(@NotNull Collection<String> partitionValueStrings) Accept an ordered collection ofstringsrepresenting partition values for a particular table location, parallel to a previously registered collection of partition keys.build()Build aTablewith one column per partition key specified inregisterPartitionKeys, and one row per location provided viaacceptLocation, with cell values parallel to that location's partition values after any appropriate conversion has been applied.voidregisterPartitionKeys(@NotNull Collection<String> partitionKeys) Register an ordered collection ofstringsrepresenting partition keys.
-
Method Details
-
registerPartitionKeys
Register an ordered collection ofstringsrepresenting partition keys. This should be called exactly once, and before any calls toacceptLocation.- Parameters:
partitionKeys- The partition keys to register
-
acceptLocation
Accept an ordered collection ofstringsrepresenting partition values for a particular table location, parallel to a previously registered collection of partition keys. Should be called after a single call toregisterPartitionKeys.- Parameters:
partitionValueStrings- The partition values to accept. Must have the same length as the previously registered partition keys.
-
build
Table build()Build aTablewith one column per partition key specified inregisterPartitionKeys, and one row per location provided viaacceptLocation, with cell values parallel to that location's partition values after any appropriate conversion has been applied. The implementation is responsible for determining the appropriate column types.- Returns:
- The
Table
-