> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.ampdb.io/api/mcp` to find what you need.

# Manifest Reference

Every field of a dataset manifest, by dataset kind. To learn what a manifest is and how to write one, see [Manifests](/datasets/manifests). A field's path says where it goes: `tables.<table>.network` is the `network` field of each table in `tables`.

## Raw datasets

The manifest of a [raw dataset](/datasets/raw-datasets), which extracts a chain through a provider. Generate one with `ampctl manifest generate` rather than writing it: its tables are fixed by its kind (except Phaser's, whose tables come from the bridge, and whose manifest you write yourself).

### `kind`

Which chain data the dataset holds, and so which [providers](/providers) it extracts through.

* **Type**: "eth-beacon", "bittensor", "evm-rpc", "solana", "tempo", "bitcoin-rpc", "stellar", or "phaser"
* **Required**

```json
{
  "kind": "evm-rpc"
}
```

### `network`

The network the dataset extracts, through a provider of the same kind and network. Use the names in [The Graph's networks registry](https://github.com/graphprotocol/networks-registry/blob/main/docs/networks-table.md), like `mainnet`, `base`, or `solana-mainnet`: lowercase letters, digits, and hyphens.

* **Type**: string
* **Required**

```json
{
  "network": "mainnet"
}
```

### `start_block`

The first block the dataset covers: Amp never extracts the blocks before it. Not for chains whose block numbers have gaps, like Solana. See [Start block](/datasets/raw-datasets#start-block).

* **Type**: integer
* **Default**: `0`

```json
{
  "start_block": 18000000
}
```

### `finalized_blocks_only`

Whether to extract only the blocks the chain considers final, which a [reorg](/get-started/concepts/reorgs) can't replace. Final blocks lag behind the chain's latest. Ethereum Beacon datasets extract only final blocks either way.

* **Type**: boolean
* **Default**: `false`

```json
{
  "finalized_blocks_only": false
}
```

### `state_snapshots` (Experimental)

Bittensor datasets only: the chain state to copy into the `storage_entries` table. See [Bittensor](/providers/bittensor).

* **Type**: object
* **Default**: none

### `state_snapshots.selectors`

The storage entries to copy, each as an exact, case-sensitive `Pallet.StorageEntry` name from the chain's runtime metadata. A name alone copies the entry at every block. An object with `selector` and `block_interval` copies it at the blocks whose number is a multiple of `block_interval`: an interval of `100` copies blocks 0, 100, 200, and so on.

* **Type**: array of strings or objects
* **Default**: `[]`

```json
{
  "state_snapshots": {
    "selectors": [
      "Balances.TotalIssuance",
      {
        "selector": "SubtensorModule.Difficulty",
        "block_interval": 360
      }
    ]
  }
}
```

### `state_snapshots.selectors[].selector`

The storage entry to copy, as an exact, case-sensitive `Pallet.StorageEntry` name.

* **Type**: string
* **Required** when the entry is an object

```json
{
  "state_snapshots": {
    "selectors": [
      {
        "selector": "SubtensorModule.Difficulty",
        "block_interval": 360
      }
    ]
  }
}
```

### `state_snapshots.selectors[].block_interval`

How often to copy the entry, in blocks: at each block whose number is a multiple of it, counting from block 0, whatever block the dataset starts at.

* **Type**: integer
* **Allowed**: at least 1
* **Required** when the entry is an object

```json
{
  "state_snapshots": {
    "selectors": [
      {
        "selector": "SubtensorModule.Difficulty",
        "block_interval": 360
      }
    ]
  }
}
```

### `tables`

The dataset's tables, by name. Their names and columns are fixed by the dataset's kind.

* **Type**: object
* **Required**

### `tables.<table>.schema`

The table's columns, as described in [Table schemas](/datasets/manifest-reference#table-schemas).

* **Type**: object
* **Required**

### `tables.<table>.network`

The network of the table's data: the same as the manifest's `network`.

* **Type**: string
* **Required**

```json
{
  "tables": {
    "blocks": {
      "network": "mainnet"
    }
  }
}
```

### `tables.<table>.sorted_by`

The columns that order the table's rows, from the kind's table definitions.

* **Type**: array of strings
* **Default**: `[]`

```json
{
  "tables": {
    "blocks": {
      "sorted_by": ["block_num", "timestamp"]
    }
  }
}
```

### `tables.<table>.bloom_filter_columns` (Experimental)

The columns to write [bloom filters](/datasets/bloom-filters) for, which speed up queries that look up a value in them. None by default.

* **Type**: array of objects
* **Default**: `[]`

```json
{
  "tables": {
    "blocks": {
      "bloom_filter_columns": [
        {
          "column": "hash",
          "ndv": 1000000
        }
      ]
    }
  }
}
```

### `tables.<table>.bloom_filter_columns[].column`

Column name to apply the bloom filter to.

* **Type**: string
* **Required**

```json
{
  "tables": {
    "blocks": {
      "bloom_filter_columns": [
        {
          "column": "hash"
        }
      ]
    }
  }
}
```

### `tables.<table>.bloom_filter_columns[].ndv`

About how many distinct values the column holds, which sizes its bloom filter. Too low, and the filter skips fewer files; too high, and it takes more space.

* **Type**: integer
* **Default**: `10000`

```json
{
  "tables": {
    "blocks": {
      "bloom_filter_columns": [
        {
          "column": "hash",
          "ndv": 1000000
        }
      ]
    }
  }
}
```

### `tables.<table>.segment_selection_policy`

How Amp links the table's consecutive blocks. `hash-linked` follows each block's hash and parent hash, which lets Amp detect [reorgs](/get-started/concepts/reorgs). `ordered` uses block numbers alone, and doesn't detect reorgs: use it only for data that never changes once published. See [Segment selection](/datasets/raw-datasets#segment-selection).

* **Type**: "hash-linked" or "ordered"
* **Default**: `"hash-linked"`

```json
{
  "tables": {
    "blocks": {
      "segment_selection_policy": "hash-linked"
    }
  }
}
```

## Derived datasets

The manifest of a [derived dataset](/datasets/derived-datasets), whose tables are SQL over other datasets.

### `kind`

Always `"manifest"`.

* **Type**: string
* **Required**

```json
{
  "kind": "manifest"
}
```

### `dependencies`

The datasets the tables' SQL reads, by alias. The SQL refers to a dependency's tables through its alias, like `eth.blocks`.

* **Type**: object
* **Default**: `{}`

### `dependencies.<alias>`

The dataset, as `namespace/name@version` or `namespace/name@hash`. `latest` and `dev` aren't allowed. A version can still move to another manifest if someone registers one with it: name the dependency by its hash to be sure it never changes. An alias starts with a letter, followed by letters, digits, and underscores.

* **Type**: string

```json
{
  "dependencies": {
    "eth": "acme/eth_mainnet@1.0.0"
  }
}
```

### `tables`

The dataset's tables, by name. A name starts with a letter or an underscore, followed by letters, digits, underscores, and `$`.

* **Type**: object
* **Default**: `{}`

### `tables.<table>.input`

Where the table's rows come from: a SQL query, for now.

* **Type**: object
* **Required**

### `tables.<table>.input.sql`

The query that produces the table's rows, over the dependencies' tables (`eth.blocks`) and the dataset's own (`self.other_table`). See [Derived Datasets](/datasets/derived-datasets).

* **Type**: string
* **Required**

```json
{
  "tables": {
    "usdc_transfers": {
      "input": {
        "sql": "SELECT block_num, tx_hash, log_index, data FROM eth.logs WHERE address = evm_encode_hex('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48')"
      }
    }
  }
}
```

### `tables.<table>.schema`

The table's columns, as described in [Table schemas](/datasets/manifest-reference#table-schemas).

* **Type**: object
* **Required**

### `tables.<table>.bloom_filter_columns` (Experimental)

The columns to write [bloom filters](/datasets/bloom-filters) for, which speed up queries that look up a value in them. None by default.

* **Type**: array of objects
* **Default**: `[]`

```json
{
  "tables": {
    "usdc_transfers": {
      "bloom_filter_columns": [
        {
          "column": "tx_hash",
          "ndv": 1000000
        }
      ]
    }
  }
}
```

### `tables.<table>.bloom_filter_columns[].column`

Column name to apply the bloom filter to.

* **Type**: string
* **Required**

```json
{
  "tables": {
    "usdc_transfers": {
      "bloom_filter_columns": [
        {
          "column": "tx_hash"
        }
      ]
    }
  }
}
```

### `tables.<table>.bloom_filter_columns[].ndv`

About how many distinct values the column holds, which sizes its bloom filter. Too low, and the filter skips fewer files; too high, and it takes more space.

* **Type**: integer
* **Default**: `10000`

```json
{
  "tables": {
    "usdc_transfers": {
      "bloom_filter_columns": [
        {
          "column": "tx_hash",
          "ndv": 1000000
        }
      ]
    }
  }
}
```

### `functions` (Experimental)

[JavaScript functions](/querying/functions/javascript) the tables' SQL can call, by name, like `self.toUpper(name)`.

* **Type**: object
* **Default**: `{}`

### `functions.<function>.inputTypes`

The [Arrow types](/datasets/manifests#data-types) of its arguments, one per argument, in order. Empty for a function without arguments.

* **Type**: array of strings
* **Required**

```json
{
  "functions": {
    "toUpper": {
      "inputTypes": ["Utf8"]
    }
  }
}
```

### `functions.<function>.outputType`

The [Arrow type](/datasets/manifests#data-types) of what it returns.

* **Type**: string
* **Required**

```json
{
  "functions": {
    "toUpper": {
      "outputType": "Utf8"
    }
  }
}
```

### `functions.<function>.source`

Its code.

* **Type**: object
* **Required**

### `functions.<function>.source.source`

JavaScript that declares a `function` with the same name as the function's key, like `function toUpper(s) { … }` for `toUpper`.

* **Type**: string
* **Required**

```json
{
  "functions": {
    "toUpper": {
      "source": {
        "source": "function toUpper(s) { return s.toUpperCase() }"
      }
    }
  }
}
```

### `functions.<function>.source.filename`

A file name for the code, which errors refer to.

* **Type**: string
* **Required**

```json
{
  "functions": {
    "toUpper": {
      "source": {
        "filename": "to_upper.js"
      }
    }
  }
}
```

## Static datasets (In development)

The manifest of a [static dataset](/datasets/static-datasets), whose tables are CSV files.

### `kind`

Always `"static"`.

* **Type**: string
* **Required**

```json
{
  "kind": "static"
}
```

### `tables`

The dataset's tables, by name.

* **Type**: object
* **Required**

### `tables.<table>.path`

Where the table's CSV file is: its first segment is a routing token, which picks the [static provider](/providers/static) that holds the file, and the rest is the file's path in that provider's storage. It's relative, uses `/`, and has at least two segments, the last a file name with an extension.

* **Type**: string
* **Required**

```json
{
  "tables": {
    "labels": {
      "path": "labels/eth_block_labels.csv"
    }
  }
}
```

### `tables.<table>.schema`

The table's columns, as described in [Table schemas](/datasets/manifest-reference#table-schemas).

* **Type**: object
* **Required**

### `tables.<table>.sorted_by`

The columns the file's rows are already sorted by, if any. Declaring them lets queries skip sorting again.

* **Type**: array of strings
* **Default**: none

```json
{
  "tables": {
    "labels": {
      "sorted_by": ["block_num"]
    }
  }
}
```

### `tables.<table>.has_header`

Whether the CSV file includes a header row.

* **Type**: boolean
* **Required**

```json
{
  "tables": {
    "labels": {
      "has_header": true
    }
  }
}
```

### `tables.<table>.format`

The file's format. Only CSV is supported.

* **Type**: string
* **Required**

```json
{
  "tables": {
    "labels": {
      "format": "csv"
    }
  }
}
```

## Table schemas

Each table's `schema` lists its columns, in every kind of manifest.

### `schema.arrow.fields`

The table's columns, in order. At least one.

* **Type**: array of objects
* **Required**

### `schema.arrow.fields[].name`

The column's name. In derived datasets, it must match the name the table's SQL gives the column.

* **Type**: string
* **Required**

```json
{
  "schema": {
    "arrow": {
      "fields": [
        {
          "name": "block_num",
          "type": "UInt64",
          "nullable": false
        }
      ]
    }
  }
}
```

### `schema.arrow.fields[].type`

The column's [Arrow type](/datasets/manifests#data-types). Simple types are strings, like `"UInt64"`; types with parameters are objects, like `{ "FixedSizeBinary": 32 }`.

* **Type**: string or object
* **Required**

```json
{
  "name": "hash",
  "type": {
    "FixedSizeBinary": 32
  },
  "nullable": false
}
```

### `schema.arrow.fields[].nullable`

Whether the column can be `NULL`.

* **Type**: boolean
* **Required**

```json
{
  "name": "base_fee_per_gas",
  "type": {
    "Decimal128": [38, 0]
  },
  "nullable": true
}
```
