如何读取ORC文件元数据?

时间:2019-08-06 22:44:30

标签: go orc

我正在尝试使用Go github.com/scritchley/orc包读取ORC文件。 我能够读取ORC文件的内容,但我也想读取ORC元数据。我找不到使用该软件包执行此操作的直接方法。

来自包装的示例:

r, err := orc.Open(localFileName)
if err != nil {
    log.Fatal(err)
}
defer r.Close()
logging.Info("reader returned")

// Create a new Cursor reading the provided columns.
c := r.Select()

// Iterate over each stripe in the file.
for c.Stripes() {

    // Iterate over each row in the stripe.
    for c.Next() {

        // Retrieve a slice of interface values for the current row.
        log.Println(c.Row())

    }

}

if err := c.Err(); err != nil {
    log.Fatal(err)
}

0 个答案:

没有答案
相关问题