{{ job.destination_short }}{% endset %}
{% else %}
{% set _title %}{{ job.job_id }}{% endset %}
{% endif %}
{% call header_card(_title) %}
{% set _workload_label = "build" if job.workload_kind == "build" else ("consumption" if job.workload_kind == "consumption" else none) %}
{{ job_header_summary }}
{% endcall %} {%- set _scan_cost = cohort_aggregates.cost_usd if cohort_aggregates else job.cost_usd -%} {%- set _runs = cohort_aggregates.execution_count if (cohort_aggregates and cohort_aggregates.execution_count) else 1 -%} {# Same four-column stat grammar as opportunity detail. The primary values are aggregated across the destination table when a cohort exists; the muted line shows the latest execution snapshot. #} {%- set _last_ts = latest_execution.creation_time.strftime("%Y-%m-%d %H:%M UTC") if (latest_execution and latest_execution.creation_time) else "" -%} {%- set _agg_bytes = cohort_aggregates.bytes_processed if cohort_aggregates else job.bytes_processed -%} {%- set _agg_slot_ms = cohort_aggregates.slot_time_ms if cohort_aggregates else job.slot_time_ms -%} {%- set _cost_meta = ( "last " ~ (latest_execution.cost_usd | format_usd) ~ ((" / " ~ _last_ts) if _last_ts else "") ) if latest_execution else None -%} {%- set _bytes_meta = ( "last " ~ (latest_execution.bytes_processed | format_bytes) ~ ((" / billed " ~ (latest_execution.bytes_billed | format_bytes)) if latest_execution.bytes_billed is not none else "") ) if (latest_execution and latest_execution.bytes_processed is not none) else None -%} {%- set _slot_meta = ( ("last " ~ (latest_execution.duration_ms | format_duration) ~ " wall") if (latest_execution and latest_execution.duration_ms is not none) else None ) -%}Cost
{{ _scan_cost | 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) }}
{{ issue.explanation }}
{% endif %}{{ issue.rule_description }}
{% endif %} View opportunity{{ imp.explanation }}
{% endif %}{{ job_lookup_sql }}