Skip to main content
Version: 4.7.35

Datasets - Update

Updates an existing dataset using the updateDataset() function.

Example

typescript
import { updateDataset } from '@gentrace/core';
const datasetId = '123e4567-e89b-12d3-a456-426614174000'; // UUID format
const updatedDataset = await updateDataset(datasetId, {
name: 'Updated Dataset Name',
// Add other properties to update
});
console.log('Updated Dataset:', updatedDataset);

Arguments

datasetId: string

The unique identifier of the dataset to update.

datasetData: UpdateDatasetInput

An object containing the properties to update for the dataset.

Return value

Returns an array of DatasetV2 objects.

🛠️ 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

🛠️ UpdateDatasetInput

name?: string

description?: string

archived?: boolean

🛠️ DatasetV2

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

id: str

name: str

description: Optional[str]

pipelineId: str

createdAt: datetime

updatedAt: datetime

archivedAt: Optional[datetime]