Profile a datasource (stats + sample rows)
profile_datasourceProfile a datasource to get column statistics including type, non-null counts, distinct values, and min/max, plus sample rows to verify column names and values for designing filters and charts.
Instructions
Sample a datasource and return per-column statistics — inferred type, non-null/empty counts, distinct value count, sample distinct values for categoricals, and min/max for numerics — PLUS raw sample rows (sample.columns + sample.rows) so you see real column names and literal values in the same call. Exactly what you need to design filters, choose chart dimensions, pick aggregations, and match a block's column constants to reality. Profiles over a sample (default 500 rows); sample_rows caps the raw rows returned (default 10, 0 for stats only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sample_rows | No | Raw rows to return alongside the stats (default 10, max 50, 0 = none). | |
| sample_size | No | Rows to sample for the profile (default 500, max 5000). | |
| distinct_cap | No | Stop counting distinct values past this many per column (default 100). | |
| datasource_id | Yes | Datasource UUID. |