Documentation Index
Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Class: Datasets
Defined in: src/entities/datasets.ts Service class for dataset operations used by dataset utilities.Constructors
Constructor
Returns
Datasets
Methods
create()
Parameters
options
The options used to create the dataset.filePath
string
The path to the dataset file.
format
DatasetFormat
The format of the dataset file.
name
string
The name of the dataset.
projectId?
string
(Optional) The ID of the project that will use the dataset.
projectName?
string
(Optional) The name of the project that will use the dataset.
Returns
Promise<Dataset>
A promise that resolves to the created dataset.
delete()
Parameters
options
The options used to locate the dataset.id?
string
(Optional) The ID of the dataset.
name?
string
(Optional) The name of the dataset.
projectId?
string
(Optional) The ID of the project to validate against.
projectName?
string
(Optional) The name of the project to validate against.
Returns
Promise<void>
A promise that resolves when the dataset has been deleted.
extend()
Parameters
params
SyntheticDatasetExtensionRequest
Configuration for synthetic data generation.
Returns
Promise<DatasetRow[]>
A promise that resolves to the generated dataset rows.
get()
Parameters
options
The options used to locate the dataset.id?
string
(Optional) The ID of the dataset.
name?
string
(Optional) The name of the dataset.
projectId?
string
(Optional) The ID of the project to validate against.
projectName?
string
(Optional) The name of the project to validate against.
withContent?
boolean
(Optional) Whether to load the dataset content.
Returns
Promise<null | Dataset>
A promise that resolves to the dataset, or null if it is not found.
getVersion()
Parameters
options
The options used to locate the dataset version.datasetId?
string
(Optional) The ID of the dataset.
datasetName?
string
(Optional) The name of the dataset.
versionIndex
number
The version index to retrieve.
Returns
Promise<DatasetContent>
A promise that resolves to the dataset content at the specified version.
getVersionHistory()
Parameters
options
The options used to locate the dataset.datasetId?
string
(Optional) The ID of the dataset.
datasetName?
string
(Optional) The name of the dataset.
Returns
Promise<DatasetVersionHistory>
A promise that resolves to the version history for the dataset.
list()
Parameters
options?
(Optional) Options for listing datasets.limit?
number
(Optional) The maximum number of datasets to return.
projectId?
string
(Optional) The ID of the project that uses the datasets.
projectName?
string
(Optional) The name of the project that uses the datasets.
Returns
Promise<Dataset[]>
A promise that resolves to the list of datasets.
listProjects()
Parameters
options
The options used to locate the dataset.datasetId?
string
(Optional) The ID of the dataset.
datasetName?
string
(Optional) The name of the dataset.
limit?
number
(Optional) The maximum number of projects to return.
Returns
Promise<DatasetProject[]>
A promise that resolves to the list of projects that use the dataset.
getRecordsForDataset()
Parameters
options
The options used to locate the dataset.datasetId?
string
(Optional) The ID of the dataset.
datasetName?
string
(Optional) The name of the dataset.
Returns
Promise<DatasetRecord[]>
A promise that resolves to the list of dataset records.
loadDatasetAndRecords()
- datasetId (explicit ID)
- datasetName (explicit name)
- dataset as string (interpreted as name)
- dataset as Dataset object
- dataset as array of records
Parameters
options
Dataset loading optionsdataset?
|string
| DatasetDBType
| Record<string, unknown>[]
Dataset object, array of records, or dataset name (string)
datasetId?
string
Optional explicit dataset ID
datasetName?
string
Optional explicit dataset name
projectName?
string
Optional project name for dataset lookup
Returns
Promise<[null | Dataset, DatasetRecord[]]>
Promise resolving to tuple of [Dataset | null, DatasetRecord[]]
Throws
Error if no valid dataset information is providedrecoverDatasetRecords()
Parameters
dataset
Dataset
Returns
Promise<DatasetRecord[]>