process_data
Run DuckDB SQL queries to clean, transform, and feature-engineer datasets, then save results to CSV, Parquet, or JSON for AutoML.
Instructions
Execute a DuckDB SQL query to transform data and save it to a new file.
CRITICAL: This is your PRIMARY tool for Feature Engineering and Data Cleaning.
- Use this to create new features, clean dirty data, handle missing values (COALESCE), or join datasets.
- You MUST use this tool to prepare the data before training if feature engineering is needed.
- Example: "SELECT *, price/sqft as price_per_sqft, COALESCE(garage, 0) as garage_clean FROM 'train.csv'"
IMPORTANT: Strongly RECOMMEND using '.parquet' extension for output_path (e.g. 'clean_data.parquet').
- Parquet preserves data types (int, float, string, date) much better than CSV.
- CSV often loses type information (everything becomes string or inferred incorrectly).
- NOTE: Please use absolute paths for files in your query and for output_path to avoid path resolution errors.
Args:
query: Standard DuckDB SQL query.
output_path: Absolute path to save the result (must be .csv, .parquet, or .json).
Returns:
Confirmation message with the output path.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>",
"output_path": "<output_path>"
},
"name": "process_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |