> ## Documentation Index
> Fetch the complete documentation index at: https://docs.softr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# BigQuery

> Use BigQuery as a data source for your Softr app or dashboard.

BigQuery is a powerful cloud-based data warehouse that enables you to analyze massive datasets quickly. WithSoftr’s BigQuery integration, you can build custom dashboards, reports, and even full-fledged apps tailored to your business needs.

This integration allows you to:

* Create **real-time dashboards** and reports

* Run **custom SQL queries** for deeper insights

* Securely **control access** to data

* Share **data-driven insights** with partners and stakeholders

<Info>BigQuery is available on Business and Enterprise plans.</Info>

<Warning>
  **Important**: **BigQuery is read-only**, so you can’t add, update, or delete data via Softr. This makes blocks like Forms unusable, and you can’t manage or store Softr user data in BigQuery. However, you can still manage user data within Softr.
</Warning>

**Example Use Cases:**

* **Dashboards** – Track **user activity, app performance, and sales trends** in a single dashboard without complex analytics tools.

* **Partner Insights** – Share **product performance data** with vendors using secure, real-time BigQuery dashboards.

<iframe src="https://www.youtube.com/embed/aWCa9JmRh-o?rel=0" width="100%" height="500px" title="YouTube video" />

## **1. Connect BigQuery to Softr**

To use BigQuery in Softr, you must first **link your account**. Before connecting BigQuery to Softr, make sure you have:

* A **Google Cloud Platform** project with **BigQuery enabled**

* A **dataset** within your BigQuery project

* At least **read-only access** for Softr to your BigQuery dataset

<Steps>
  <Step title="Open data Ssurces in Softr">
    1. Navigate to **Data Sources** in your [**Softr Dashboard**](https://studio.softr.io/dashboard/data-sources).

    2. Click **Connect Data Source**.
           <Frame caption="Add, edit, or remove a datasource using the buttons on the dashboard">
             <img src="https://mintcdn.com/softr-2b8a27e1/V_SEO7jHAtPlMiPr/sdata-sources/images/bigquery/image8.png?fit=max&auto=format&n=V_SEO7jHAtPlMiPr&q=85&s=82af67a9319488628702eea7290f18c8" alt="Add, edit, or remove a datasource using the buttons on the dashboard" width="2551" height="1264" data-path="sdata-sources/images/bigquery/image8.png" />
           </Frame>
  </Step>

  <Step title="Authenticate BigQuery">
    1. Select **BigQuery** from the list of available data sources.

    2. Follow the on-screen prompts to authenticate with **Google OAuth**.

    3. **Grant Softr the necessary read-only permissions** to your BigQuery datasets.
  </Step>
</Steps>

## **2. Connect your BigQuery data to the Softr app**

Once connected, you can use your BigQuery data to build dashboards and display records in your Softr apps.

<Steps>
  <Step title="Connect your data to a dynamic block">
    To display your data in the app, connect a [dynamic block](/core-concepts-overview/c5VwEbsWtTfPyUZjmEKvfx/visualize-data-with-building-blocks/41p6U2eZs7zgY8zWmFV4eH#1859a723d691803d9551ecd7b3b0c043) (e.g. [List](/building-blocks/vikC2AWEpQGkZd4jGyoVxo/list-block/pQhPYuA28VXr5tLLFBcbCU), Chart) to your BiqQuery table:

    1. Go to the Block **source** **tab** and select your BigQuery integration.

    2. Select the **project** and **dataset** you want to connect.

    3. Pick the **table** you want to use or **create a new** **query**

    4. Optionally, select the **primary field**.<br />
           <Frame caption="Connect BigQuery to a dynamic block">
             <img src="https://mintcdn.com/softr-2b8a27e1/V_SEO7jHAtPlMiPr/sdata-sources/images/bigquery/image9.png?fit=max&auto=format&n=V_SEO7jHAtPlMiPr&q=85&s=468bd7c0ca458023e4d83f842110c7dd" alt="Connect BigQuery to a dynamic block" width="2660" height="1232" data-path="sdata-sources/images/bigquery/image9.png" />
           </Frame>
  </Step>

  <Step title="Map BigQuery fields to Softr fields">
    When you connect your table to a block, you can choose which BigQuery **properties** to display and map to a Softr field. This lets you control how your data appears in Softr.

    **Example:** If you have a **date** in BigQuery, map it to **grouping** in Softr.

    <Frame caption="Mapping fields from BigQuery to Softr">
      <img src="https://mintcdn.com/softr-2b8a27e1/V_SEO7jHAtPlMiPr/sdata-sources/images/bigquery/image10.png?fit=max&auto=format&n=V_SEO7jHAtPlMiPr&q=85&s=2aed4778ddfcfbc0898cfe010438765d" alt="Mapping fields from BigQuery to Softr" width="2660" height="1515" data-path="sdata-sources/images/bigquery/image10.png" />
    </Frame>
  </Step>
</Steps>

### **Custom SQL Queries (Optional)**

You can use **Softr’s built-in query editor** to write SQL queries directly against your BigQuery dataset for advanced data analysis.

1. Write and run **custom queries** inside Softr.

2. Connect query results to **dynamic blocks** to display **custom tables and visualizations**.

## **Troubleshooting**

If you encounter errors while connecting BigQuery to Softr, check for these common issues:

### **Error: Something went wrong “Access Denied”**

<Columns cols={2}>
  <Frame
    caption="Important part of error in text: 'Access Denied:
BigQuery BigQuery: Permission denied while globbing file pattern.',"
  >
    <img
      src="https://mintcdn.com/softr-2b8a27e1/V_SEO7jHAtPlMiPr/sdata-sources/images/bigquery/image11.png?fit=max&auto=format&n=V_SEO7jHAtPlMiPr&q=85&s=51e5d6284a81363495e96bc55c41d580"
      alt="Important part of error in text: &#x22;Access Denied:
BigQuery BigQuery: Permission denied while globbing file pattern.&#x22;,"
      width="1798"
      height="1064"
      data-path="sdata-sources/images/bigquery/image11.png"
    />
  </Frame>

  <Frame
    caption="Important part of error in text: 'Access Denied:
BigQuery BigQuery: Permission denied while getting Drive credentials.',"
  >
    <img
      src="https://mintcdn.com/softr-2b8a27e1/V_SEO7jHAtPlMiPr/sdata-sources/images/bigquery/image12.png?fit=max&auto=format&n=V_SEO7jHAtPlMiPr&q=85&s=76306ad1bf4d53e352e0ec5ada785af6"
      alt="Important part of error in text: &#x22;Access Denied:
BigQuery BigQuery: Permission denied while getting Drive credentials.&#x22;,"
      width="1899"
      height="1127"
      data-path="sdata-sources/images/bigquery/image12.png"
    />
  </Frame>
</Columns>

**Cause:** BigQuery **external tables** (from Google Drive, Sheets, or Cloud Storage) require additional permissions that Softr does not request.

**Internal vs external tables**

In BigQuery, while creating a table in some cases user can decide or has only the option to create an external datasource.

<Frame caption="user might have the option to or be forced to create an “external table”. Table creation dialog, BigQuery console.">
  <img src="https://mintcdn.com/softr-2b8a27e1/V_SEO7jHAtPlMiPr/sdata-sources/images/bigquery/image13.png?fit=max&auto=format&n=V_SEO7jHAtPlMiPr&q=85&s=a1c72b0d12bf1fe50eea8ac5c549acb5" alt="user might have the option to or be forced to create an “external table”. Table creation dialog, BigQuery console." width="510" height="254" data-path="sdata-sources/images/bigquery/image13.png" />
</Frame>

External tables are forced or available when a user creates a table from:

* A file on Google Drive with supported format (CSV, Avro, …)

* A Google Sheet document

* A file on Google Cloud Storage

If the user goes for an external table in these cases, trying to integrate such a table with Softr will give them an error message similar to those mentioned above.

To identify an existing table as either internal or external, one could take a look at table details and would see an “External data configuration” section for external tables similar to the following:

<Frame>
  <img src="https://mintcdn.com/softr-2b8a27e1/V_SEO7jHAtPlMiPr/sdata-sources/images/bigquery/image14.png?fit=max&auto=format&n=V_SEO7jHAtPlMiPr&q=85&s=ccb4c21e6fa7ff2f5cc7b87cbd826daa" alt="Notion image" width="2030" height="1818" data-path="sdata-sources/images/bigquery/image14.png" />
</Frame>

**Solution 1: Use a Native Table**

To avoid issues, set the table type to **Native Table** when creating it (if available).

<Warning>
  **Note:** A Native Table **won’t sync** with the original source, so any updates to the external source **won’t be reflected** in Softr.
</Warning>

**Solution 2: Copy the External Table**

If using a Native Table isn’t an option, create a **duplicate** of the external table as a new **Native Table** and use that in Softr.

📌 **SQL Example:**

```sql theme={null}
sql
CopyEdit
CREATE TABLE native_table_copy AS
SELECT * FROM external_table;
```

<Warning>
  **Downside:** This method **duplicates data**, which may increase storage costs.
</Warning>

### Error: Google BigQuery does not stay connected to Softr

This issue is caused by the Reauthentication Policy settings in Google Admin console.

To resolve things you can:

Set Softr as a Trusted App and then exempt Trusted Apps from reauthentication.<br />
Alternatively, you can change the settings to never require reauthentication for any app.

See this link ([https://support.google.com/a/answer/9368756](https://support.google.com/a/answer/9368756)) for more details on this. Once you have changed your settings in Google Admin, please reconnect your Google account with Softr.
