> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# anaconda ai create-table

## Usage

```bash theme={null}
anaconda ai create-table <TABLE> <SCHEMA> [OPTIONS]
```

Comments

Replace \<TABLE> with the name of the table to create.\\

Replace \<SCHEMA> with a JSON string defining the table schema.

## Description

Creates a new table in the vector database with the specified schema. Only works with the `anaconda-desktop` backend.

## Arguments

Argument

Default

Description

`TABLE`

Name of the table to create (positional, required)

`SCHEMA`

JSON string defining the table schema (positional, required)

## Options

Option

Default

Description

`--json`

`false`

Print output as JSON

`-h, --help`

Show help for this command

### Schema format

The schema argument is a JSON string with the following structure:

```json theme={null}
{
  "columns": [
    {
      "name": "column_name",
      "type": "type_name",
      "constraints": ["constraint1", "constraint2"]
    }
  ]
}
```

Each column requires a `name` and `type`. The `constraints` field is optional and accepts a list of SQL constraint strings.

## Examples

**Create a table with an ID and embedding column**

```bash theme={null}
anaconda ai create-table my_table '{"columns": [{"name": "id", "type": "serial", "constraints": ["PRIMARY KEY"]}, {"name": "embedding", "type": "vector(384)"}]}'
```
