You can export your Firebase Crashlytics data into BigQuery. Once the data is in BigQuery, you can analyze the data using SQL queries, build data visualizations and custom dashboards, and even export the data to other services.
This page describes how to set up export of Crashlytics and (optionally) Firebase sessions data into BigQuery.
Set up export to BigQuery
In the Firebase console, go to the Integrations page.
In the BigQuery card, click Link.
Follow the on-screen instructions to set up export to BigQuery, including the following options:
To improve understanding of crash-free users and crash-free sessions, enable Firebase sessions data export.
To get near realtime access to your Crashlytics data and Firebase sessions data in BigQuery, enable streaming export.
This option can also be enabled during the initial setup of export to BigQuery.
In the Firebase console, go to the Integrations page.
In the BigQuery card, click Manage.
Select the Include sessions checkbox.
This action enables export of session data for all of your linked apps. If you have streaming export enabled, this will start exporting session data in realtime as well.
Learn about the Benefits of streaming export to BigQuery later on this page.
This option can also be enabled during the initial setup of export to BigQuery.
In the Firebase console, go to the Integrations page.
In the BigQuery card, click Manage.
Select the Include streaming checkbox.
This action enables streaming for all of your linked apps. If you have Firebase sessions export enabled, this will enable streaming export for session data as well.
Unlink from BigQuery
Unlinking from BigQuery stops the corresponding dataset(s) in BigQuery from being populated.
Be aware of the following:
Any data already exported into BigQuery will persist for the allowed retention time, and storage and query charges may still apply. You can manually delete your dataset(s) to prevent any further billing.
If you have BigQuery data stored in other services, that data might be governed by different terms for data persistence.
You can unlink from BigQuery at the Firebase project level, at the product-level, or at the app-level for a specific product.
Here's how to unlink from BigQuery:
In the Firebase console, go to the Integrations page.
In the BigQuery card, click Manage.
Choose to unlink a specific product or to unlink specific apps for a specific product.
To unlink your Firebase project entirely, find the button at the bottom of the page.
When prompted, confirm that you want to stop exports.
What happens when you enable export?
Firebase exports data from the apps linked to BigQuery.
During setup, by default, all apps in your project are linked to BigQuery, but you can select to not link specific apps during setup.
Any apps that you later add to your Firebase project are automatically linked to BigQuery.
At any time, you can manage which apps export data.
Firebase exports data to the dataset location you selected during setup.
This location applies to both the Crashlytics dataset and the Firebase sessions dataset (if sessions data is enabled for export).
This location is only applicable for the data exported into BigQuery, and it does not impact the location of data stored for use in the Crashlytics dashboard of the Firebase console or in Android Studio.
After a dataset is created, its 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 the location for existing exports.
Firebase sets up daily syncs of your batch data to BigQuery.
After linking to BigQuery, it may take up to 48 hours for the initial batch data export.
The daily sync happens once per day, regardless of any scheduled export that you might have set up in BigQuery. Note that the timing and duration of the sync job can change, so we don't recommend scheduling downstream operations or jobs based on a specific timing of the export.
Firebase exports a copy of your existing data to BigQuery.
For each linked app, this export includes a batch table containing the data from the daily sync.
You can manually schedule data backfills for the batch table up to the past 30 days or for the most recent date when you enabled export to BigQuery (whichever is most recent).
Note that if you enabled export of Crashlytics data before mid-October 2024, you can also backfill 30 days prior to the day you enabled export.
Firebase does the following if you enable streaming export to BigQuery.
Each linked app will also have its own realtime table containing constantly updating data (in addition to the app's batch table for daily batch export).
After enabling streaming, it may take up to 1 hour for data to begin streaming.
Make sure that you've sent at least two events from your app to Crashlytics and waited a couple minutes after sending them.
Make sure your Firebase project is on the pay-as-you-go Blaze pricing plan.
You can check this by looking in the bottom-left corner of the Firebase console.If there's still no data in your realtime table after sending two events and waiting a couple minutes:
Go to the BigQuery card in the Firebase console.
Disable and then re-enable streaming export.
Make sure the service account
is in your Firebase project and has the Firebase Crashlytics Service Agent role.service-PROJECT_NUMBER@gcp-sa-crashlytics.iam.gserviceaccount.com
You can check this in the IAM page of the Google Cloud console (make sure to select the checkbox for Include Google-provided role grants).Send at least two events to Crashlytics and wait a couple minutes.
If you still don't see data in your realtime table, reach out to Firebase Support.
Benefits of streaming export to BigQuery
By default, data is exported to BigQuery in a daily batch export. Additionally, you can stream your Crashlytics data and Firebase sessions in realtime with BigQuery streaming. You can use streamed data for any purpose that requires live data, such as presenting information in a live dashboard, watching a rollout live, or monitoring application problems that trigger alerts and custom workflows.
When you enable streaming export to BigQuery, you'll also have realtime tables (in addition to batch tables). Both types of tables will have the same dataset schema, but here some important differences between batch tables and realtime tables:
| Batch table | Realtime table |
|---|---|
|
|
The batch table is ideal for long-term analysis and identifying trends over time because we durably store events before writing them, and they can be backfilled to the table for up to 30 days*. When we write data to your realtime table, we immediately write it to BigQuery, and so it is ideal for live dashboards and custom alerts. These two tables can be combined with a stitching query to get the benefits of both.
By default, the realtime table has a partition expiration time of 30 days. To learn how to modify this, see Set the partition expiration in the BigQuery documentation.
* See details about backfill support in Upgrade to the new export infrastructure.
Pricing and the BigQuery sandbox
If your Firebase project is on the no-cost Spark pricing plan, you can use the BigQuery sandbox, which provides no-cost access to BigQuery. For information about the BigQuery sandbox and its capabilities, see Using the BigQuery sandbox.
If your Firebase project is on the pay-as-you-go Blaze pricing plan, you can use all the features of BigQuery. Your use of BigQuery is subject to BigQuery pricing, which includes limited no-cost use.
Upgrade to the new export infrastructure for BigQuery
In mid-October 2024, Crashlytics launched a new infrastructure for batch export of Crashlytics data into BigQuery.
If you enabled batch export after October 2024, then your Firebase project is automatically using the new export infrastructure. No action is needed.
If you enabled batch export before or during October 2024, review the information in "How to upgrade to the new export infrastructure for BigQuery?" to determine if you need to take any action.
What's next?
Review example SQL queries.
Build custom dashboards using exported data and various Google Cloud services, like Looker Studio.
Learn about the dataset schema for exported data.