High level API with array properties #421
-
Hi all, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Pragmateek, you can use the var columns = new Column[]
{
new Column<int[]>("int_arrays"),
new Column<string[]>("string_arrays"),
};
using var writer = new ParquetFileWriter(outputPath, columns);
using var rowGroupWriter = writer.AppendRowGroup();
using var intArrayWriter = rowGroupWriter.NextColumn().LogicalWriter<int[]>();
intArrayWriter.WriteBatch(new int[][]
{
new [] {0, 1, 2},
new [] {3, 4},
new [] {5, 6, 7, 8},
});
using var stringArrayWriter = rowGroupWriter.NextColumn().LogicalWriter<string[]>();
stringArrayWriter.WriteBatch(new string[][]
{
new [] {"abc", "def"},
new [] {"ghi"},
new [] {"jkl", "mno"},
});
writer.Close(); |
Beta Was this translation helpful? Give feedback.
Hi @Pragmateek, you can use the
Column
API with array values. For example, this works: