{# Spec 154 v3 - materialization section rendered on the opportunity detail page. Fires when one or more of this table's opportunities carries a materialization payload - either an audit-detected candidate (``materialization_candidate``, possibly with any of the four strategies below) or Google's MV Recommender pass-through (``bq_materialization_recommendation``). The audit-detected card branches on ``recommended_strategy``: * ``materialized_view`` - full MV card with generated SQL tabs and the stat strip (cost / executions / avg bytes). * ``ephemeral`` - inline-as-CTE card with the dbt node id + the downstream models that would absorb the inline. * ``table`` - persist-as-table card with build vs. read counts. * ``incremental`` - switch-to-incremental card with the representative build SQL so the user can see the filter the fitter matched. Inputs from the route: ``audit_mv_candidates`` - list of evidence_snapshot dicts (one per audit-detected opportunity on this table); each carries a ``recommended_strategy`` field. ``bq_mv_recommendations`` - list of dicts (BQ Recommender rows) each with: target_resource, target_table_full_name, bq_description, bq_recommendation_state, bq_insights[], last_refresh_time Renders nothing when both lists are empty, so the partial can be included unconditionally from detail.html. #} {% macro strategy_pill(strategy) %} {%- if strategy == "ephemeral" -%} strategy: ephemeral {%- elif strategy == "incremental" -%} strategy: incremental {%- elif strategy == "table" -%} strategy: table {%- elif strategy == "materialized_view" -%} strategy: materialized view {%- else -%} {{ strategy or "unspecified" }} {%- endif -%} {% endmacro %} {# Renders the "why this fits" reasoning lines. Each attribute is one inline line: ``