> Site index: https://usehardal.com/llms.txt
> Every content route also serves markdown at <url>.md

# How to Import Hardal First-Party Data to BigQuery

Connect Hardal DB (SQL) to BigQuery using your dataset MySQL credentials and analyze first-party data in GCP.

Source: https://usehardal.com/import-hardal-first-party-data-to-bigquery
Published: 2025-11-10
Updated: 2026-05-21
Author: Berkay Demirbas
Category: BigQuery

---

If you use Hardal to collect first-party data (1PD), you can bring that data into **Google BigQuery** and analyze it alongside your other marketing and product datasets.

⚠️ **Disclaimer:** Make sure your regulations allow you to store and process first-party data in BigQuery. See GDPR and the [Google Cloud Privacy Policy](https://cloud.google.com/privacy/gdpr).

## How it works

Hardal stores your prepared datasets in **Hardal DB** — a SQL database you can connect to with standard MySQL credentials. BigQuery reads from that database; you do not need custom scripts or Cloud Functions.

The flow is simple:

1. Build a dataset in Hardal **Data Hub**
2. Copy the **MySQL connection details** from the Hardal panel
3. Connect BigQuery to Hardal DB and load or query your tables

> For real-time server-side event streaming (without Data Hub), see [Server-Side Streaming to BigQuery](https://usehardal.com/server-side-streaming-to-bigquery). This guide is for **dataset / report data** already available in Hardal DB.

![BigQuery External Connection](https://imge.usehardal.com/cdn/post-contents/import-hardal-first-party-data-to-bigquery/4c21affd-5e2e-433e-b6a1-3a759c0b7955.png)

## Step 1: Prepare your dataset in Hardal

1. Open your Hardal project at [app.usehardal.com/projects](https://app.usehardal.com/projects) and select your signal.
2. Go to **Analytics → Data Hub** and create a new dataset (or open an existing one). Learn more in the [Data Hub glossary](https://usehardal.com/glossary/data-hub).
3. When the dataset is ready, open its details and click **Connect**.
4. Save the **MySQL credentials** shown in the dialog:
   - Host
   - Port
   - Database
   - Username
   - Password

These credentials point to the SQL tables that back your Hardal dataset. The same connection works for Looker Studio, Power BI, Tableau, and BigQuery — see our [Looker Studio guide](https://usehardal.com/tr/hardal-verilerini-looker-studio-aktarma) for the same MySQL connection flow in another BI tool.

## Step 2: Connect BigQuery to Hardal DB

In the [Google Cloud Console](https://console.cloud.google.com/), open **BigQuery** for your GCP project.

1. Go to **Connections** (or **Add data**, depending on your console layout).
2. Create a connection to an external **MySQL** data source.
3. Enter the MySQL details from Hardal (**host, port, database, user, password**).
4. Choose a **region** that matches where you plan to store BigQuery datasets and tables.

If your organization restricts inbound database access, allowlist the IP ranges Google Cloud uses for BigQuery connections, or ask Hardal support to enable access for your GCP project.

![BigQuery External Connection](https://imge.usehardal.com/cdn/post-contents/import-hardal-first-party-data-to-bigquery/r8f2jja4a71w8naeuwf0.png)

## Step 3: Bring Hardal tables into BigQuery

After the connection is validated:

1. Select the Hardal database and the tables you need (they correspond to the datasets and reports you built in Data Hub).
2. Either **query the data through the connection** for exploration, or **create native BigQuery tables** so queries run faster and you can join with GA4 exports, ads data, CRM tables, and other sources in the same project.
3. For recurring updates, set up a **scheduled transfer or refresh** so BigQuery stays in sync with Hardal DB according to how often your dataset is updated in Hardal.

> **Tip:** Keep your MySQL connection and BigQuery datasets in the **same region** to avoid cross-region latency and extra cost.

![BigQuery Table](https://imge.usehardal.com/cdn/post-contents/import-hardal-first-party-data-to-bigquery/5ece9bb1-a364-47bb-bdf4-bed5d0566206.png)

## What you get in BigQuery

Once the link is in place, your Hardal first-party fields — sessions, campaigns, events, custom properties, and attribution columns from Data Hub — are available as structured tables in BigQuery. You can:

- Build dashboards in Looker or Looker Studio on top of BigQuery
- Join Hardal data with GA4 BigQuery exports or ad platform data
- Run SQL for cohort, funnel, and LTV analysis at scale

🎊 **Congratulations!** Your Hardal first-party data is ready to use in BigQuery.

![BigQuery Table](https://imge.usehardal.com/cdn/post-contents/import-hardal-first-party-data-to-bigquery/a5c3bad9-2a9c-4143-b598-7678fa514009.png)
