segmentio / parquet-go

Go library to read/write Parquet files
https://pkg.go.dev/github.com/segmentio/parquet-go
Apache License 2.0
341 stars 102 forks source link

How to pivot columns #490

Open KeiranHines opened 1 year ago

KeiranHines commented 1 year ago

I have a data struct in the format

type Entry struct {
  Timestamp uint64
  Name string
  Value string
}

So I would have example data

[]Entry{
  {
    Timestamp: 12345,
    Name: "Name1",
    Value: "value1",
  },
  {
    Timestamp: 12345,
    Name: "Name2",
    Value: "value2",
  },
}

I want to be able to write it in the format

timesamp Name1 Name2 ...
timestamp1 value1 value2 ...

Is this possible?

Thank-you.