> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent-mintlify-f21cea86.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Q&A

> Ask natural-language questions about CSV, JSON, TSV, YAML, XML, Parquet, Excel, and SQL dump files — single files or entire folders.

Ask questions about local data files: row counts, totals, top values, summaries, and more. Query a single file, an entire folder, or only specific formats.

## Natural language

```bash theme={null}
arka ask data users.csv "how many rows?"
arka ask data ./data/ "what is total revenue?"
arka data_ask reports/ "summarize all files"
arka data_ask folder ./exports --question "how many records total?"
arka analyze csv files in data/ "top 10 products"
arka query_data sales.json "what is total revenue by category?"
```

## CLI commands

| Command | Description |
| - | - |
| `arka data_ask users.csv "how many rows?"` | Ask a question about a file |
| `arka data_ask ./data/ --format csv "average salary?"` | Query only CSV files in a folder |
| `arka data_ask ./reports/ --formats csv,json "list all columns"` | Filter by multiple formats |
| `arka data_ask folder ./exports --question "how many records total?"` | Explicit folder mode |
| `ask_data sales.json "total by category"` | Alias for `data_ask` |
| `arka query_data report.tsv` | Summarize when no question is given |
| `arka analyze_data data.jsonl "top 5 products"` | Alias for `data_ask` |

## View CSV as a colored table

For **display** (not Q\&A), use `view_data` — inspired by tools like `csvlook` / pretty printers:

```bash theme={null}
arka view_data papers.csv
arka view_csv papers.csv --plain
arka show csv papers.csv as json
cat data.tsv | view_data --formats csv,yaml
```

Colored columns print in the terminal; optional `--formats` writes exports under `~/arka-generated/` (override with `DATA_OUTPUT_DIR`). Analytic questions still route to `data_ask`.

## Supported formats

`csv`, `json`, `jsonl`, `tsv`, `yaml`, `yml`, `xml`, `parquet`, `xlsx`, `xls`, `sql`

Optional dependencies for richer parsing:

| Format | Package |
| - | - |
| Parquet | `pyarrow` or `pandas` |
| Excel (xlsx) | `openpyxl` or `pandas` |
| YAML | `pyyaml` |

Without pandas, tabular files still load via the Python standard library (`csv`, `json`).

## Folders and format filters

When the path is a directory, Arka discovers data files by extension (non-recursive, top level only). Use `--format` or `--formats` to limit which types are loaded.

Large folders are capped for context size:

* Up to **5 files** per query
* Up to **500 rows** total across loaded files
* Per-file samples and column statistics when files are larger

## How it works

1. Detects file format(s) from extension(s), optionally filtered by `--format`
2. Loads rows from one or more files (sample + stats when truncated)
3. Sends structured context to the LLM with your question
4. Prints the answer in the terminal

This skill is for **querying existing files**. To create fake sample datasets, use [Generate data](/guides/generate-data).

## Examples

```bash theme={null}
arka data_ask ~/Downloads/orders.csv "what are the top 3 products by quantity?"
arka data_ask ./data/ --format csv "average salary?"
arka query_data metrics.jsonl "average latency by region"
arka analyze_data inventory.parquet
arka data_ask reports/ "summarize all files"
```


## Related topics

- [Personalize your Arka experience](/guides/personalize.md)
- [AI agent guide — use Arka over MCP](/guides/ai-agents.md)
- [Chat, web search, and factual Q&A skills](/guides/chat.md)
- [Generate data](/guides/generate-data.md)
- [Skills catalog: 70+ built-in Arka commands](/guides/skills.md)


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