explain_metric_sql
Preview the SQL MetricFlow would run for a metric query, revealing computation logic and letting you assess warehouse costs before execution.
Instructions
Return the SQL MetricFlow would run for a query, without running it.
Args:
metrics: Metric names, comma-separated.
group_by: Dimensions to group by, comma-separated.
start_time: Inclusive ISO date lower bound on metric_time.
end_time: Inclusive ISO date upper bound on metric_time.
where: A MetricFlow filter expression.
Useful for showing a person how a metric is actually computed, and for
checking a query's cost before spending warehouse credits on it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | ||
| metrics | Yes | ||
| end_time | No | ||
| group_by | No | ||
| start_time | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||