Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import org.apache.iceberg.types.Types.NestedField._
  2. import org.apache.iceberg.types._
  3. import org.apache.iceberg._
  4.  
  5.  
  6. val timestampSchema = new Schema(optional(1, "timestamp", Types.TimestampType.withoutZone()))
  7.  
  8. val partitionByDate = PartitionSpec.builderFor(timestampSchema).day("timestamp", "date").build
  9.  
  10. DataFiles.builder(partitionByDate).withPath("/path/to/data-1.parquet").withFileSizeInBytes(0).withRecordCount(0).withPartitionPath("date=2018-06-08").build()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement