estimate_query_cost
Estimate the cost of a SQL query before running it to avoid unexpected warehouse charges. Check the accuracy tier before trusting the estimate for BigQuery, Snowflake, or Databricks.
Instructions
Estimate the cost of a SQL query before running it. ALWAYS call this before running an expensive-looking query. The response's accuracy_tier tells you how much to trust the number: PRECISE (exact), UPPER_BOUND (real cap, may overstate), HEURISTIC (rough).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| engine | Yes | ||
| warehouse | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engine | Yes | ||
| caveats | No | ||
| currency | No | USD | |
| accuracy_tier | Yes | ||
| estimated_bytes | No | ||
| estimated_cost_usd | No |