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

# Quickstart

> Run a Chowder SQL query.

## Install and run

**1. Install Chowder**

Install Chowder with [uv](https://docs.astral.sh/uv/getting-started/installation/) on macOS (Apple Silicon) or Linux (x86-64).

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
uv venv --python 3.12
source .venv/bin/activate
uv pip install chowder
```

See [Installation](https://docs.chowder.ai/installation.md) for requirements and other install options.

**2. Write the query**

Choose an example.

> [tab] Documents
>
> Read PDFs matching a glob as a table of parsed pages.
>
> ```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
> import chowder
>
> SQL = """
> SELECT *
> FROM read_documents('hf://buckets/chowderai/chowder-demo/pdf/data/*.pdf')
> LIMIT 5;
> """
>
> relation = chowder.sql(SQL)
> result = relation.to_polars()
>
> chowder.display(result)
> ```
>
> ![Parsed page 3 of AT\&T's 2020 financial review, with colored bounding boxes around headers, text, a revenue table, and list items](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/att-financial-review-page-03.webp?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=002dbd20e853e5ecb49300e44184129d)
>
> Example parsed page: page 3 of the AT\&T report with detected layout regions.

> [tab] Text
>
> Turn a support conversation into a typed resolution, sentiment, summary, and action items.
>
> ```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
> import chowder
>
> SQL = """
> SELECT
>     convo_id,
>     convo_transcript AS transcript,
>     infer(
>         convo_transcript,
>         'Analyze this customer support conversation.',
>         STRUCT<
>             resolution ENUM('resolved', 'unresolved', 'escalated'), -- Constrain the allowed labels
>             sentiment ENUM('positive', 'neutral', 'negative'),
>             summary TEXT,
>             action_items ARRAY<TEXT>
>         > -- Define the structured output schema
>     ).output AS analysis
> FROM 'hf://datasets/chowderai/cust-convo/train'
> WHERE convo_id = 21569;
> """
>
> relation = chowder.sql(SQL)
> result = relation.to_polars()
>
> chowder.display(result)
> ```
>
> Example output:
>
> | convo\_id | transcript | analysis |
> | - | - | - |
> | 21569 | Customer: Hello, I hope you can help me. I’ve been passed around to a few different teams already, and was told you’re the person to talk to about billing discrepancies.&#xA;&#xA;Agent: Hello! Thank you for reaching out, and I apologize for the transfers you've experienced. My name is Nicole, and I specialize in billing reconciliation. I’ll do everything I can to assist you today. Could you please provide your account ID or the email associated with your account, so I can pull up your details?&#xA;&#xA;Customer: Sure, my account ID is 4382941. I should mention I’m a little pressed for time—I just need to sort out a pricing issue with my invoice this month.&#xA;&#xA;Agent: Understood, and thank you for your patience. I’ve located your account, Dr. Porter. I see you are referencing invoice #7721 from June 1st, is that correct? Could you describe the specific pricing issue you noticed?&#xA;&#xA;Customer: That’s right, yes. I was charged \$65 more than usual for our premium supply kit this month. I didn’t receive any notice about a price increase, so I’d like to know why the cost jumped and if it can be reversed or credited.&#xA;&#xA;Agent: Thank you for the details. Let me review your recent invoices and check for any recorded notifications regarding pricing changes. One moment, please.&#xA;&#xA;Customer: Sure thing. By the way, thanks for looking into this so quickly.&#xA;&#xA;Agent: Of course, Dr. Porter! Your time is valuable, and I want to resolve this as efficiently as possible. Upon reviewing your account, I see a note indicating a tiered pricing adjustment for the premium supply kit, effective June 1st. However, I do not see a record confirming that this notice was sent to you. May I ask if you perhaps received any communication—email, letter, or text—about it?&#xA;&#xA;Customer: No, I combed through my inbox and didn’t see anything. That’s the frustrating part—I depend on those updates to plan my clinic’s expenses.&#xA;&#xA;Agent: I absolutely understand the importance of transparency for your budgeting, and I apologize for the oversight and inconvenience. Since the price increase notification does not appear to have reached you, I will escalate this for review as per our exceptions policy. Additionally, I’ll submit a request for a credit of the \$65 difference while this is resolved. Does that sound like a good approach for you?&#xA;&#xA;Customer: That sounds perfect, thank you. I can’t tell you how much I appreciate you actually listening. The previous reps kept telling me it wasn’t their department.&#xA;&#xA;Agent: Thank you for your patience and understanding! I’m documenting the escalation and initiating the credit request right now. While that’s processing, would you like me to enroll you for SMS notifications in addition to email, to help ensure you receive all future pricing updates?&#xA;&#xA;Customer: Yes, absolutely—let’s do that. I’d prefer to be over-informed at this point.&#xA;&#xA;Agent: Great! I’ll update your communication preferences to include SMS for all billing and product updates. Can you please confirm which mobile number you'd like us to use?&#xA;&#xA;Customer: Use my direct line: 555-482-9613.&#xA;&#xA;Agent: Thank you, I’ve added 555-482-9613 for future SMS notifications. You’ll receive a confirmation text shortly. Also, your credit request is lodged under case #BR10847, and I’m prioritizing it for same-day processing. You should see the adjustment within 24 hours.&#xA;&#xA;Customer: That’s excellent news, thanks Nicole. Will that refund appear as a credit on next month’s invoice, or will it come back to our card?&#xA;&#xA;Agent: Good question! By default, the \$65 will appear as a credit toward your next month’s invoice, but if you’d prefer it refunded back to your payment card, just let me know and I can update the request accordingly.&#xA;&#xA;Customer: Let’s keep it as an invoice credit. That makes accounting simpler on my end.&#xA;&#xA;Agent: Absolutely, that’s noted. The credit will be reflected as a line item on July's invoice, with a clear description for your records.&#xA;&#xA;Customer: You’re making this much easier than I was expecting. While I have you—can you confirm there aren’t any other upcoming price changes in my subscription?&#xA;&#xA;Agent: I’m glad I can help! I’ve reviewed your account’s contract and upcoming notifications. Aside from the change to the premium supply kit which we’ve already discussed, there are no scheduled price adjustments for your other services through at least the next quarter. I’ll also send you a downloadable rate sheet with current prices for all your active products and services.&#xA;&#xA;Customer: That’s exactly what I needed. Could you send that by email?&#xA;&#xA;Agent: Definitely. I’ll send the comprehensive rate sheet PDF to your registered email, [rporter@sumhealth.net](mailto:rporter@sumhealth.net), within the next five minutes. Would you like a copy sent via SMS for quick reference too?&#xA;&#xA;Customer: No need for SMS for this one, but thanks. Email is perfect.&#xA;&#xA;Agent: Perfect, I’ll send it right over. Could I also verify the preferred billing contact details, just to ensure any future communications reach you or your team without delay?&#xA;&#xA;Customer: Sure. Primary contact is still me, secondary is our office manager, Lisa Green ([lisa@sumhealth.net](mailto:lisa@sumhealth.net)).&#xA;&#xA;Agent: Thank you, Dr. Porter. I’ve confirmed those contacts. For transparency, I'll also set both you and Lisa to receive high-priority notices, such as pricing changes, to prevent any missed messages going forward. Is that okay?&#xA;&#xA;Customer: That works for us. I’ll let Lisa know to keep an eye out.&#xA;&#xA;Agent: Excellent. Just to recap, here’s what we’ve handled today: I’ve initiated a \$65 credit for your June invoice in light of the missed pricing notice, updated your notification preferences to include SMS, verified your billing contacts, and I’m sending an updated rate sheet for your reference. Is there anything else I can take care of?&#xA;&#xA;Customer: That covers all my concerns for today. Thanks for being thorough, Nicole. I really do appreciate it.&#xA;&#xA;Agent: My pleasure, Dr. Porter. Before we finish, would you like a copy of this chat transcript for your records?&#xA;&#xA;Customer: Yes, that would be great.&#xA;&#xA;Agent: Absolutely—I’ll email you a copy of the chat transcript along with the rate sheet, both as PDF attachments, to [rporter@sumhealth.net](mailto:rporter@sumhealth.net). Is there a preferred subject line or do you want me to include a brief summary as well?&#xA;&#xA;Customer: Just the standard subject is fine. No summary needed.&#xA;&#xA;Agent: Understood. You’ll receive both documents with the subject: “SumHealth Support – Billing Inquiry #BR10847”. If you have any further questions or need urgent assistance, you can reply directly to that email or text our support line.&#xA;&#xA;Customer: Perfect. Thanks again, Nicole. You’ve saved me a bunch of hassle today.&#xA;&#xA;Agent: Thank you for your kind words! Before you go, do you mind completing a quick two-question satisfaction survey I’ll send via SMS? It helps us improve our service.&#xA;&#xA;Customer: Not a problem—send it over, I can spare another minute.&#xA;&#xA;Agent: Wonderful! The survey will arrive within a minute from the number 893-99. Your feedback is greatly appreciated.&#xA;&#xA;Customer: Got it! I just received it, actually. Filled it out—gave you high marks for being so efficient.&#xA;&#xA;Agent: Thank you so much, Dr. Porter! That truly means a lot, and I’m glad you were pleased with the support today. If you ever need assistance in the future, you can request me by name.&#xA;&#xA;Customer: That’s good to know. I hope I don’t have to reach out again anytime soon, but at least I know who to ask for!&#xA;&#xA;Agent: Absolutely—hopefully next time it’s under more positive circumstances. Have a great rest of your day and best wishes to your team at SumHealth Clinic!&#xA;&#xA;Customer: You too, Nicole. Take care!&#xA;&#xA;Agent: Take care, Dr. Porter. If you think of anything else, just let us know. Goodbye!&#xA;&#xA;Customer: Actually, before I sign off—I just realized, could you confirm that last payment I made on May 28th was applied correctly? I noticed it posted one day late.&#xA;&#xA;Agent: Certainly, let me review the payment records. One moment… Yes, I see your payment of \$495.00 posted on May 28th, but our system reconciled it on May 29th due to a processing delay over the holiday weekend. Rest assured, there were no late fees or penalties assessed, and your account remains in good standing.&#xA;&#xA;Customer: That’s a relief. I was worried I might get dinged for late payment. Thanks for checking.&#xA;&#xA;Agent: You’re welcome. I completely understand why you’d want to verify, and I’m glad I could provide clarity. Is there anything else you’d like me to double-check while you have me?&#xA;&#xA;Customer: No, I feel much better now with all this squared away. Have a productive afternoon!&#xA;&#xA;Agent: Thank you, Dr. Porter! Here if you need me, any time. Goodbye for now.&#xA;&#xA;Customer: Bye!&#xA;&#xA;Agent: Goodbye! | \{&#xA;    "resolution": "resolved",&#xA;    "sentiment": "positive",&#xA;    "summary": "Customer successfully resolved billing discrepancies regarding a missed pricing notification and an invoice credit. The agent escalated the issue, initiated a credit, updated communication preferences, verified billing contacts, and sent documentation. Additionally, the agent confirmed the payment of \$495.00 was applied correctly despite a system reconciliation delay, alleviating customer concerns about late fees.",&#xA;    "action\_items": \[&#xA;        "Initiate \$65 credit for June invoice",&#xA;        "Update notification preferences to include SMS",&#xA;        "Verify billing contacts (primary and secondary)",&#xA;        "Send comprehensive rate sheet PDF",&#xA;        "Confirm payment of \$495.00 was applied correctly",&#xA;        "Send chat transcript and rate sheet PDFs to customer",&#xA;        "Send satisfaction survey via SMS",&#xA;        "Verify payment of \$495.00 was applied correctly"&#xA;    ]&#xA;} |

> [tab] Images
>
> Turn product photos into typed fields with a schema you define.
>
> ```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
> import chowder
>
> SQL = """
> SELECT
>     source,
>     image,
>     infer(
>         image,
>         'Describe this cup: its main color, material, and whether it has a handle.',
>         STRUCT<
>             color TEXT,
>             material TEXT,
>             has_handle BOOL
>         > -- Define the structured output schema
>     ).output AS product
> FROM read_images('hf://buckets/chowderai/chowder-demo/image/data/amazon-products/drinking-cup/*.jpg')
> LIMIT 3;
> """
>
> relation = chowder.sql(SQL)
> result = relation.to_polars()
>
> chowder.display(result)
> ```
>
> Example output:
>
> | source | image | product |
> | - | - | - |
> | hf://buckets/chowderai/chowder-demo/image/data/amazon-products/drinking-cup/365-everyday-value-plastic-cups-9-fl-oz-20-c-b074mfdr4w\.jpg | ![Product photo of 365 Everyday Value plastic cups](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/drinking-cup-01.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=84048ce0b25a64efa13aeb4ca9ad3d7b) | \{&#xA;    "color": "white",&#xA;    "material": "plastic",&#xA;    "has\_handle": false&#xA;} |
>
> [Attribution: Amazon Berkeley Objects · CC BY 4.0](https://huggingface.co/buckets/chowderai/chowder-demo/tree/image/README.md)

> [tab] Video
>
> Read sampled video frames and timestamped speech together.
>
> ```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
> import chowder
>
> SQL = """
> SELECT
>     start_s,
>     end_s,
>     image, -- First video frame within this window
>     transcript -- Speech segments starting within this window
> FROM read_videos('hf://buckets/chowderai/chowder-demo/video/data/steve-jobs-on-passion.mp4')
> LIMIT 3;
> """
>
> relation = chowder.sql(SQL)
> result = relation.to_polars()
>
> chowder.display(result)
> ```
>
> Example output:
>
> | start\_s | end\_s | image | transcript |
> | - | - | - | - |
> | 0.0 | 5.0 | ![Sampled video frame from window 1](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/video-frame-01.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=ffc986f48e4ffa1ca4fd4f3d270c2f12) | \[&#xA;    \{&#xA;        "start\_s": 0.0,&#xA;        "end\_s": 8.88,&#xA;        "text": "I'm wondering what would be the single most valuable piece of advice you'd give us to"&#xA;    }&#xA;] |
> | 5.0 | 10.0 | ![Sampled video frame from window 2](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/video-frame-02.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=0c9272bccbd13dbcf5c9da8b88205654) | \[&#xA;    \{&#xA;        "start\_s": 8.88,&#xA;        "end\_s": 14.68,&#xA;        "text": "even attempt to create some of the value that you guys have done in both your very impressive"&#xA;    }&#xA;] |
> | 10.0 | 15.0 | ![Sampled video frame from window 3](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/video-frame-03.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=215c9c70ec93127892090d9b3fbde3ff) | \[&#xA;    \{&#xA;        "start\_s": 14.68,&#xA;        "end\_s": 16.44,&#xA;        "text": "companies."&#xA;    }&#xA;] |
>
> [Attribution: Steve Jobs about Passion by Impetos · CC BY 4.0](https://huggingface.co/buckets/chowderai/chowder-demo/tree/video/README.md)

> [tab] Audio
>
> Transcribe an audio file into time windows with timestamped speech segments.
>
> ```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
> import chowder
>
> SQL = """
> SELECT
>     start_s,
>     end_s,
>     transcript
> FROM read_audio('hf://buckets/chowderai/chowder-demo/audio/data/steve-jobs-on-passion.mp3')
> LIMIT 3;
> """
>
> relation = chowder.sql(SQL)
> result = relation.to_polars()
>
> chowder.display(result)
> ```
>
> Example output:
>
> | start\_s | end\_s | transcript |
> | - | - | - |
> | 0.0 | 5.0 | \[&#xA;    \{&#xA;        "start\_s": 0.0,&#xA;        "end\_s": 8.88,&#xA;        "text": "I'm wondering what would be the single most valuable piece of advice you'd give us to"&#xA;    }&#xA;] |
> | 5.0 | 10.0 | \[&#xA;    \{&#xA;        "start\_s": 8.88,&#xA;        "end\_s": 14.68,&#xA;        "text": "even attempt to create some of the value that you guys have done in both your very impressive"&#xA;    }&#xA;] |
> | 10.0 | 15.0 | \[&#xA;    \{&#xA;        "start\_s": 14.68,&#xA;        "end\_s": 16.44,&#xA;        "text": "companies."&#xA;    }&#xA;] |

> [tab] MCAP
>
> Read camera images, topics, and timestamps directly from an MCAP recording.
>
> ```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
> import chowder
>
> SQL = """
> SELECT
>     log_time,
>     topic,
>     image, -- Camera image decoded from the MCAP message
>     width,
>     height
> FROM read_mcap('hf://buckets/chowderai/chowder-demo/mcap/data/road-spray-car-following.mcap')
> WHERE topic = '/camera/image'
> AND image IS NOT NULL
> LIMIT 5;
> """
>
> relation = chowder.sql(SQL)
> result = relation.to_polars()
>
> chowder.display(result)
> ```
>
> Example output:
>
> | log\_time | topic | image | width | height |
> | - | - | - | - | - |
> | 2021-09-08T11:40:49+00:00 | /camera/image | ![RoadSpray camera frame 1, following a car on a wet road](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/mcap-frame-01.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=bf4fd5a8be556700df96d953d0b37f58) | 2048 | 1088 |
> | 2021-09-08T11:40:49.100000+00:00 | /camera/image | ![RoadSpray camera frame 2, following a car on a wet road](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/mcap-frame-02.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=195e91968d097fe58f1ec3794e28036a) | 2048 | 1088 |
> | 2021-09-08T11:40:49.200000+00:00 | /camera/image | ![RoadSpray camera frame 3, following a car on a wet road](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/mcap-frame-03.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=cffad5e7c9814e496a4fbc8d18e03dca) | 2048 | 1088 |
> | 2021-09-08T11:40:50.500000+00:00 | /camera/image | ![RoadSpray camera frame 4, following a car on a wet road](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/mcap-frame-04.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=91d1523f89f409f3a0bb2ed00d426ba9) | 2048 | 1088 |
> | 2021-09-08T11:40:50.600000+00:00 | /camera/image | ![RoadSpray camera frame 5, following a car on a wet road](https://mintcdn.com/chowder/Z6iDzrdaRqHAKNw3/images/examples/mcap-frame-05.jpg?fit=max\&auto=format\&n=Z6iDzrdaRqHAKNw3\&q=85\&s=89a597c6161eea5a107d1b88cf30fdf5) | 2048 | 1088 |
>
> [Attribution: RoadSpray / SemanticSpray++ · CC BY 4.0](https://huggingface.co/buckets/chowderai/chowder-demo/tree/mcap/README.md)

Each example reads a source into rows with a table function, and some also run `infer` over a column. See [Table functions](https://docs.chowder.ai/reference/table-functions/overview.md) for supported formats and automatic reader selection, and [Column functions](https://docs.chowder.ai/reference/column-functions/overview.md) for `infer`, `embed`, and the other functions you can call on each row.

**3. Run and inspect**

Run the example. `chowder.sql(SQL)` creates an executable query plan, and `to_polars()` executes it and materializes a Polars DataFrame. Model predictions can vary.

These calls reuse Chowder’s shared default engine, which runs locally unless remote compute has been enabled. On first use, Chowder downloads the models each operation needs, up to a few GB, into `~/.cache/chowder/models`. Later queries reuse them. To offload analytical inference to dedicated GPUs, use [Chowder Cloud](https://docs.chowder.ai/cloud/quickstart.md).

## Work with the result

`result` is a Polars DataFrame you can filter or export. In a notebook, [`chowder.display(result)`](https://docs.chowder.ai/reference/python-api#inspect-query-results-in-a-notebook) renders nested structs, arrays, and supported image columns. In a terminal script, use `print(result)` instead.

For large results, stream Arrow record batches instead of collecting the entire table:

```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
for batch in relation:
    print(batch.num_rows)
```

See [Python API](https://docs.chowder.ai/reference/python-api.md) for more details.

## Command line

The installation includes the `chowder` command. Run SQL from a query, file, or piped input:

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
chowder sql "SELECT 42 AS answer"
chowder sql --file query.sql --format jsonl
echo 'SELECT 42 AS answer' | chowder sql
```

See [CLI](https://docs.chowder.ai/guides/cli.md) for more details.

## Local MCP server

Add Chowder to your MCP client's configuration:

```json theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
{
  "mcpServers": {
    "chowder": {
      "command": "chowder",
      "args": ["mcp"]
    }
  }
}
```

The Chowder MCP `query` tool lets your AI agent run SQL using your local filesystem access and credentials.

See [Local MCP server](https://docs.chowder.ai/guides/mcp.md) for more details.

## Offload analytical inference to Chowder Cloud

Keep the same SQL and run its AI processing on dedicated GPUs. SQL planning, relational execution, and result caching stay in your application.

See [Cloud quickstart](https://docs.chowder.ai/cloud/quickstart.md) to get started.

## Configure an engine

Create your own engine to set options or control its lifetime:

```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
import chowder

SQL = """
SELECT 42 AS answer
"""

engine = chowder.Engine(remote=False)

relation = engine.sql(SQL)
result = relation.to_polars()

chowder.display(result)
engine.close()
```

`remote=False` keeps AI processing on your machine. To use remote compute, set `CHOWDER_API_URL` to your endpoint. If you set `CHOWDER_REMOTE=1`, omit the `remote` argument and use `chowder.Engine()`. To opt in for one engine from Python, use `chowder.Engine(remote=True)`.

See [Connect to remote AI compute](https://docs.chowder.ai/guides/remote-compute.md) and [Python API](https://docs.chowder.ai/reference/python-api.md#engine) for more details.

To close the engine automatically, use a `with` block. The engine closes even if an exception occurs:

```python theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
with chowder.Engine(remote=False) as engine:
    relation = engine.sql(SQL)
    result = relation.to_polars()

    chowder.display(result)
```

See [automatic cleanup](https://docs.chowder.ai/reference/python-api.md#automatic-cleanup) for more details.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.