dbt Macros vs Persistent SQL UDFs in BigQuery: Choose Right
Choosing between dbt macros and persistent SQL UDFs in BigQuery is a decision most teams get wrong — and the cost shows up in your bill and your lineage graph.
Fintel Analytics blog
Expert perspectives on data analytics, AI agents, internal tools, and business intelligence from the Fintel Analytics team.
20 of 206 posts
Choosing between dbt macros and persistent SQL UDFs in BigQuery is a decision most teams get wrong — and the cost shows up in your bill and your lineage graph.
A practitioner's guide to moving business-critical spreadsheet logic into tested dbt models. Learn what to migrate first and how to prove the numbers match.
Non-deterministic SQL functions silently bust BigQuery's query cache across your entire dbt DAG. Here is how to find every offending model and fix it fast.
If finance and ops see different revenue figures, you don't have a dashboard problem — you have a semantic layer problem. Here's how to fix it.
Batch or CDC for Postgres to BigQuery? A practitioner's framework covering hard deletes, hidden merge costs and the pipeline failures that surface in production.
JavaScript UDFs in dbt BigQuery silently consume disproportionate slot resources and block query cache hits. Here is how to find them, audit their cost, and fix them before they wreck your bill.
SELECT * in dbt BigQuery models is one of the quietest cost drivers in a growing data stack. Here's how to find every offending model and fix it.
A missing PARTITION BY in a BigQuery window function can silently scan millions of rows it never needed — and you won't see it until the invoice arrives. Here's how to find and fix it.
Accidental cross joins in dbt BigQuery models can turn a 1M-row table into a trillion-row disaster — and your bill won't wait. Here's how to find and fix them fast.
Silent NULLs in dbt and BigQuery pass every test, build successfully, and corrupt your metrics for weeks before anyone notices. Here is how to find them.
Most e-commerce teams know revenue per order but not what the order made after costs. Here is how to build net profit per order in SQL and keep it trustworthy.
Find every Snowflake warehouse running with no credit cap using runnable SQL, then set sensible quotas and stop the gap coming back.
Serverless reclustering credits hide outside your warehouse bill. Run these SQL queries to find which dbt tables burn them and how to stop it.
Remote spill is the slowest, costliest way a Snowflake query can run. Here is the SQL to find every spilling query and dbt model, and how to fix them.
Your active data is flat but Snowflake storage keeps climbing. Here is the SQL to find the tables responsible, and the dbt config that fixes it.
Your Snowflake bill may be paying for warehouses that run nothing. Here is the SQL to measure idle credits per warehouse, fix auto-suspend and stop it coming back.
Your BigQuery bill spiked and you have no idea which dbt model caused it. Here is how to fix that with dbt query labels — and the diagnostic SQL to prove it.
Untested dbt models are silent liabilities. Learn how to find every model with no test coverage in BigQuery using runnable SQL and dbt commands — in under five minutes.
Unmasked PII in BigQuery is a compliance and security risk most teams discover too late. Here's how to find it in under five minutes using SQL against INFORMATION_SCHEMA.
Conversational analytics is transforming how business teams access data insights — no SQL required. Here's what leaders need to know in 2026.