sample_rows
Retrieve a reproducible random sample of rows from a table for quick data inspection and analysis.
Instructions
A reproducible random sample of n rows from a table (n is capped at max rows).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The statement as executed (after guard rewriting). | |
| rows | Yes | Row values, JSON-safe (dates as ISO strings). | |
| notes | No | ||
| columns | Yes | ||
| markdown | Yes | The same rows rendered as a Markdown table. | |
| row_count | Yes | Number of rows returned (after truncation). | |
| row_limit | Yes | Row cap that was applied, if any. | |
| truncated | Yes | True if more rows existed than were returned. | |
| elapsed_ms | Yes |