BigQuery Cost Estimator

Dynamically replace BigQuery's query size estimate (GB/TB) with the estimated cost in USD.

هذه إصدارات لهذا البرنامج النصي حيث تم تحديث الكود. عرض كل الإصدارات.

  • v1.10 26-02-2026

    Changelog

    v1.8 – TB support

    • TB estimates – Now displays cost for queries that show size in TB (e.g., "1.12 TB" → $7.00)
    • Updated selector – Added span.cfc-truncated-text[aria-hidden="true"] for current BigQuery UI
    • Unit detection – Parses both GB and TB from the status message and calculates cost accordingly

    v1.9 – Robust element finding and duplicate handling

    • Multi-strategy selectors – Tries several known selectors with fallback to content-based DOM search for "This query will process"
    • Content-based fallback – Uses TreeWalker to find elements by text when selectors fail (resilient to BigQuery UI changes)
    • Duplicate handling – When BigQuery renders the estimate in multiple elements, hides or empties extras to prevent double display

    v1.10 – Fix duplicate display

    • Replace common parent – When multiple elements match, replaces the shared parent container's content so the cost displays once
    • Observer during updates – Disconnects MutationObserver while making DOM changes to avoid re-entry/feedback loops
    • Leaf-only matching – Filters to innermost elements (excludes parents that contain another match) for precise replacement

    Summary: v1.7 used a single selector and MutationObserver. v1.10 adds TB support, resilient element finding with multiple fallbacks, and fixes the duplicate cost display by targeting the common parent container.

  • v1.7 30-01-2025
  • v1.6 30-01-2025