# connections

Manage data warehouse connections (BigQuery, Snowflake, Redshift, PostgreSQL, Databricks, …).

## `carto connections list`

List all connections.

```bash
carto connections list
```

## `carto connections get <connection-id>`

Get details for a specific connection.

```bash
carto connections get conn_xyz789
```

## `carto connections create <json-body>`

Create a new connection. The body's shape depends on the provider.

```bash
carto connections create '{
  "name": "my-snowflake",
  "type": "snowflake",
  "parameters": {
    "account": "myaccount",
    "warehouse": "compute_wh"
  }
}'
```

## `carto connections update <connection-id> <json-body>`

Update a connection.

```bash
carto connections update conn_xyz789 '{ "parameters": { "warehouse": "new_wh" } }'
```

## `carto connections delete <connection-id>`

Delete a connection.

```bash
carto connections delete conn_xyz789
```

## `carto connections browse <name> [path]`

Browse the resource tree exposed by a connection (databases, schemas, tables, tilesets). Useful for picking source paths when authoring maps or workflows without leaving the terminal.

```bash
# Top-level tree for a connection
carto connections browse carto_dw

# Drill into a specific subtree
carto connections browse carto_dw "carto-demo-data"
```

**Options:**

| Option               | Description                                                |
| -------------------- | ---------------------------------------------------------- |
| `--depth <n>`        | Max tree depth to expand (default: server default).        |
| `--max-items <n>`    | Max total items to return (default: server default of 30). |
| `--max-children <n>` | Max children per node (default: server default).           |

## `carto connections describe <name> <table-path>`

Get the schema and details for a single table on a connection (column names, types, partitioning, row count when available).

```bash
carto connections describe carto_dw "carto-demo-data.demo_tables.nyc_collisions"
```

## `carto connections search <name> <query>`

Free-text search across the tables and views reachable through a connection.

```bash
carto connections search my-conn "customers"
carto connections search my-conn "orders" --scope "mydb.public" --type table
```

**Options:**

| Option          | Description                                            |
| --------------- | ------------------------------------------------------ |
| `--type <kind>` | Filter by resource type: `table` or `view`.            |
| `--limit <n>`   | Max results, 1–100 (default: 20).                      |
| `--scope <fqn>` | Narrow the search to a subtree (e.g. `"mydb.public"`). |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.carto.com/carto-for-agents/cli/command-reference/connections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
