Datasets - Get
- TypeScript
- Python
Retrieves a single dataset using the getDataset()
function.
Retrieves a single dataset using the get_dataset()
function.
Example
typescript
import { getDataset } from '@gentrace/core';const datasetId = '123e4567-e89b-12d3-a456-426614174000'; // Example UUIDconst dataset = await getDataset(datasetId);console.log('Dataset:', dataset);
python
import gentracedataset_id = '123e4567-e89b-12d3-a456-426614174000' # Example UUIDdataset = gentrace.get_dataset(dataset_id)print("Dataset:", dataset)
Arguments
datasetId: string
The ID of the dataset to retrieve.
dataset_id: str
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.
Returns a 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]