{# Single-job detail. Layout matches governor_web idioms: - Tiny text-link back nav (NOT a giant pill button) - `ui-stat-card` strip for cost / bytes / slot time / statement type - `ui-pane` for metadata, referenced tables, issues, and SQL - Expandable+copy SQL viewer adapted from packages/web/src/governor_web/templates/components/code_viewer.html. #} {% extends "layout.html" %} {% block content %}
← Back to dashboard

Job

{{ job.destination_table }}

{{ job.job_id }}

{# ── Stat strip ── #}

Cost

{{ job.cost_usd | format_usd }}

Bytes Processed

{{ job.bytes_processed | format_bytes }}

billed: {{ job.bytes_billed | format_bytes }}

Slot Time (hours)

{{ "%.1f" | format((job.slot_time_ms or 0) / 3600000) }}

duration: {{ job.duration_ms | format_duration }}

Statement Type

{{ job.statement_type }}

{% if job.workload_kind == "build" %} build {% elif job.workload_kind == "consumption" %} consumption {% endif %} {% if job.is_dbt_originated %} dbt {% else %} other {% endif %} {% if job.cache_hit %} cache hit {% endif %}

{# ── Issues found by detection rules ── #} {% if issues %}

Issues Found ({{ issues | length }})

Detection rules that flagged this job

{% for issue in issues %} {% endfor %}
Rule Detail Affected Table Severity Current Cost
{{ issue.display_name }} {% if issue.explanation %}

{{ issue.explanation }}

{% else %} {% endif %}
{{ issue.affected_table }}
{% if issue.severity >= 80 %} {{ issue.severity }} {% elif issue.severity >= 50 %} {{ issue.severity }} {% else %} {{ issue.severity }} {% endif %} {{ issue.current_cost | format_usd }}
{% endif %} {# ── SQL viewer (expandable + copy, same pattern as governor_web/components/code_viewer.html) ── #}
SQL
{{ job.query | length }} chars
{% for line in job.query.split('\n') %}{{ loop.index }}{{ line }}
{% endfor %}
{# ── Performance insights (raw payload, collapsible) ── #} {% if job.performance_insights %}

Performance Insights

Raw payload from query_info.performance_insights.

{{ job.performance_insights | tojson(indent=2) }}
{% endif %} {# ── Metadata + Referenced Tables: collapsed by default. Pushed below Performance Insights so the page leads with what's actionable. ── #}

Metadata

Created
{{ job.creation_time.strftime("%Y-%m-%d %H:%M:%S") }} UTC
{% if job.start_time %}
Started
{{ job.start_time.strftime("%Y-%m-%d %H:%M:%S") }} UTC
{% endif %} {% if job.end_time %}
Finished
{{ job.end_time.strftime("%Y-%m-%d %H:%M:%S") }} UTC
{% endif %}
User
{{ job.user_email }}
Job state
{{ job.job_state }}
Job type
{{ job.job_type }}
{% if job.query_hash %}
Query hash
{{ job.query_hash }}
{% endif %}

Referenced Tables

{% if job.referenced_tables %}
    {% for ref in job.referenced_tables %}
  • {% if ref is mapping %} {{ ref.get("project_id") or ref.get("projectId", "") }}.{{ ref.get("dataset_id") or ref.get("datasetId", "") }}.{{ ref.get("table_id") or ref.get("tableId", "") }} {% else %} {{ ref }} {% endif %}
  • {% endfor %}
{% else %}

No referenced tables recorded.

{% endif %}
{% endblock %}