Last active
September 30, 2019 09:20
-
-
Save prodeezy/459422d1b7d388a0d225292a62817b19 to your computer and use it in GitHub Desktop.
Timestamp Day Transform Partition Read Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.iceberg.types.Types.NestedField._ | |
import org.apache.iceberg.types._ | |
import org.apache.iceberg._ | |
val timestampSchema = new Schema(optional(1, "timestamp", Types.TimestampType.withoutZone())) | |
val partitionByDate = PartitionSpec.builderFor(timestampSchema).day("timestamp", "date").build | |
DataFiles.builder(partitionByDate).withPath("/path/to/data-1.parquet").withFileSizeInBytes(0).withRecordCount(0).withPartitionPath("date=2018-06-08").build() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment