Google BigQuery Analytics - AgenticBI Integration

AgenticBI enables data discovery, query, aggregation, visualization and reporting automation from Google BigQuery along with other unstructured and structured datasources.

Overview

  1. Connect, extract and transform data from your Google BigQuery through our UI to connect directly.

  2. Visualize and Automate your Reporting instantly.

UI Based Approach

Connecting

In a UI-based approach, AgenticBI provides two methods to establish a connection:

I. Connecting by OAuth
II. Connecting by Credentials File

Method I: Connecting by OAuth

  1. Log in to AgenticBI and select Queries from the left sidebar.

  2. Click on New Datasource + button and select Google BigQuery from the list of datasources.

  3. After navigating to the New Datasource page, either use the pre-configured settings into AgenticBI's own demo Google BigQuery database or follow the prompts and configure the following details to set up connectivity to your own Google BigQuery database:

    a. Datasource Name: Enter a name for your datasource
    b. Authentication Type: Select authorization type OAuth from the dropdown menu
    c. Google BigQuery Project Name: Select the project Name associated with this account (It appears if OAuth is selected)
    d. Writeable Destination:: If selected, you can write datasets into this schema. When saving a query, this database will be available as a destination for the resulting dataset.
    e. Refresh Token: This is used to connect and pull your BigQuery data (It appears if OAuth is selected)

  4. Click on Save button and start Querying.

adding-googlebigquery

Method II: Connecting by Credential File

The credential file is referred to as a service account key or JSON key file. This file contains the necessary credentials and authentication information required to set up a connection with GCP services & APIs.

Before you can connect to a BigQuery project, it is necessary to create a service account in the GCP console with added access permissions and download the credentials file by following the below steps:

Create Service Account

To create a service account in the GCP console, please refer to this Create Service Accounts guide.

While creating a service account, you will need to grant it specific access permissions called Roles.

Have a look at the three basic roles to choose from below:

Role Description
Editor View, create, update, and delete most Google Cloud resources
Owner Full access to most Google Cloud resources
Viewer View most Google Cloud resources

adding-googlebigquery

Download Credentials File

Step 1: Launch your web browser and navigate to the Google Cloud Console (https://console.cloud.google.com). Make sure you are logged in with the appropriate Google account that has access to the desired GCP project.

adding-googlebigquery

Step 2: Select the project for which you want to download the credentials file from the top navigation.

adding-googlebigquery

Step 3: Click on the Navigation Menu and select IAM from the drop-down menu given under the IAM & Admin section.

adding-googlebigquery

You will be redirected to the Project page.

adding-googlebigquery

Step 4: Click on the Service Accounts option from the left sidebar.

adding-googlebigquery

Step 5: Locate the service account for which you want to download the credentials file and click on it.

adding-googlebigquery

Step 6: In the Service account details page, click on the KEYS tab from the top navigation.

adding-googlebigquery

Step 7: Click on the ADD KEY button and select Create new key from the dropdown menu.

adding-googlebigquery

A Create Private Key dialog will appear.

adding-googlebigquery

Step 8: Select the key type as JSON and click on the CREATE button to download the credentials file to your local system.

The file will have a .json extension and contains the necessary credentials for authenticating your applications with GCP services.

adding-googlebigquery

Connect Datasource

  1. Log in to AgenticBI and select Queries from the left sidebar.

  2. Click on New Datasource + button and select Google BigQuery from the list of datasources.

  3. After navigating to the New Datasource page, either use the pre-configured settings into AgenticBI's own demo Google BigQuery database or follow the prompts and configure the following details to set up connectivity to your own Google BigQuery database:

    a. Datasource Name: Enter a name for your datasource
    b. Authentication Type: Select authorization type Credential File from the dropdown menu
    c. Credential File: Name of your uploaded credential JSON file (It appears if Credential File is selected)
    d. Upload file: Click on the Upload file option to upload the credential JSON file.

  4. Click on the Save button to start querying.

adding-googlebigquery

Query

Step 1: Query using a visual builder or query editor

Visual Builder: After connecting to the Google BigQuery datasource, AgenticBI will pull out a list of tables along with field samples. Using these tables, you can automatically generate queries through our visual builder in a no-code environment by either dragging and dropping fields or making your selections through the drop-down.

visual-builder

Tip: You can also write queries directly in the Query Editor, a versatile text editor that offers more advanced editing functionalities like BigQuery Query, support for multiple language modes, Cloud9QL, and more.

Furthermore, you can also use the Format button in the query editor to auto-format the query text for indentation, spaces, and more.

Query PostgreDB

Step 2: Define data execution strategy by using any of the following two options:

  • Direct Execution: Directly execute the Query on the original Datasource, without any storage in between. In this case, when a widget is displayed, it will fetch the data in real time from the underlying Datasource.

  • Non-Direct Execution: For non-direct queries, results will be stored in AgenticBI's Elastic Store. Benefits include- long-running queries, reduced load on your database, and more.

Non-direct execution can be put into action if you choose to run the Query once or at scheduled intervals. For more information, feel free to check out this documentation- Defining Data Execution Strategy

data-strategy

Step 3: Click on the Preview button to analyze the results of your Query and fine-tune the desired output, if required.

preview

The result of your Query is called Dataset. After reviewing the results, name your dataset and then hit the Create & Run button.

create-and-run