hyparquet-writer
Version:
Parquet file writer for JavaScript
36 lines • 1.4 kB
TypeScript
/**
* @import {ConvertedType, DecodedArray, FieldRepetitionType, ParquetType, SchemaElement} from 'hyparquet'
* @import {BasicType, ColumnSource, ShredType} from '../src/types.js'
*/
/**
* Infer a schema from column data.
* Accepts optional schemaOverrides to override the type of columns by name.
*
* @param {object} options
* @param {ColumnSource[]} options.columnData
* @param {Record<string, SchemaElement>} [options.schemaOverrides]
* @returns {SchemaElement[]}
*/
export function schemaFromColumnData({ columnData, schemaOverrides }: {
columnData: ColumnSource[];
schemaOverrides?: Record<string, import("hyparquet/src/types.js").SchemaElement> | undefined;
}): SchemaElement[];
/**
* Automatically determine a SchemaElement from an array of values.
*
* @param {string} name the column name
* @param {DecodedArray} values the column values
* @returns {SchemaElement}
*/
export function autoSchemaElement(name: string, values: DecodedArray): SchemaElement;
/**
* Get the max repetition level for a given schema path.
*
* @param {SchemaElement[]} schemaPath
* @returns {number} max repetition level
*/
export function getMaxRepetitionLevel(schemaPath: SchemaElement[]): number;
import type { ColumnSource } from '../src/types.js';
import type { SchemaElement } from 'hyparquet';
import type { DecodedArray } from 'hyparquet';
//# sourceMappingURL=schema.d.ts.map