export_csv
Export query results from a Socrata dataset to a CSV file. Supports filtering, grouping, sorting, and spatial queries for Tableau-ready output.
Instructions
Export query results to a Tableau-ready CSV via streamed, paged download.
Accepts the same query parameters as query (structured or raw soql)
and writes matching rows to out_path. Designed to chain into vizforge's
csv_to_dashboard. Point/location values are serialized as JSON strings.
Args:
domain: Portal hostname, e.g. "data.seattle.gov".
dataset_id: Socrata 4x4 id, e.g. "tazs-3rd5".
out_path: Destination .csv path (parent directories are created).
select/where/group/order/limit/soql/within_circle/within_box: as in query.
max_rows: Safety cap for this export (default 1,000,000).
Returns: {path, rows_written, truncated, columns, notes}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| soql | No | ||
| group | No | ||
| limit | No | ||
| order | No | ||
| where | No | ||
| domain | Yes | ||
| select | No | ||
| max_rows | No | ||
| out_path | Yes | ||
| dataset_id | Yes | ||
| within_box | No | ||
| within_circle | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||