cja_validate_calculated_metric
Validate a calculated metric definition for syntax and data view compatibility before creating or updating. Prevents errors by ensuring correctness.
Instructions
Validate a calculated metric definition before creating or updating.
Check if a calculated metric definition is syntactically correct and compatible with the data view. Always use this before creating a new metric.
Args: name: Metric name for validation (required). definition: Metric definition to validate (required). metric_type: Type: 'decimal', 'percent', 'currency', or 'time' (default 'decimal'). description: Optional metric description for validation. dataview_id: Optional data view ID to validate against (uses configured default if not provided).
Returns: Dictionary with validation result, metrics used, and functions detected.
Example queries: - "Validate this calculated metric definition before I create it" - "Check if this metric formula is valid" - "Is this calculated metric definition compatible?"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| definition | Yes | ||
| metric_type | No | decimal | |
| description | No | ||
| dataview_id | No |