Datasets - Update
- TypeScript
- Python
Updates an existing dataset using the updateDataset()
function.
Updates an existing dataset using the update_dataset()
function.
Example
typescript
import { updateDataset } from '@gentrace/core';const datasetId = '123e4567-e89b-12d3-a456-426614174000'; // UUID formatconst updatedDataset = await updateDataset(datasetId, {name: 'Updated Dataset Name',// Add other properties to update});console.log('Updated Dataset:', updatedDataset);
python
import gentracedataset_id = '123e4567-e89b-12d3-a456-426614174000' # UUID formatupdated_dataset = gentrace.update_dataset(dataset_id, {"name": "Updated Dataset Name",# Add other properties to update})print("Updated Dataset:", updated_dataset)
Arguments
datasetId: string
The unique identifier of the dataset to update.
datasetData: UpdateDatasetInput
An object containing the properties to update for the dataset.
dataset_id: str
The unique identifier of the dataset to update.
dataset_data: Dict[str, Any]
A dictionary 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)
Returns a single DatasetV2
object.
🛠️ 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]
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]