You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used this orc reader for a project I was working and I wanted to offer an example I needed which helped me. I had nested orc structures I wanted to convert to json. If would like a PR I would be happy to submit to the README.md
// Example 2r, err:=Open("./examples/demo-12-zlib.orc")
iferr!=nil {
log.Fatal(err)
}
deferr.Close()
rootColumns:=r.Schema().Columns()
count:=len(rootColumns)
values:=make([]interface{}, count)
// Create a new Cursor reading the provided columns.c:=r.Select(rootColumns...)
returnData:=make(map[string]interface{})
// Iterate over each stripe in the file.forc.Stripes() {
// Iterate over each row in the stripe.forc.Next() {
// Retrieve a slice of interface values for the current row.log.Println(c.Row())
currentRow:=c.Row()
fori, _:=rangevalues {
masterData[rootColumns[i]] =currentRow[i]
}
slicer, _:=json.Marshal(returnData)
fmt.Println(string(slicer))
}
}
iferr:=c.Err(); err!=nil {
log.Fatal(err)
}
I used this orc reader for a project I was working and I wanted to offer an example I needed which helped me. I had nested orc structures I wanted to convert to json. If would like a PR I would be happy to submit to the README.md
This is taken from https://github.com/vfrank66/aws-s3-orc-to-kinesis.
The text was updated successfully, but these errors were encountered: