{# US3 - deep-analysis dry-run confirm fragment. Standalone page (full layout) for v1; a future iteration can move this to a datastar-py inline swap. The form POSTs to ``/deep/run`` with the ack'd cost as a hidden field so the route can detect cost drift between preview and run. #} {% extends "layout.html" %} {% block content %}

Deep analysis — confirm cost

{{ table_full_name }} · {{ column_name }}

← back to layout detail

{% if error %}

Re-confirm required

{{ error }}

{% endif %} {% if preview %}

Estimated BigQuery cost

{{ preview.estimated_cost_usd | format_usd }}

Based on a BigQuery dry-run of the two queries below (~{{ preview.estimated_bytes_processed | format_bytes }} to scan). No chargeable query has run yet.

Query 1 — distinct count

{{ preview.distinct_count_sql }}

Query 2 — top 20 values by frequency

{{ preview.top_values_sql }}
Cancel

Results are cached per (table, column) within this scan — running once and re-clicking later this scan won't charge again.

{% endif %}
{% endblock %}