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

# createDataset

***

# Function: createDataset()

## Call Signature

```ts theme={null}
function createDataset(
  dataset: DatasetType,
  name: string,
): Promise<DatasetDBType>;
```

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

Creates a new dataset from content and a name.

### Parameters

#### dataset

[`DatasetType`](/sdk-api/typescript/reference/types/type-aliases/DatasetType)

The dataset content as a path, object, or array.

#### name

`string`

The name of the dataset.

### Returns

`Promise`\<[`DatasetDBType`](/sdk-api/typescript/reference/types/type-aliases/DatasetDBType)>

A promise that resolves to the created dataset.

## Call Signature

```ts theme={null}
function createDataset(options: CreateDatasetOptions): Promise<DatasetDBType>;
```

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

Creates a new dataset from an options object.

### Parameters

#### options

[`CreateDatasetOptions`](/sdk-api/typescript/reference/types/type-aliases/CreateDatasetOptions)

The options used to create the dataset.

### Returns

`Promise`\<[`DatasetDBType`](/sdk-api/typescript/reference/types/type-aliases/DatasetDBType)>

A promise that resolves to the created dataset.
