get_resource_schema
Retrieve column names, inferred data types, and sample values from a dataset file to understand its structure before running further analysis.
Instructions
Return column names, inferred types, and sample values for a resource.
Cheap reconnaissance step. Downloads file (up to 100 MB), opens it in DuckDB, and runs DESCRIBE + per-column DISTINCT sampling. Does NOT return raw rows. Use this before summarize_resource or aggregate_resource so the model knows column names and types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Direct URL to the file (CKAN resource 'url' field). | |
| format | Yes | Format declared in CKAN. Accepts: csv, tsv, xlsx, json. | |
| sample_rows | No | Distinct values per column to include as samples (1-1000). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| hint | No | ||
| source_url | No | ||
| format | No | ||
| cache | No | ||
| row_count | No | ||
| column_count | No | ||
| columns | No |