BigQuery and GA4 removing expiry dates across your dataset

Lace Chantelle Rogers
4 min readAug 21, 2023

As you’ll probably already be aware, Google Analytics 4 (GA4) provides an fantastic dataset for BigQuery for all your raw user and event level data. This data is super easy to connect to Google cloud platform (GCP). However if you connect your GA4 property to a sandbox mode, the tables will automatically have a 60 day expiry window.

Firstly, I always recommend setting up the GA4 to BigQuery connection, even if you cannot add a billing account. Ensure you plan to add a billing account in the first 60 days to benefit from pay as you go features.

You can track your billing easily via billing reports and often if you’re simply storing GA4 data for a small property you will be unlikely to spend more the $0.5 per day. There are a number of methods you can use to manage spend including alerts and quota limits set on your billing account.

However, something you may not realise when you do upgrade your sandbox account to a paid for version, the 60 day expiry date on you historical tables is not automatically removed.

So how do you resolve this?

There are a number of ways to remove expiry, however I tend to like the SQL approach as I remain in the same interface, however if you want to read about these in more detail, Google helpfully provide this useful guide.

Step 1: dataset level expiry:

Navigate to the console and click on the dataset in question and untoggle the enable table expiration

Step 2: Manual approach-removing the expiry on the tables already created

You will now need to remove the expiry of the table, you can do this in the interface via the console by clicking edit details and then selecting none.

Step 2: Automated approach-removing the expiry on the…

--

--

Lace Chantelle Rogers

https://www.bigquery.co.uk/ Head of data and analytics . GCP, BigQuery and GA4 expert specialising in data engineering and data science, with Python,sql