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

# Local files

> Read files on your machine by path.

Use local paths when the data is already on your machine. To reproduce the examples below, first download two demo files into a `demo` directory.

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

Path("demo").mkdir(exist_ok=True)
download_bucket_files(
    "chowderai/chowder-demo",
    [
        ("parquet/data/amazon-reviews/amazon-reviews-sample-train.parquet", "demo/amazon-reviews.parquet"),
        ("pdf/data/att-management-discussion-and-analysis-2020.pdf", "demo/att-management-discussion-and-analysis-2020.pdf"),
    ],
)
```

## Query the downloaded records

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
SELECT
    title,
    content
FROM read_parquet('demo/amazon-reviews.parquet')
WHERE content ILIKE '%battery%'
LIMIT 5;
```

## Query PDF pages locally

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
SELECT
    page_number,
    content,
    blocks
FROM read_documents('demo/att-management-discussion-and-analysis-2020.pdf')
WHERE page_number = 3;
```

Paths resolve from the working directory of the process. Absolute paths, globs, and directories work too. A directory passed to an explicit reader selects that reader's supported extensions.

## Use Python paths

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

relation = chowder.default_engine().read_parquet(Path("demo/amazon-reviews.parquet"))
result = relation.to_polars()

chowder.display(result)
```

This uses the reader API to pass a `Path` object directly.

The source location changes; the reader's schema and row grain stay the same. See [Hugging Face buckets](https://docs.chowder.ai/reference/sources/hugging-face-buckets.md) to query the hosted originals.


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