sample_rows
Pull a subset of rows from a loaded dataset using random, head, tail, or stratified sampling. Select specific columns to keep responses small and explore data quickly.
Instructions
Pull a sample from a loaded source.
modes: 'random' (USING SAMPLE), 'head', 'tail', 'stratified' (requires stratify_by).
`columns` scopes the projection — useful on wide sources (20+ cols) where
returning everything inflates the JSON response. Default returns all columns.
Output size: scales with n × columns; default ~5KB on a typical narrow source.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| mode | No | random | |
| columns | No | ||
| source_id | Yes | ||
| stratify_by | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||