简体   繁体   中英

Merging datasets in Bigquery

After upgrading to Google Analytics in my Firebase project I linked up to a new GA property and had to re-setup my Bigquery integration (after accidentally linking/unlinking my GA account, my integration was turned off). I got it fixed by linking again but now all new data is fed into a new analytics_* dataset.

Since all my queries are referring to the old dataset it would be quite the effort renaming all of them to link to both the new dataset + the old dataset. Is it possible to either:

  • Change the destination table in the firebase Bigquery export (choosing the old dataset instead of the newly created one)
  • Somehow merge the two datasets (instead of copying them)

I understood it's impossible to rename datasets which would solve my issue if I could change the name of the new set to the old name and copy the contents of the old set to the new one.

UPDATE

I was able to fix it by:

This started feeding data back into my old property. I subsequently copied the partitioned tables from the newly created property/ table back into the old property (in Bigquery) using the same naming convention (eg. events_20190101 ) which correctly copied them in the partitioned dataset. I had to append some intraday events as well to the existing partitioned dataset but this solved my problem in the end.

According to the BigQuery export schema document for each single Firebase project linked to BigQuery, a single dataset named "analytics_" is added to your Bigquery project and such ID refers to your Analytics Property ID located in the Analytics Settings in Firebase (Settings -> Integrations -> Google Analytics). It seems that this ID is generated automatically when you set up a property and it can be manually changed to a custom one.

Additionally, there's no way to merge datasets than copy the data between them. Thus, you could consider using scheduled queries to append the data in your old dataset.

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM