UNPKG

@pujansrt/data-genie

Version:

High performant ETL engine written in TypeScript

20 lines (19 loc) 759 B
import { DataReader, DataRecord } from '../core/interfaces'; /** * NDJsonReader class for reading data records from a file in NDJSON (Newline Delimited JSON) format. * Each line in the file is expected to be a valid JSON object. * This class reads records incrementally, suitable for very large files. */ export declare class NDJsonReader implements DataReader { private filePath; /** * Constructs a new NDJsonReader. * @param filePath The path to the NDJSON file. */ constructor(filePath: string); /** * Reads data records from the NDJSON file asynchronously, yielding each record as it's parsed. * @returns An AsyncIterableIterator of DataRecord objects. */ read(): AsyncIterableIterator<DataRecord>; }