{% if _dataset %}{{ _dataset }}.{% endif %}{{ row.dbt_model_name or _table }}{% endset %}
{% call header_card(_title) %}
{% if row.dbt_model_name %}
dbt
{% endif %}
{% if row.author_email %}
{{ row.author_email }}
{% endif %}
{% endcall %}
{# Six-card stat strip - aggregated lifetime metrics on the left
half, last-execution snapshot on the right half. Lives outside
the ``ui-surface`` header so the cards read as a standalone strip
(mirrors the dashboard's cost-summary row). ``grid-cols-6`` isn't
in the pre-compiled Tailwind bundle (same constraint as
``_cost_summary.html``), so we inline the 6-column rule below
the xl breakpoint and rely on Tailwind's built-in 1/2/3 cols at
smaller widths. #}
{% from "components/_stat_card.html" import stat_card %}
{%- set _exec_meta = ("across " ~ row.execution_count ~ " executions") if (row.execution_count and row.execution_count > 1) else None -%}
{{ issue.row.explanation }}
{% if issue.rule_meta and issue.rule_meta.description %}{{ issue.rule_meta.description }}
{% endif %}{{ issue.template_result.explanation }}
{% if issue.diff_lines %}SQL diff in Available improvements below.
{% endif %} {% elif improvements %}See Available improvements below for the SQL-rewrite catalogue.
{% else %}This issue type doesn't have a single-query SQL rewrite. The fix is at the workload-scheduling or schema layer.
{% endif %}{{ imp.explanation }}
{% endif %} {% if imp.diff_lines or imp.before_content %}No diff available - template did not produce a change.
{% endif %}{{ imp.rollback }}
{% for line in job.query.split('\n') %}{{ loop.index }}{{ line }}
{% endfor %}