export_query
Execute a SQL SELECT query and export results to a CSV or JSON file, automatically adding a timestamp to prevent overwrites, returning the local file path.
Instructions
执行查询并把结果导出为 CSV 或 JSON 文件,返回本地文件路径。
Parameters: sql: SELECT 语句 filename: 文件名(不含扩展名),自动加时间戳避免覆盖 format: csv / json database: 数据库 params: 参数列表
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| format | No | csv | |
| params | No | ||
| database | No | ||
| filename | Yes |