Catch up on everything announced at Firebase Summit, and learn how Firebase can help you accelerate app development and run your app with confidence. Learn More

Export project data to BigQuery

Stay organized with collections Save and categorize content based on your preferences.

Firebase provides tools in the Firebase console to explore and analyze your project's historical data. These tools can help you answer many questions about how your apps are being used. Sometimes, though, you also want to set up your own queries to answer your own questions.

You can do this by exporting your project data from Firebase into BigQuery. With BigQuery, you can analyze your data with BigQuery SQL or export the data to use with your own tools.

You can configure Firebase to export data to BigQuery from the following Firebase products:

Required permissions and suggested roles

To view or manage settings for data export to BigQuery, you must have the required level of access.

If you don't have the necessary Firebase access, you can ask a Firebase project Owner to assign you the applicable role via the Firebase console IAM settings. If you have questions about accessing your Firebase project, including finding or assigning an Owner, review the Permissions and access to Firebase projects FAQs.

Enable BigQuery export

  1. Go to the Integrations page in the Firebase console.

  2. In the BigQuery card, click Link.

  3. Follow the on-screen instructions to enable BigQuery.

When you enable BigQuery export for Google Analytics, Performance Monitoring, or Cloud Messaging:

  • You select the dataset region. After the dataset is created, the location can't be changed, but you can copy the dataset to a different location or manually move (recreate) the dataset in a different location. To learn more, see Change dataset location.

  • By default, all apps in your project are linked to BigQuery and any apps that you later add to the project are automatically linked to BigQuery. You can manage which apps send data. All web data from your Google Analytics 4 properties in Google Analytics are automatically exported, as well.

  • Firebase exports a copy of your existing data to BigQuery.

  • Firebase sets up daily syncs of your data from your Firebase project to BigQuery.

To deactivate your BigQuery export, unlink your project in the Firebase console.

Change dataset location

After you enable a product for BigQuery export and create a dataset, you can't change the location of that dataset. However, you can copy your existing dataset to a new dataset that has a different location.

To learn about BigQuery dataset locations, see Dataset locations.

Select the product for which you want to change the location of your dataset.

To change the location of a Cloud Messaging dataset, follow these instructions:

  1. Go to the Integrations page in the Firebase console.
  2. In the BigQuery card, click Manage.
  3. Toggle off the Cloud Messaging slider to disable BigQuery.
  4. Go to the BigQuery page in the Google Cloud Console.
  5. Create a temporary dataset to store a copy of the existing data from your original dataset. Assign the temporary dataset a different name than the name of the original dataset.
  6. Copy or move the data from your original dataset to the temporary dataset.
  7. Delete the original dataset.
  8. Create a new, permanent dataset with the same name as your original dataset (firebase_messaging), then select the desired region.
  9. Copy or move the data from the temporary dataset to the new dataset, then delete the temporary dataset.
  10. For the new dataset, click the SHARING tab and select Permissions. Then add exporter@fcm-bq-export-prod.iam.gserviceaccount.com principal as a BigQuery Data Owner.
  11. Go to the Firebase console and toggle on the Cloud Messaging slider to re-enable BigQuery. Then select the apps for which you want to enable the export.
  12. Go to the BigQuery page in the Google Cloud Console and verify that a transfer configuration is created for Cloud Messaging in the new region.

Pricing and the BigQuery sandbox

If your Firebase project is on the no-cost Spark plan, you can link Crashlytics, Cloud Messaging, Google Analytics, and Performance Monitoring to the BigQuery sandbox, which provides no-cost access to BigQuery. Refer to Using the BigQuery sandbox for information on the BigQuery sandbox's capabilities.

If your Firebase project is on a paid plan, you can link A/B Testing, Crashlytics, Cloud Messaging, Google Analytics, and Performance Monitoring to BigQuery. Your use of BigQuery is subject to normal BigQuery pricing, which includes limited no-cost use.