{% extends "layout.html" %} {% block content %} {% set current_sort = sort | default('cost') %} {% set current_direction = direction | default('desc') %} {# Macro for sortable group header column #} {% macro sort_header(label, col_name, align='left', extra_class='') %} {% set is_active = current_sort == col_name %} {% set next_dir = 'asc' if (is_active and current_direction == 'desc') else 'desc' %} {{ label }} {% if is_active %} {{ '▲' if current_direction == 'asc' else '▼' }} {% endif %} {% endmacro %}

Admin Only

BigQuery Jobs

{{ config.name }} ({{ config.gcp_project_id }})

Back to Configuration
{{ total_groups }} table{{ 's' if total_groups != 1 else '' }}
Sort by: {{ sort_header('Table', 'table') }} | {{ sort_header('Runs', 'runs') }} | {{ sort_header('Cost', 'cost') }} | {{ sort_header('Data', 'data') }} | {{ sort_header('Latest', 'latest') }}
{% if groups %}
{% for group in groups %}
{% if group.destination_table %} {% set table_parts = group.destination_table.split('.') %} {% if table_parts | length >= 3 %} {{ table_parts[-1] }} {{ table_parts[0] }}.{{ table_parts[1] }} {% else %} {{ group.destination_table }} {% endif %} {% else %} No destination {% endif %}
{{ group.job_count }} run{{ 's' if group.job_count != 1 else '' }} {% if group.total_cost > 0 %} {{ group.total_cost | format_usd }} {% else %} - {% endif %} {% if group.total_bytes > 0 %} {{ (group.total_bytes / (1024 * 1024 * 1024)) | round(2) }} GB {% else %} - {% endif %} {{ group.latest_run.strftime('%Y-%m-%d %H:%M') if group.latest_run else '-' }}
{% for job in group.jobs %} {% endfor %}
User Statement Workload Created Duration Cost Bytes Billed
{{ job.user_email.split('@')[0] if job.user_email else '-' }} {{ job.statement_type or '-' }} {% if job.workload_kind == 'build' %} build {% elif job.workload_kind == 'consumption' %} consumption {% else %} unclassified {% endif %} {{ job.creation_time.strftime('%Y-%m-%d %H:%M') if job.creation_time else '-' }} {% if job.duration_ms %} {{ (job.duration_ms / 1000) | round(2) }}s {% else %} - {% endif %} {% if job.total_cost %} {{ job.total_cost | format_usd }} {% else %} - {% endif %} {% if job.total_bytes_billed %} {{ (job.total_bytes_billed / (1024 * 1024 * 1024)) | round(2) }} GB {% else %} - {% endif %}
{% endfor %}
{% if total_groups > 0 %} {% set start_idx = (page - 1) * 10 + 1 %} {% set end_idx = [page * 10, total_groups] | min %} {% set filter_params %}{% if filters.destination_table %}&destination_table={{ filters.destination_table }}{% endif %}{% if filters.workload_kind %}&workload_kind={{ filters.workload_kind }}{% endif %}{% if filters.start_date %}&start_date={{ filters.start_date }}{% endif %}{% if filters.end_date %}&end_date={{ filters.end_date }}{% endif %}{% endset %}

Showing {{ start_idx }} to {{ end_idx }} of {{ total_groups }} results

{% if total_pages > 1 %} {% endif %}
{% endif %} {% else %}

No BigQuery jobs found for this configuration.

Run a sync operation to retrieve job data from BigQuery.

{% endif %}
{% endblock %}