Evidence
{{ issue.evidence_text }}
Action
{{ issue.action_text }}
Impact
{{ issue.impact_text }}
{% if _dataset %}{{ _dataset }}.{% endif %}{{ row.dbt_model_name or _table }}{% endset %}
{% call header_card(_title) %}
{# Build vs consumption - same classification the dashboard uses
(build = writes a destination; consumption = read-only). Makes it
explicit on the detail page which kind of workload this is. #}
{% if row.query_workload_kind == 'build' %}
{{ signal_chip("Build", color="brand", title="Build - this query writes a destination table") }}
{% elif row.query_workload_kind == 'consumption' %}
{{ signal_chip("Consumption", color="teal", title="Consumption - read-only query, no destination written") }}
{% endif %}
{% if issue_cards %}
{% for issue in issue_cards[:3] %}
{{ signal_chip(issue.display_name, color="rose", title="Issue found on this object") }}
{% endfor %}
{% if issue_cards | length > 3 %}
{{ signal_chip("issues", color="rose", overflow=("+" ~ (issue_cards | length - 3)), title="More issue rules found on this object") }}
{% endif %}
{% endif %}
{% if row.dbt_model_name %}
dbt
{% endif %}
{% if row.author_email %}
{% set _author_label %}{{ row.author_email }}{% endset %}
{{ signal_chip(_author_label, color="slate") }}
{% endif %}
{# Spec 156 - origin chip in the header. Mirrors the Origin column
on /opportunities. Click filters the workspace to this origin.
Suppress it when it would just duplicate the green "dbt" marker
above (origin 'dbt' on a dbt model) - keep it for Looker / Hex /
Fivetran / etc. where it adds information. #}
{% if row.origin_tool and row.origin_tool != 'ad_hoc' and not (row.origin_tool == 'dbt' and row.dbt_model_name) %}
{% set _origin_label %}{{ row.origin_tool | replace('_', ' ') }}{% endset %}
{{ signal_chip(_origin_label, color="slate") }}
{% endif %}
{% endcall %}
{# "What changed" signal for the current query version - the same chips
the /jobs version cards show. A resolved rule (e.g. "cross join
unaggregated resolved") is good news: it fired on an earlier version
and the current query no longer triggers it. This is why the
suggestion count can be 0 here while /jobs' history shows the rule -
it was already fixed. #}
{% if resolved_rules_current or new_rules_current %}
Cost
{{ row.query_cost_value | format_usd }}
{% if _cost_meta %}{% endif %}Bytes processed
{{ (_agg_bytes | format_bytes) if _agg_bytes is not none else "-" }}
{% if _bytes_meta %}{% endif %}Slot time
{{ ("%.1f" | format((_agg_slot_ms or 0) / 3600000) ~ " hrs") if _agg_slot_ms is not none else "-" }}
{% if _slot_meta %}{% endif %}Executions
{{ "{:,}".format(_runs) }}
Evidence
{{ issue.evidence_text }}
Action
{{ issue.action_text }}
Impact
{{ issue.impact_text }}
{{ 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 %}