Google Analytics data is dublicating in Google Big Query


I’m trying to extract google analytics data to my bigquery account. I’m selecting ga:date, ga:userType as dimensions and ga:users, ga:pageviews as metrics. My problem is after extraction, there should be only one row for each date but I get multiple rows and different metric values. Below I attached screenshots.

Thanks lot

This may be happening because Stitch’s BigQuery destination functions in an append-only fashion, as outlined in this section of our documentation. Any records extracted are appended to the destination table (including updates to existing records) and no de-duplication occurs during loading. As a result, you’ll see duplicate records contained in any tables replicated to your warehouse.

Stitch requests the past n days worth of data during each replication cycle, where n is the attribution window you’ve configured for your integration, and all of these records will be appended to your destination table.

You can account for this duplication in your destination queries. We have a guide to querying append-only tables that includes examples of how you can grab the latest version of each record.

Hi Lee,

We had figured that out and wrote a sql code just like you said. Thanks for your prompt response.

1 Like