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

# Grant BigQuery access to SegmentStream

> Grant the required IAM roles to the SegmentStream service account so it can access your BigQuery data warehouse.

We will need access to your BigQuery, which will serve as the repository for your SegmentStream project.

Below are the steps that explain how to provide the necessary project access:

<Steps>
  <Step title="Open your SegmentStream project">
    Open your SegmentStream project.
  </Step>

  <Step title="Copy the service account email">
    Navigate to **Settings** then **BigQuery**, and copy the service account email.

    <img src="https://mintcdn.com/segmentstream/8dSgvo9-hrckH6OT/images/bigquery-service-account-email.png?fit=max&auto=format&n=8dSgvo9-hrckH6OT&q=85&s=89cd85b377eb55148038984967b1274f" alt="Service account email" width="2736" height="1570" data-path="images/bigquery-service-account-email.png" />
  </Step>

  <Step title="Open IAM in Google Cloud Console">
    Go to the [IAM page](https://console.cloud.google.com/iam-admin/iam) in the Google Cloud Console and select the project you want to connect with SegmentStream.
  </Step>

  <Step title="Grant access">
    Click **GRANT ACCESS**.

    <img src="https://mintcdn.com/segmentstream/HHSEerpjaIkgmIQp/images/gcp-iam-grant-access.png?fit=max&auto=format&n=HHSEerpjaIkgmIQp&q=85&s=9f9539bf28f6d7ed988187e8dc5ac88b" alt="Grant access button" width="2400" height="1398" data-path="images/gcp-iam-grant-access.png" />
  </Step>

  <Step title="Configure roles">
    Paste the service account email address into the **New principals** field. Select the [**BigQuery Data Editor** and **BigQuery User**](https://cloud.google.com/bigquery/docs/access-control#bigquery-roles) roles. Click **Save**.

    <img src="https://mintcdn.com/segmentstream/ZFr6pt66noWB70nu/images/gcp-iam-roles.png?fit=max&auto=format&n=ZFr6pt66noWB70nu&q=85&s=afe8bcfd020b2284e366c419783bb4a8" alt="IAM roles configuration" width="2540" height="1698" data-path="images/gcp-iam-roles.png" />
  </Step>

  <Step title="Test the connection">
    Return to your SegmentStream project and navigate to **Settings** then **BigQuery**. Check access by clicking the **TEST AND CONNECT BIGQUERY** button.

    <img src="https://mintcdn.com/segmentstream/tZxzK_JuWWbPuION/images/bigquery-test-connect.png?fit=max&auto=format&n=tZxzK_JuWWbPuION&q=85&s=e669cf7dad86b6ff73c037df55b9daf6" alt="Test and connect BigQuery" width="2736" height="1570" data-path="images/bigquery-test-connect.png" />
  </Step>
</Steps>

You can now follow the [BigQuery guide](/project-configuration/data-warehouse/google-bigquery) to complete the connection.
