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 TypeMethodDescriptionvoid
acceptLocation
(@NotNull Collection<String> partitionValueStrings) Accept an ordered collection ofstrings
representing partition values for a particular table location, parallel to a previously registered collection of partition keys.build()
Build aTable
with 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.void
registerPartitionKeys
(@NotNull Collection<String> partitionKeys) Register an ordered collection ofstrings
representing partition keys.
-
Method Details
-
registerPartitionKeys
Register an ordered collection ofstrings
representing 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 ofstrings
representing 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 aTable
with 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
-