Export Firebase data into BigQuery

Firebase provides tools in theFirebase console to explore and analyzehistorical data about your apps that use Firebase products. These tools can helpyou 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 data from various Firebase products intoBigQuery. WithBigQuery, you can analyze your data withBigQuery SQL orexport the data to use with your own tools.

The following products support data export toBigQuery:

Required permissions and suggested roles

To view or manage settings for data export toBigQuery, you must havethe required level of access.

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

Project-level

The following table applies to the top-level linking of a Firebase project toBigQuery.

Action inFirebase consoleRequired IAM permissionIAM role(s) that include required permissions by defaultAdditional required roles
Link a Firebase project andBigQueryfirebase.links.createnone
Unlink a Firebase project andBigQueryfirebase.links.deletenone
View the existing links forBigQueryfirebase.links.listnone

Google Analytics

The following table applies specifically to the export ofGoogle Analytics data toBigQuery.

Action inFirebase consoleRequired IAM permissionIAM role(s) that include required permissions by defaultAdditional required roles
Enable export ofGoogle Analytics data toBigQueryfirebase.links.update
AND
serviceusage.services.enable
AND
resourcemanager.projects.getIamPolicy
AND
resourcemanager.projects.setIamPolicy
Enable export for specific Firebase appsfirebase.links.update
Disable export for specific Firebase appsfirebase.links.update
Note:To enable or disable export in theGoogle Analytics UI, you need theexplicit Administrator or Editor rolefor the linkedGoogle Analytics property. However, Firebase access isnot required.

Firebase products

The following table applies to any of the Firebase products for which you canexport data toBigQuery, for example,Crashlytics orPerformance Monitoring.

Action inFirebase consoleRequired IAM permissionIAM role(s) that include required permissions by defaultAdditional required roles
Enable export of a product's data toBigQueryfirebase.links.updatenone
Enable export for specific Firebase appsfirebase.links.updatenone
Disable export for specific Firebase appsfirebase.links.updatenone



Set up export toBigQuery

  1. Sign in to theFirebase console, then select your project.

  2. Click, then selectProject Settings.

  3. Select theIntegrations tab.

  4. On theBigQuery integration card, clickLink.

  5. Follow the on-screen instructions to set up export toBigQuery.

Unlink fromBigQuery

Unlinking fromBigQuery stops the corresponding dataset(s) inBigQuery from being populated.

Be aware of the following:

  • Any data already exported intoBigQuery will persist for the allowedretention time, and storage and query charges may still apply. You canmanually delete your dataset(s) to prevent any further billing.

  • If you haveBigQuery data stored in other services, that data mightbe governed by different terms for data persistence.

You can unlink fromBigQuery at the Firebase project level, at theproduct-level, or at the app-level for a specific product.

Caution: Unlinking your Firebase project fromBigQuery stopsalldata export from any Firebase product (and if applicable,Google Analytics) for which you've set up export toBigQuery.

Here's how to unlink fromBigQuery:

  1. In theFirebase console, go to theIntegrations page.

  2. In theBigQuery card, clickManage.

  3. Choose to unlink a specific product or to unlink specific apps fora specific product.

    To unlink your Firebase project entirely, find the button at the bottom ofthe page.

  4. When prompted, confirm that you want to stop exports.



What happens when you enable export?



Change the location for existing exports

After you set up a product for export toBigQuery and create a dataset,you can't change the location of that dataset. However, you can copy yourexisting dataset to a new dataset that has a different location and reset yourdata export to that new location. Learn aboutBigQuery dataset locations.

Note: The capability to change the location for data exportis available by default forGoogle Analytics,Cloud Messaging, andPerformance Monitoring. ForCrashlytics, you can select and change the location forexportonly if you enabled export after mid-October 2024 or if youupgrade to the new export infrastructure.Make sure that you follow all of the instructions in these procedures; overlooking a step might result in data loss.

Select the product for which you want to change the location for dataexport

Google Analytics

To change the location of an existingGoogle Analytics export toBigQuery,follow these instructions:

  1. In theFirebase console, go to theIntegrations page.Then do the following:

    1. In theBigQuery card, clickManage.
    2. Toggle off theGoogle Analytics slider to disableBigQuery.
  2. In theGoogle Cloud console, go to theBigQuery page.Then do the following:

    1. Create a temporary dataset to store a copy of the existing data fromyour original dataset. Assign the temporary dataset adifferent namethan the name of the original dataset.
    2. Copy ormovethe data from your original dataset to the temporary dataset.
    3. Delete the original dataset.
    4. Create a new, permanent dataset with thesame name as your originaldataset(analytics_ANALYTICS_PROPERTY_ID),then select the new region.
    5. Copy or move the data from the temporary dataset to the new dataset,then delete the temporary dataset.
  3. Go back to theFirebase console and theBigQuery card.Then do the following:

    1. Toggle on theGoogle Analytics slider to re-enable theBigQuery integration.
    2. Select the apps for which you want to enable the export.

Cloud Messaging

To change the location of an existingCloud Messaging export toBigQuery,follow these instructions:

  1. In theFirebase console, go to theIntegrations page.Then do the following:

    1. In theBigQuery card, clickManage.
    2. Toggle off theCloud Messaging slider to disableBigQuery.
  2. In theGoogle Cloud console, go to theBigQuery page.Then do the following:

    1. Create a temporary dataset to store a copy of the existing data fromyour original dataset. Assign the temporary dataset adifferent namethan the name of the original dataset.
    2. Copy ormovethe data from your original dataset to the temporary dataset.
    3. Delete the original dataset.
    4. Create a new, permanent dataset with thesame name as your originaldataset (firebase_messaging), thenselect the new region.
    5. Copy or move the data from the temporary dataset to the new dataset,then delete the temporary dataset.
  3. Go back to theFirebase console and theBigQuery card.Then do the following:

    1. Toggle on theCloud Messaging slider to re-enable theBigQuery integration.
    2. Select the apps for which you want to enable the export.
  4. Go back to theGoogle Cloud console and theBigQuery page to verify that a transfer configuration is created forCloud Messaging in the new region.

Crashlytics

Important: The capability to select and change the location for exportingCrashlytics data isonly available if you enabled export aftermid-October 2024 or if youupgrade to the new export infrastructure.

To change the location of an existingCrashlytics export toBigQuery,follow these instructions:

  1. In theFirebase console, go to theIntegrations page.Then do the following:

    1. In theBigQuery card, clickManage.
    2. Toggle off theCrashlytics slider to disableBigQuery.
  2. In theGoogle Cloud console, go to theBigQuery page.Then do the following:

    1. Create a temporary dataset to store a copy of the existing data fromyour original dataset. Assign the temporary dataset adifferent namethan the name of the original dataset.
    2. Copy ormovethe data from your original dataset to the temporary dataset.
    3. Delete the original dataset.
    4. Create a new, permanent dataset with thesame name as your originaldataset (firebase_crashlytics), thenselect the new region.
    5. Copy or move the data from the temporary dataset to the new dataset,then delete the temporary dataset.
  3. Go back to theFirebase console and theBigQuery card.Then do the following:

    1. Toggle on theCrashlytics slider to re-enable theBigQuery integration.
    2. Select the apps for which you want to enable the export.
  4. Go back to theGoogle Cloud console and theBigQuery page to verify that a transfer configuration is created forCrashlytics in the new region.

Performance Monitoring

To change the location of an existingPerformance Monitoring export toBigQuery,follow these instructions:

  1. In theFirebase console, go to theIntegrations page.Then do the following:

    1. In theBigQuery card, clickManage.
    2. Toggle off thePerformance Monitoring slider to disableBigQuery.
  2. In theGoogle Cloud console, go to theBigQuery page.Then do the following:

    1. Create a temporary dataset to store a copy of the existing data fromyour original dataset. Assign the temporary dataset adifferent namethan the name of the original dataset.
    2. Copy ormovethe data from your original dataset to the temporary dataset.
    3. Delete the original dataset.
    4. Create a new, permanent dataset with thesame name as your originaldataset (firebase_performance), thenselect the new region.
    5. Copy or move the data from the temporary dataset to the new dataset,then delete the temporary dataset.
  3. Go back to theFirebase console and theBigQuery card.Then do the following:

    1. Toggle on thePerformance Monitoring slider to re-enable theBigQuery integration.
    2. Select the apps for which you want to enable the export.
  4. Go back to theGoogle Cloud console and theBigQuery pageto verify that a transfer configuration is created forPerformance Monitoring in the new region.



Pricing and theBigQuery sandbox

If your Firebase project is on the no-cost Spark pricing plan, you can use theBigQuery sandbox,which provides no-cost access toBigQuery. For information about theBigQuery sandbox and its capabilities, seeUsing theBigQuery sandbox.

If your Firebase project is on the pay-as-you-go Blaze pricing plan, you can use all thefeatures ofBigQuery. Your use ofBigQuery is subject toBigQuery pricing,which includes limited no-cost use.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-05 UTC.