{# Audit cost-summary cards — vendored from governor_web/templates/dashboard/_cost_summary.html @ 19455c57c5a9. Same Total / Build / Consumption / fourth-card layout. Audit's fourth card is "Flagged Spend" (cost touched by detection rules) instead of cloud's Storage Monthly. The Opportunities count moves into the Active Issues pane below — no need for a dedicated card. #}
{# Total Spend #}

Total Spend

{{ totals.total_cost_usd | format_usd }}

across {{ "{:,}".format(totals.total_jobs) }} job{{ "s" if totals.total_jobs != 1 else "" }}

{# Build Spend — dbt-originated CTAS / MERGE / INSERT / UPDATE / DELETE #}

Build Spend

{{ totals.build_spend | format_usd }}

{% if totals.total_cost_usd and totals.build_spend %}

{{ "%.0f" | format(totals.build_spend / totals.total_cost_usd * 100) }}% of cached spend

{% else %}

dbt-originated writes

{% endif %}
{# Consumption Spend — non-dbt SELECT (BI tools, ad-hoc analysts) #}

Consumption Spend

{{ totals.consumption_spend | format_usd }}

{% if totals.total_cost_usd and totals.consumption_spend %}

{{ "%.0f" | format(totals.consumption_spend / totals.total_cost_usd * 100) }}% of cached spend

{% else %}

non-dbt readers

{% endif %}
{# Flagged Spend — measured cost of jobs touched by ≥1 detection rule. #}

Flagged Spend

{{ (totals.flagged_spend | default(0)) | format_usd }}

{% if totals.total_cost_usd and totals.flagged_spend %}

{{ "%.0f" | format(totals.flagged_spend / totals.total_cost_usd * 100) }}% of cached spend

{% else %}

spend on flagged jobs

{% endif %}