{% 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 %}
{# Spec 156 - origin chip in the header. Mirrors the Origin column
on /opportunities. Click filters the workspace to this origin. #}
{% if row.origin_tool and row.origin_tool != 'ad_hoc' %}
{{ row.origin_tool | replace('_', ' ') }}
{% endif %}
{% endcall %}
{# Spec 156 - Origin subsection. Shows the per-tool metadata
(looker_dashboard_id, fivetran_connector_id, airflow_dag_id, etc.)
when present. classifier_signal is rendered at the bottom for
audit-of-audit transparency. Only rendered when we have actual
metadata to show. #}
{% if row.origin_metadata and (row.origin_metadata.keys() | reject('equalto', 'classifier_signal') | list | length > 0) %}
{{ issue.row.explanation }}
{% if issue.rule_meta and issue.rule_meta.description %}{{ issue.rule_meta.description }}
{% endif %} {% if issue.template_result %}{{ issue.template_result.explanation }}
{% if issue.diff_lines %}Recommendations available below.
{% endif %} {% elif improvements %}Recommendations available below.
{% else %}No single-query SQL rewrite is available for this issue type. The fix is typically at the workload-scheduling, slot-reservation, or schema layer.
{% if layout_chip_targets %}Partition / cluster recommendations are available - see the chips above.
{% endif %} {% 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 %}