Skip to main content

Home

Unravel for BigQuery Setup Guide

Overview

Unravel for Google Cloud BigQuery delivers observability and AI-driven optimization for BigQuery environments. The platform analyzes job, query, and billing metadata to highlight actionable insights, uncover inefficiencies, and provide recommendations that improve performance and control cloud costs.

Unravel for Google Cloud BigQuery utilizes a secure, scalable SaaS architecture designed to enable the monitoring and optimization of BigQuery workloads without requiring the movement or exposure of sensitive data.

Final_Architecture_image.png
  • User access: Users interact with Unravel through the web interface, REST API clients, or receive notifications by email, Slack, Microsoft Teams, or GitHub Actions. Authentication uses single sign-on (SSO), local credentials, or tokens.

  • Unravel SaaS environment: Unravel runs on Google Kubernetes Engine (GKE) within a dedicated VPC on Google Cloud. Core services include the UI and API service, notification service, and worker processes. All collected metadata and metrics are stored securely in our internal data store.

  • Data collection: Unravel worker services run in the SaaS environment and connect securely to your BigQuery environment. Workers access information schema views, billing export tables, and REST API endpoints to collect metadata, job details, and billing information. All access uses only the necessary IAM roles and secure, authenticated channels.

  • Customer data: Unravel collects authorized metadata, job information, and billing details. Raw table data, query results, or sensitive content do not leave your environment. All communication uses HTTPS/TLS for security.

Before you begin

Before you begin onboarding, ensure you have:

Permissions for the required Google Cloud IAM roles

The following predefined Google Cloud IAM roles must be granted to your authentication identity (service account or workload identity):

View / API Permissions

Role

Permissions Granted

Views/APIs

roles/bigquery.resourceViewer

  • bigquery.jobs.listAll

  • bigquery.jobs.get

roles/bigquery.metadataViewer

  • bigquery.tables.get

  • bigquery.tables.list

  • bigquery.routines.get

  • bigquery.routines.list

  • bigquery.datasets.get

roles/bigquery.resourceViewer

  • resourcemanager.projects.get

  • bigquery.reservationAssignments.search

  • Method: projects.get

  • Method: projects.getAncestry

  • Method: projects.locations.searchAllAssignments

roles/bigquery.user

bigquery.transfers.get

    Method: transferConfigs.list

    Operation Permissions

    Role

    Permissions Granted

    Usage

    roles/bigquery.user

    • bigquery.jobs.create

    • serviceusage.services.use

    Allows Unravel to run BigQuery jobs.

    Note

    You do not need to grant the bigquery.jobs.create permission to monitored projects if the polling project is already configured.

    roles/bigquery.resourceAdmin

    • recommender.bigqueryCapacityCommitmentsInsights.get

    • recommender.bigqueryCapacityCommitmentsInsights.list

    • recommender.bigqueryCapacityCommitments

    • Recommendations.get

    • recommender.bigqueryCapacityCommitments

    • Recommendations.list

    Allows you to receive insights and recommendations from Google.

    No predefined roles are available.

    • recommender.bigqueryPartitionClusterRecommendations.get

    • recommender.bigqueryPartitionClusterRecommendations.list

    Allows you to receive insights and recommendations from Google.

    Polling projects Permissions

    A polling project is a project Unravel uses to run queries and retrieve metadata.

    Role

    Permissions Granted

    Usage

    roles/bigquery.user

    bigquery.jobs.create

    Allows Unravel to run BigQuery jobs.

    If Unravel polls jobs data from a custom table (for example, during data de-identification), you also need to grant the following permission to the polling project.

    Role

    Permissions Granted

    Usage

    roles/bigquery.dataViewer

    • bigquery.datasets.get

    • bigquery.tables.getdata

    • bigquery.tables.get

    Allows you to retrieve metadata from a custom table.

    Admin project Permissions
    View / API Permissions

    Role

    Permissions Granted

    Views/APIs

    roles/bigquery.resourceViewer

    • bigquery.reservations.list

    • bigquery.reservationAssignments.list

    Operation Permissions

    Role

    Permissions Granted

    Usage

    roles/bigquery.user

    bigquery.jobs.create

    Allows Unravel to run BigQuery jobs.

    Billing project Permissions
    View / API Permissions

    Role

    Permissions Granted

    Usage

    roles/bigquery.dataViewer

    • bigquery.datasets.get

    • bigquery.tables.getdata

    • bigquery.tables.get

    Billing Export Table [Detailed usage cost] (gcp_billing_export_resource_v1_<BILLING_ACCOUNT_ID>)

    Operation Permissions

    Role

    Permissions Granted

    Usage

    roles/bigquery.user

    bigquery.jobs.create

    Allows Unravel to run BigQuery jobs.

    Monitoring projects Permissions
    View / API Permissions

    Service

    Method

    Permissions Granted

    Views/APIs

    bigquery.googleapis.com

    • bigquery.jobs.listAll

    bigquery.googleapis.com

    • bigquery.tables.get

    • bigquery.tables.list

    • bigquery.routines.get

    • bigquery.routines.list

    • bigquery.datasets.get

    bigquery.googleapis.com

    ReservationService.SearchAllAssignments

    bigquerydatatransfer.googleapis.com

    * (only option with GCP)

    recommender.googleapis.com

    * (only option with GCP)

    Operation Permissions

    Service

    Methods

    Permissions Granted

    Usage

    bigquery.googleapis.com

    • bigquery.jobs.create

    Allows Unravel to run BigQuery jobs.

    Note

    Although these services are not listed in the official VPC Service Controls supported method restrictions, they may still appear as selectable options in the service list.

    • bigquerydatatransfer.googleapis.com

    • recommender.googleapis.com

    SaaSsetup_4827_1.jpg
    Saassetup-4827-1.jpg
    Polling projects Permissions

    A polling project is a project Unravel uses to run queries and retrieve metadata.

    Service

    Methods

    Permissions Granted

    Usage

    bigquery.googleapis.com

    bigquery.jobs.create

    Allows Unravel to run BigQuery jobs.

    If Unravel polls jobs data from a custom table (for example, during data de-identification), you also need to grant the following permission to the polling project.

    Service

    Methods

    Permissions Granted

    Usage

    bigquery.googleapis.com

    • bigquery.datasets.get

    • bigquery.tables.getdata

    • bigquery.tables.get

    Allows you to retrieve metadata from a custom table.

    Admin project Permissions
    View / API Permissions

    Service

    Methods

    Permissions Granted

    Views/APIs

    bigquery.googleapis.com

    • ReservationService.GetCapacityCommitment

    • ReservationService.ListCapacityCommitments

    • bigquery.reservations.list

    • bigquery.reservationAssignments.list

    • bigquery.capacityCommitments.list

    Operation Permissions

    Service

    Methods

    Permissions Granted

    Usage

    bigquery.googleapis.com

    bigquery.jobs.create

    Allows Unravel to run BigQuery jobs.

    Billing project Permissions
    View / API Permissions

    Service

    Methods

    Permissions Granted

    Usage

    bigquery.googleapis.com

    • bigquery.datasets.get

    • bigquery.tables.getdata

    • bigquery.tables.get

    Billing Export Table [Detailed usage cost] (gcp_billing_export_resource_v1_<BILLING_ACCOUNT_ID>)

    Operation Permissions

    Service

    Methods

    Permissions Granted

    Usage

    bigquery.googleapis.com

    bigquery.jobs.create

    Allows Unravel to run BigQuery jobs.

    4827-3.jpg
    4827-4.jpg

    Unravel supports two authentication methods when accessing your GCP resources for BigQuery monitoring. Choose one based on organizational policy.

    Provide credentials via Workload Identity Federation or Single Key (Service Account Key).

    • Workload Identity Federation: Securely allows Unravel to access your GCP resources without sharing keys.

    • Single Key (Service Account JSON key): Provide Unravel with a GCP service account key file with the required permissions.

    Complete this step only if you have not already configured BigQuery billing export in your environment.

    You need the following to set up the exporting of the GCP billing data for Unravel:

    • Either the Billing Accounts Costs Manager role or the Billing Account Administrator role on the target Cloud Billing account.

    • BigQuery user role for the project in which you want to export the billing data.

    Run the following steps to set up the exporting of the GCP billing data for the projects monitored by Unravel.

    1. From the GCP console, choose a project to export the GCP billing data.

      Note

      Ensure this is also the same project that you want Unravel to monitor.

      freemium-export-billing-choose-project.png
    2. Export the GCP billing data of the billing account you want to integrate with Unravel to the chosen project. Do the following to export the billing data:

      1. Search for the Billing Exports page and select the Cloud billing account you want to integrate with Unravel.

        freemium-export-billing-search-billing.png
        freemium-export-billing-search-billing1.png
      2. In the Detailed Usage Cost section, click the Edit Settings button and choose the project you selected to export the GCP billing data.

        freemium-export-billing-edit-settings.png
      3. From the Dataset ID drop-down, select a dataset to export the billing data or create a new dataset.

        freemium-export-billing-create-dataset.png
      4. Confirm that the project and the dataset in which you want to export the billing data are correct, and then click Save.

        freemium-export-billing-click-save.png
      5. In the Billing export page > Detailed usage cost section, check and ensure that the Detailed usage cost is shown as Enabled and your selected project ID and dataset are displayed.

      The table creation process in the chosen dataset will take a few minutes.

    3. Note the following billing export details and keep them handy:

      • Dataset ID

      • Table ID

      • Billing Export project ID

      • Billing Export Dataset ID

      • Billing Export Table Name

      • Note

        The administrator project manages the BigQuery Reservations resources and is the primary billing source for these resources. This project need not be the same project with BigQuery jobs. Google recommends creating a dedicated project for Reservations resources.

    Getting started with Unravel for BigQuery

    1. After your Unravel account is set, you will receive an email with the following details. Keep these handy to access your Unravel UI and integrate the BigQuery projects.

      • URL to access Unravel (BigQuery) SaaS

      • Login credentials

      • Service account

    2. Run the following steps to integrate your BigQuery projects for Unravel monitoring:

      1. Click the URL that you have received in the email and access the Unravel UI.

      2. Enter the login credentials received by email on the login page. The Unravel UI is displayed.

        login.png
        unravel-ui.png
      3. From the top right, click manage1.png and select BigQuery configuration. The BigQuery account setting page is displayed.

      4. Specify the following details:

        • In the Monitored projects section, specify the Project IDs you have integrated using Terraform.

        • In the Administrator Projects section, specify the admin project ID.

        • In the Google Cloud Billing Export Data section, specify the Project ID, Dataset ID, and Table ID. Refer to Prerequisites.Prerequisites for BigQuery SaaS setup

      5. Click the Save button. The BigQuery projects are successfully integrated, and you can monitor these projects from the Unravel UI. In case any errors are shown, you must fix it and click the Save button again.