> ## 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.

# Table functions

> Read multimodal data as SQL tables.

Table functions read documents, text, images, video, audio, and more as SQL tables. Use them in `FROM` like any other table. Each table function accepts a file, directory, glob, or remote URI. See [Sources](https://docs.chowder.ai/reference/sources/overview.md) for URI forms and authentication.

| Function | Reads | Row grain |
| - | - | - |
| [`read_documents`](https://docs.chowder.ai/reference/table-functions/read-documents) | PDF | Page |
| [`read_images`](https://docs.chowder.ai/reference/table-functions/read-images) | JPG, PNG, WebP, GIF, BMP, TIFF | Encoded image |
| [`read_videos`](https://docs.chowder.ai/reference/table-functions/read-videos) | MP4, MOV, MKV, WebM, AVI, M4V | Sampled time window |
| [`read_audio`](https://docs.chowder.ai/reference/table-functions/read-audio) | MP3, WAV, FLAC, M4A, AAC, OGG, OGA, Opus, WMA | Sampled time window |
| [`read_text`](https://docs.chowder.ai/reference/table-functions/read-text) | TXT, LOG | Line |
| [`read_json`](https://docs.chowder.ai/reference/table-functions/read-json) | Line-delimited JSON in `.json` or `.jsonl` files | JSON object |
| [`read_csv`](https://docs.chowder.ai/reference/table-functions/read-csv) | CSV | Record |
| [`read_parquet`](https://docs.chowder.ai/reference/table-functions/read-parquet) | Parquet | Row |
| [`read_mcap`](https://docs.chowder.ai/reference/table-functions/read-mcap) | MCAP | Message |

## Automatic reader selection

You can put a single-quoted file path or glob directly in `FROM`. Chowder selects the same reader from the extension and uses its default settings:

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
SELECT *
FROM 'hf://buckets/chowderai/chowder-demo/parquet/data/amazon-reviews/*.parquet'
LIMIT 5;
```

This is equivalent to:

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
SELECT *
FROM read_parquet('hf://buckets/chowderai/chowder-demo/parquet/data/amazon-reviews/*.parquet')
LIMIT 5;
```

Every format in the table above supports this syntax, with local paths and remote URIs. Reader selection uses the extension in the path or glob, such as `*.jpg`; it does not inspect the contents to guess a format. JSON files must be line-delimited, including files named `.json`.

Use an explicit reader when:

* The path has no recognized extension, such as a directory or `data/*`.
* You want one reader to select its supported files from a directory containing multiple formats.
* You need reader parameters, such as `read_videos('clips/*.mp4', 10)` for 10-second windows. The path shortcut uses the default 5-second audio and video windows.

A bare directory doesn't provide enough information to choose a reader.

See [Folders and globs](https://docs.chowder.ai/reference/sources/overview.md#folders-and-globs) for the CSV, JSON, and Parquet matching rules.

## Reuse a relation when source files change

For local and object-store sources, the first time you materialize a relation using `read_csv`, `read_json`, or `read_parquet`, it uses the file list and metadata Chowder collected when you called `sql()`. The relation keeps the column names, types, and file or directory selector that Chowder determined when you created it. Each subsequent materialization refreshes the file list and metadata. For Hugging Face sources, including buckets, Chowder resolves the file selection when you call `sql()`. Call `sql()` again to discover newly matching files.

Call `sql()` again to pick up a schema change or a source path that changed from a file to a directory or vice versa. Also call `sql()` again if the reader found no eligible, nonempty files when you created the relation. This can happen with an empty directory, an unmatched glob, or a zero-byte file.


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