Why your Dataform incremental table keeps adding duplicates
Your Dataform incremental table keeps adding duplicates? A NULL in the merge key could be why. Here’s how it happens with GA4 and how to stop it.
Elisa Liu3 Nov 2026
Blog
Katie Kaczmarek23 April 20254 min read

You’ve probably heard that AI is coming to make our lives easier, especially in tools like BigQuery. But here’s the thing: AI isn't magic. If you want it to be accurate and useful, you need to set it up for success.
One of the best ways to do that? Improve the metadata in your BigQuery warehouse.
Metadata is like the index or contents page in a book, it quickly tells you exactly what’s inside and where to find it. Creating clear metadata means AI can more easily understand your data warehouse and give you more accurate, relevant results.
Here’s how you can easily start improving your warehouse metadata today:
Currently you either have to do this manually (yes, typing away) or write a short script that loops through your tables and sets descriptions programmatically. There's good news however: BigQuery's new Data Insights feature should be able to automatically generate table and column descriptions, simplifying the documentation process. One thing worth knowing: generating a description doesn't put it on the table by itself. On the Insights tab, underneath the generated table description, click "View column descriptions". That opens a panel with a "Save to details" button for the table and a "Save to schema" button for each column, and clicking those is what actually writes the description onto the table, where it shows up everywhere, including to any AI reading it through a normal BigQuery connection.
Why bother?
Imagine AI trying to figure out what "cust_id" or "rev_tot" stands for. Field and table descriptions are like name tags at a party; the clearer they are, the smoother the introductions go. Good descriptions mean AI spends less time guessing and more time providing accurate insights.
Quick wins (A term I hate in SQL requests):
Think of your datasets like a family tree, everything is connected. Clearly defining relationships between your tables makes it easier for AI (and your team!) to understand how everything fits together.
Simple steps:
Join marketing, customer and product data with tested models and documentation your team can use. Start with the sources needed for your question.
Tags are your shortcut for finding data fast, think of them like labels on folders or bookmarks in your browser. They’re great for quick filtering and navigation, helping you (and AI) pinpoint exactly what you need without wasting time.
My advice?
Good naming conventions aren’t just nice, they're essential. Clear names prevent future confusion, save time, and make your warehouse easier to navigate for everyone, especially AI.
Imagine naming your files "final_final_3.csv" in your Google Drive. Finding anything later would be a nightmare! Clear, consistent names like "sales_data_jan2025" help AI understand exactly what’s in each table.
If you want to go one step further, consider building core reporting tables designed to make analysis easier.
Think of these as simplified, centralised “AI-friendly” versions of your data. They can also act as your single source of truth for dashboards and recurring reports.
Examples of useful AI-ready tables:
core_metrics_summary: daily or weekly KPI snapshotsuser_engagement_core: simplified GA4-style user dataproduct_performance: clean sales data by productcustomer_lifetime_value: key user value metricsdata_dictionary_ai: a table AI can refer to for definitions and aliasesThese tables make it easier for AI tools to produce reliable outputs and for people to report from the same base data.
Small efforts now will make AI a more helpful, accurate assistant for everyone in your team, coders and non-coders alike.
What are you doing today to get ready for AI in BigQuery?
We've since gone deeper on this, specifically on Google's Knowledge Catalog and what's changed around AI and BigQuery since this was written: What's actually in Google's Knowledge Catalog & How to make an AI agent accurate in BigQuery
Join marketing, customer and product data with tested models and documentation your team can use. Start with the sources needed for your question.
Bring data to connect, a question to investigate or something to fix or build. We can agree a focused scope directly.
Your Dataform incremental table keeps adding duplicates? A NULL in the merge key could be why. Here’s how it happens with GA4 and how to stop it.
Elisa Liu3 Nov 2026
TimesFM spots unusual days in BigQuery; ARIMA_PLUS explains why. We tested both on a year of GA360 data to turn traffic drops into clear answers.
Elisa Liu3 Nov 2026
A year ago, I wrote about getting a BigQuery warehouse ready for AI ( Easy ways to prepare your BigQuery warehouse for AI) , but didn't look properly into Knowledge Catalog (known as Dataplex at the time). We decided to go back and look through Google's Knowledge Catalog properly: what's actually in there, how it works and what it relates to. What Knowledge Catalog is Knowledge Catalog is Google's metadata layer for BigQuery data (and a few other sources). It sits alongside your tables rather
Katie Kaczmarek15 Sept 2026