> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-drtangible-wip-test-inline-tag.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Dataset<R>

> TypeScript SDK reference

Dataset object with easy saving and automatic versioning

Defined in: [src/dataset.ts:53](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/dataset.ts#L53)

## Example

```ts twoslash theme={null}
// @noErrors
// Create a dataset
const dataset = new Dataset({
  id: 'grammar-dataset',
  rows: [
    { id: '0', sentence: "He no likes ice cream.", correction: "He doesn't like ice cream." },
    { id: '1', sentence: "She goed to the store.", correction: "She went to the store." },
    { id: '2', sentence: "They plays video games all day.", correction: "They play video games all day." }
  ]
})

// Access a specific example
const exampleLabel = dataset.getRow(2).sentence;

// Save the dataset
const ref = await dataset.save()
```

## Extends

* [`WeaveObject`](./weaveobject)

## Type Parameters

### R

`R` *extends* `DatasetRow`

## Constructors

### Constructor

> **new Dataset**\<`R`>(`parameters`): `Dataset`\<`R`>

Defined in: [src/dataset.ts:56](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/dataset.ts#L56)

#### Parameters

##### parameters

###### description?

`string`

###### name?

`string`

###### rows

`R`\[]

#### Returns

`Dataset`\<`R`>

#### Overrides

[`WeaveObject`](./weaveobject).[`constructor`](./weaveobject#constructor)

## Properties

### \_\_savedRef

> `optional` **\_\_savedRef**: [`ObjectRef`](./objectref) | `Promise`\<[`ObjectRef`](./objectref)>

Defined in: [src/weaveObject.ts:72](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/weaveObject.ts#L72)

#### Inherited from

[`WeaveObject`](./weaveobject).[`__savedRef`](./weaveobject#__savedref)

***

### rows

> **rows**: `Table`\<`R`>

Defined in: [src/dataset.ts:54](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/dataset.ts#L54)

## Accessors

### description

#### Get Signature

> **get** **description**(): `string` | `undefined`

Defined in: [src/weaveObject.ts:99](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/weaveObject.ts#L99)

##### Returns

`string` | `undefined`

#### Inherited from

[`WeaveObject`](./weaveobject).[`description`](./weaveobject#description)

***

### length

#### Get Signature

> **get** **length**(): `number`

Defined in: [src/dataset.ts:69](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/dataset.ts#L69)

##### Returns

`number`

***

### name

#### Get Signature

> **get** **name**(): `string`

Defined in: [src/weaveObject.ts:95](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/weaveObject.ts#L95)

##### Returns

`string`

#### Inherited from

[`WeaveObject`](./weaveobject).[`name`](./weaveobject#name)

## Methods

### \[asyncIterator]\()

> **\[asyncIterator]**(): `AsyncIterator`\<`any`>

Defined in: [src/dataset.ts:73](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/dataset.ts#L73)

#### Returns

`AsyncIterator`\<`any`>

***

### getRow()

> **getRow**(`index`): `R`

Defined in: [src/dataset.ts:79](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/dataset.ts#L79)

#### Parameters

##### index

`number`

#### Returns

`R`

***

### save()

> **save**(): `Promise`\<[`ObjectRef`](./objectref)>

Defined in: [src/dataset.ts:65](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/dataset.ts#L65)

#### Returns

`Promise`\<[`ObjectRef`](./objectref)>

***

### saveAttrs()

> **saveAttrs**(): `object`

Defined in: [src/weaveObject.ts:76](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/weaveObject.ts#L76)

#### Returns

`object`

#### Inherited from

[`WeaveObject`](./weaveobject).[`saveAttrs`](./weaveobject#saveattrs)
