export_rows
Export filtered or projected dataset rows to a CSV or JSON file for spreadsheet-friendly data retrieval and sharing.
Instructions
Export rows (optionally filtered and projected) to a CSV or JSON file.
Use this when the user wants their data back in a spreadsheet-friendly form. Filters use the same conditions syntax as search_rows. The id column is always included. Refuses to overwrite an existing file unless overwrite=true.
Args: dataset: Exact dataset name, e.g. "Candidates". file_path: Destination path for the .csv or .json file. format: "auto" (default, infers from extension), or force "csv"/"json". conditions: Optional filter, e.g. [{"column": "stage", "op": "eq", "value": "Applied"}]. columns: Optional column projection, e.g. ["name", "phone"]. overwrite: Allow replacing an existing file (default false).
Returns: {"ok": true, "dataset", "file": "", "format", "rows_exported": }.
Example: export_rows(dataset="Candidates", file_path="~/Documents/applied_august.csv", conditions=[{"column": "applied_on", "op": "between", "value": ["2026-08-01", "2026-08-31"]}])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | auto | |
| columns | No | ||
| dataset | Yes | ||
| file_path | Yes | ||
| overwrite | No | ||
| conditions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||