Skip to main content
Version: 4.7.14

Datasets - Get

Retrieves a single dataset using the getDataset() function.

Example

typescript
import { getDataset } from '@gentrace/core';
const datasetId = '123e4567-e89b-12d3-a456-426614174000'; // Example UUID
const dataset = await getDataset(datasetId);
console.log('Dataset:', dataset);

Arguments

datasetId: string

The ID of the dataset to retrieve.

Return value

Returns a DatasetV2 object.

🛠️ DatasetV2

The DatasetV2 type represents the structure of a dataset. Below are the fields of the DatasetV2 type:

id: string (UUID)

name: string

description?: string | null

pipelineId: string (UUID)

createdAt: number Timestamp in seconds since the UNIX epoch. Can be transformed into a Date object.

updatedAt: number Timestamp in seconds since the UNIX epoch. Can be transformed into a Date object.

archivedAt?: number | null Timestamp in seconds since the UNIX epoch. Can be transformed into a Date object.