Exports data as an Apache ORC columnar file using the pyorc library.
Writes all columns as string type in a struct schema derived from the header names. Rows are buffered in memory and the ORC file is written when CloseFile is called. Null values are converted to empty strings.
pyorc (listed in requirements.txt)from ObjDataExportOrc import ObjExportApi
exporter = ObjExportApi()
exporter.OpenFile("/tmp/output.orc")
exporter.WriteHeader(["Name", "Score"])
exporter.WriteData([["Alice", "95"], ["Bob", "82"]])
exporter.CloseFile()
| Method | Description |
|---|---|
OpenFile(filename) |
Set output path and reset row buffer |
WriteHeader(fields) |
Store column names and track redact columns |
WriteData(data) |
Buffer rows (list of lists) with redaction applied |
CloseFile() |
Build ORC schema and write file |
EscapeCSV(val) |
No-op passthrough |
DefaultExtension() |
Returns "orc" |