|
{% if col_key in ('cost', 'savings', 'status') %}
{% if col_key == 'cost' %}
Cost from the most recent BigQuery job execution, dry-run estimate, or detection heuristic.
{% elif col_key == 'savings' %}
Estimated per-run savings from solution dry-runs or detection heuristics.
{% else %}
{% if local_runtime_mode %}
Active = detected, open for action. Pending Verification = local change linked or under evaluation. Resolved = confirmed fixed.
{% else %}
Active = detected, open for action. PR Pending = fix submitted. Clearing = fix merged, verifying savings. Resolved = confirmed fixed.
{% endif %}
{% endif %}
{{ col_label }}
{% else %}
{{ col_label }}
{% endif %}
|
{% endfor %}
Safe = low risk, apply directly. Review = check changes first. High risk = may affect downstream queries. Upstream fix = covered by another model's solution. Failed = generation error. Awaiting = not yet started.
Solution
|
||||||||
|---|---|---|---|---|---|---|---|---|---|
| {{ opp.project_name }} | {{ opp.dbt_model_name if opp.dbt_model_name else (opp.affected_table.split('.')[-1] if '.' in opp.affected_table else opp.affected_table) }} | {{ opp.opportunity_type | replace('_', ' ') }} | {% if opp.query_workload_kind == 'build' %} Build {% elif opp.query_workload_kind == 'consumption' %} Consumption {% elif local_runtime_mode %} Unclassified {% else %} Query {% endif %} | {% if opp.query_cost_value is not none %} {{ opp.query_cost_value | format_usd }} {% else %} — {% endif %} | {% if opp.solution_job_status in ('queued', 'in_progress') %} Generating {% elif opp.possible_savings_value is not none %} ~{{ opp.possible_savings_value | format_usd }} ↓ {% elif opp.optimized_cost_value is not none %} {{ opp.optimized_cost_value | format_usd }} {% if opp.optimized_delta_direction == 'down' %} ↓ {% elif opp.optimized_delta_direction == 'up' %} ↑ {% endif %} {% else %} — {% endif %} | {% if local_runtime_mode and opp.status == 'pr_pending' %} Local Change Pending {% elif local_runtime_mode and opp.status == 'clearing' %} Pending Verification {% elif opp.status == 'pr_pending' %} PR Pending {% elif opp.status == 'active' %} Active {% elif opp.status == 'clearing' %} Clearing {% else %} Resolved {% endif %} | {{ opp.occurrence_count }} | {{ opp.last_detected_at.strftime("%d/%m/%Y") if opp.last_detected_at else (opp.created_at.strftime("%d/%m/%Y") if opp.created_at else "—") }} | {% set rs = opp.recommendation_state %} {% if opp.solution_risk_level == 'low' %} Safe {% elif opp.solution_risk_level == 'medium' %} Review {% elif opp.solution_risk_level == 'high' %} High risk {% elif rs and rs.key == 'generating' %} Generating {% elif rs and rs.key == 'upstream_fix' %} Upstream fix {% elif rs and rs.key == 'failed' %} Failed {% else %} Awaiting {% endif %} |
No opportunities match your filters
{% endif %}