> ## 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.

# getDatasetMetadata

***

# Function: getDatasetMetadata()

```ts theme={null}
function getDatasetMetadata<T>(
  params: RunExperimentParams<T>,
  projectName: string,
): Promise<null | Dataset>;
```

Defined in: [src/utils/datasets.ts](https://github.com/rungalileo/galileo-js/blob/main/src/utils/datasets.ts)

Gets dataset metadata from experiment params.
Delegates to Datasets.get() for fetching by id or name.

## Type Parameters

### T

`T` *extends* `Record`\<`string`, `unknown`>

## Parameters

### params

`RunExperimentParams`\<`T`>

Experiment parameters that may contain a dataset reference.

### projectName

`string`

Project name used for dataset lookup when needed.

## Returns

`Promise`\<`null` | [`Dataset`](/sdk-api/typescript/reference/README/classes/Dataset)>

A promise that resolves to the dataset or null if not found.
