{# Spec 151 - table-level layout recommendations index. One row per qualifying table from the latest scan. Replaces the spec-148 per-opportunity card surface; the opportunity detail page now shows a chip linking to /recommendations/layout/
| Table | Current | Recommended partition | Recommended cluster | Window cost | Jobs |
|---|---|---|---|---|---|
|
{{ rec.table_full_name }}
{# "BQ only" pill marks rows that exist solely because
Google's recommender flagged the table — the audit
itself didn't analyze it (under size gates or sparse
query history). Distinguishes them from audit+BQ
rows whose cells just happen to be empty for other
reasons. #}
{% if rec.is_bq_only %}
BQ only
{% endif %}
{{ rec.table_total_bytes | format_bytes }}
|
{% if rec.is_bq_only %} {# Current state is unknown for BQ-only rows — the audit didn't query the table's schema. Avoid rendering a definitive "unpartitioned" chip. #} unknown {% elif rec.is_currently_partitioned %} partitioned {% else %} unpartitioned {% endif %} | {% if rec.recommended_partition_column %} {{ rec.recommended_partition_column }} {% elif rec.is_bq_only and rec.bq_columns %} {# Surface BQ's first column as the partition pick on BQ-only rows. Approximate — Google's recommender doesn't strictly distinguish partition vs cluster in its column list — but better than rendering "-". #} {{ rec.bq_columns[0] }} {% else %} - {% endif %} |
{% if rec.cluster_picks %}
{% for col in rec.cluster_picks %}
{{ col }}
{% endfor %}
{% elif rec.is_bq_only and rec.bq_columns | length > 1 %}
{% for col in rec.bq_columns[1:5] %}
{{ col }}
{% endfor %}
{% else %}
-
{% endif %}
|
{{ rec.table_total_cost_in_window_usd | format_usd }} | {{ rec.contributing_job_count }} |