Skip to main content
Version: 4.7.34

Datasets - Create single

Creates a new dataset using the createDataset() function.

Example

typescript
import { createDataset } from '@gentrace/core';
const newDataset = await createDataset({
name: 'My New Dataset',
// Add other properties as needed
});
console.log('New Dataset:', newDataset);

Arguments

datasetData: CreateDatasetInput

An object containing the properties to create the new dataset.

Return value

Returns a single DatasetV2 object.

🛠️ DatasetV2

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

id: 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.

name: string

description?: string | null

pipelineId: string (UUID)

Types

🛠️ CreateDatasetInput

name: string

description?: string

pipelineId: string

🛠️ DatasetV2

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

id: 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.

name: string

description?: string | null

pipelineId: string (UUID)