Docs/API reference

DatasetResult · Node.js

Read and export a single extracted field map.

Download .md
Developers2 min read9 sections
Source reference · Match your SDK version. Availability and known issues
In this guide

Purpose and lifecycle

Returned by Dataset.build. Constructing it manually requires the correct native result handle.

Export methods create or replace files. A small-result export is not a resumable dataset shard or checkpoint. Python df() needs pandas installed separately.

Definition and availability

Source snapshot: 1.0.0-alpha.3. Package export. Declared in source; this is not a runtime test result.

Signatures and source locations are generated from the SDK wrappers. Clean snapshots link to the recorded commit. Modified snapshots link to main, which may differ; file hashes identify the local inputs.

export class DatasetResult
typescript1 lines · copy-ready

Members

MemberKindReturn / value typeSource status
constructormethodDatasetResultPresent in source
toDictmethodRecord<string, string>Present in source
toJsonmethodPromise<void>Present in source
toCsvmethodPromise<void>Present in source
toParquetmethodPromise<void>Present in source

constructor()

Native interop entry point. Applications normally obtain this wrapper from Page.create, a selector or Dataset.build; do not pass a URL or an arbitrary object as a native handle.

Returns / value: DatasetResult.

constructor(inner: JsDatasetResult): DatasetResult
typescript1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
innerJsDatasetResultRequiredExisting native handle for wrapper interop; not a URL or plain data object.

toDict()

Return a copy of the extracted string-valued fields.

Returns / value: Record<string, string>.

toDict(): Record<string, string>
typescript1 lines · copy-ready

toJson()

Serialize the field map to one JSON object file.

Returns / value: Promise<void>.

toJson(path: string): Promise<void>
typescript1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
pathstringRequiredFilesystem path relative to the process working directory unless absolute.

toCsv()

Write one header row and one data row.

Returns / value: Promise<void>.

toCsv(path: string): Promise<void>
typescript1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
pathstringRequiredFilesystem path relative to the process working directory unless absolute.

toParquet()

Write the fields as a one-row Parquet dataset.

Returns / value: Promise<void>.

toParquet(path: string): Promise<void>
typescript1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
pathstringRequiredFilesystem path relative to the process working directory unless absolute.

Errors and operational limits

Filesystem and serialization failures propagate. Node export methods reject with ExportError. Python can also expose OSError directly.

Source availability, package publication and runtime validation are separate facts. These pages describe the source snapshot, not a claim that all platforms or every API path have passed production acceptance.