export
Export large SQL query results or saved Metabase cards to CSV, JSON, or XLSX format. Automatically saves files to Downloads/Metabase folder, supporting up to 1 million rows of data.
Instructions
Unified command to export large SQL query results or saved cards using Metabase export endpoints (supports up to 1M rows). Returns data in specified format (CSV, JSON, or XLSX) and automatically saves to Downloads/Metabase folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | No | Database ID to export query from (SQL mode only) | |
| query | No | SQL query to execute and export (SQL mode only) | |
| card_id | No | ID of saved card to export (card mode only) | |
| native_parameters | No | Parameters for SQL template variables like {{variable_name}} (SQL mode only) | |
| card_parameters | No | Parameters for filtering card results before export (card mode only). Each parameter must follow Metabase format: {id: "uuid", slug: "param_name", target: ["dimension", ["template-tag", "param_name"]], type: "param_type", value: "param_value"} | |
| format | No | Export format: csv (text), json (structured data), or xlsx (Excel file) | csv |
| filename | No | Custom filename (without extension) for the saved file. If not provided, a timestamp-based name will be used. |