Datasets - Create single
- TypeScript
- Python
Creates a new dataset using the createDataset()
function.
Creates a new dataset using the create_dataset()
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);
python
import gentracenew_dataset = gentrace.create_dataset({"name": "My New Dataset",# Add other properties as needed})print("New Dataset:", new_dataset)
Arguments
datasetData: CreateDatasetInput
An object containing the properties to create the new dataset.
dataset_data: Dict[str, Any]
A dictionary 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)
id: str
name: str
description: Optional[str]
pipelineId: str
createdAt: datetime
updatedAt: datetime
archivedAt: Optional[datetime]
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)
id: str
name: str
description: Optional[str]
pipelineId: str
createdAt: datetime
updatedAt: datetime
archivedAt: Optional[datetime]
Types
🛠️ CreateDatasetInput
name: string
description?: string
pipelineId: string
name: str
description: Optional[str]
pipelineId: str
🛠️ 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)
id: str
name: str
description: Optional[str]
pipelineId: str
createdAt: datetime
updatedAt: datetime
archivedAt: Optional[datetime]