Read an Arrow schema from a Parquet file in memory.
This returns an Arrow schema in WebAssembly memory. To transfer the Arrow schema to JavaScript
memory you have two options:
(Easier): Call Schema.intoIPCStream to construct a buffer that can be parsed with
Arrow JS's tableFromIPC function. This results in an Arrow JS Table with zero rows but a
valid schema.
(More performant but bleeding edge): Call Schema.intoFFI to construct a data
representation that can be parsed zero-copy from WebAssembly with
arrow-js-ffi using parseSchema.
Read an Arrow schema from a Parquet file in memory.
This returns an Arrow schema in WebAssembly memory. To transfer the Arrow schema to JavaScript memory you have two options:
Schema.intoIPCStream
to construct a buffer that can be parsed with Arrow JS'stableFromIPC
function. This results in an Arrow JS Table with zero rows but a valid schema.Schema.intoFFI
to construct a data representation that can be parsed zero-copy from WebAssembly with arrow-js-ffi usingparseSchema
.Example with IPC Stream:
Example with
arrow-js-ffi
: