Aaron
Aaron

Reputation: 303

Firebase Analytics - Set data location for BigQuery

We have a Firebase Project setup, with Analytics and export to BigQuery configured.

The integration has been successful and our events are being migrated to BigQuery just fine.

However, we face an issue with the data location set in BigQuery.

Our Firebase project has Default GCP resource location set as eur3 (europe-west). During setting up the integration between Firebase Analytics and BigQuery, we had no option to set any data location.

We can see the location for the dataset is US in BigQuery. I believe BigQuery is now supported in EU data centres, how can we use the EU location rather than US?

Upvotes: 7

Views: 1244

Answers (2)

Kato
Kato

Reputation: 40582

As of late 2021, BigQuery exports for Analytics are now managed in the Google Analytics admin console, and you can specify the data location at setup time or link to an existing BigQuery dataset in the desired region. However, it isn't possible to change the region for an existing dataset.

Also see Klemen's answer, which suggests a risky workaround for migrating existing data. This is not suggested in Google docs, and is unlikely to be supported, but potentially helpful.

Prior to late 2021, Google Analytics for Firebase BigQuery dataset was created in the US, regardless from which location a developer created their Firebase project.

You cannot control the location of Analytics data in general, only BigQuery exports. GA data is distributed across Google data centers.

Upvotes: 0

Klemen Vrhovec
Klemen Vrhovec

Reputation: 221

Now there is an option to change location as written bellow

  1. Go to the Firebase console and disable the Google Analytics BQ Export (uncheck all boxes, and turn off the toggle)
  2. Navigate to https://console.cloud.google.com/bigquery
  3. Create a new dataset to house a copy of the Analytics data (eg: analytics_123456789_copy).
  4. Open the original analytics_123456789 dataset, and click the "Copy" button.
  5. Select the new dataset (analytics_123456789_copy) as the destination; Click "Copy".
  6. Wait for the copy to complete. Status can be viewed in the BigQuery Transfer page.
  7. Delete the original table, analytics_123456789 This cannot be undone, so make sure the data is either backed up, or the copy has completed.
  8. Create a new dataset with the same name, analytics_123456789, making sure to select the desired target region (eg: EU).
  9. Open the analytics_123456789_copy dataset and copy the data to the new analytics_123456789.
  10. Go to the Firebase console and reenable the Google Analytics BQ Export (enable the toggle, check the relevant checkboxes).
  11. Optional: Wait for the copy to complete, then delete the copied dataset, analytics_123456789_copy.

Upvotes: 4

Related Questions