/** * @import {DecodedArray} from 'hyparquet' * @import {ColumnSource, ParquetWriteRowsOptions} from '../src/types.js' */ /** * Write row objects to parquet without first transposing the whole dataset into * columns, so peak memory is bounded by the row-group size, not the dataset. * * `rows` may be an array, any sync iterable (a generator, a Set), or an async * iterable (a DB cursor, a stream). With a lazy source the rows are pulled one * group at a time and never all held at once, so peak memory is independent of * the total row count. * * Return type: an async-iterable source always returns a promise, since its * rows can't be pulled synchronously. For an array or sync iterable it is * governed by the sink — an async `writer` (its `flush` returns a promise) * returns a promise, a fully synchronous sink returns void. Either way each * group's write settles before the next group is pulled, so the source and sink * stay within one group of each other (see drain / drainAsync below). * * `columns` is required and fixes the column names and order (same fields as * ColumnSource minus the data); per-column `type` is optional. A schema is * inferred from the first group's values unless one is supplied. * * Takes the same write options as {@link parquetWrite} (codec, compressors, * statistics, rowGroupSize, pageSize, kvMetadata, schema) at the top level, * minus `columnData`, since `rows` and `columns` describe the data instead. * * @param {ParquetWriteRowsOptions} options * @returns {void | Promise} */ export function parquetWriteRows({ writer, rows, columns, schema, rowGroupSize, pageSize, ...options }: ParquetWriteRowsOptions): void | Promise; import type { ParquetWriteRowsOptions } from '../src/types.js'; //# sourceMappingURL=write-rows.d.ts.map