Data Connection to Google BigQuery

  • Last update:August 02, 2024
  • Overview

    Version

    Report Server Version
    JAR Package VersionFunctional Change

    11.0

    /

    Supported the data connection to Google BigQuery.

    Application Scenario

    BigQuery is a fully-managed enterprise data warehouse, helping you manage and analyze data using built-in capabilities such as machine learning, geospatial analytics, and business intelligence. This document will introduce how to connect Google BigQuery to FineReport through JDBC drivers (namely, CData drivers or Simba drivers).

    CData Driver

    Driver Preparation

    Driver Download

    Driver Installation
    Download Address

    Choose the appropriate installation package for different system environments such as Windows/Cross-Platform Unix/Linux/Mac and download it.

    https://www.cdata.com/drivers/bigquery/jdbc/

    Driver Installation

    1. Install the driver by decompressing the downloaded package.

    The following figure shows the directory structure after installation.

    Google BigQuery 資料連結 图1.png

    iconNote:
    The CData driver can be trialed for free within one month and will be chargeable for further use. This section uses the trial version for testing.


    iconNote:
    The readme.htm file contains instructions for using the driver, which can be used for reference.


    2. Choose System Management > Data Connection > Data Connection Management and click Driver Management to create a driver named cdata.jdbc.googlebigquery.GoogleBigQueryDriver.

    Google BigQuery 資料連結 图2.png

    3. Click Upload File and select the JAR package in \CData JDBC Driver for Google BigQuery 2023\lib. After the package is uploaded successfully, select cdata.jdbc.googlebigquery.GoogleBigQueryDriver from the Driver drop-down list.

    Connection Information Collection

    1. In the driver installation directory, open the command prompt, and run the java -jar cdata.jdbc.googlebigquery.jar command to open the connection test window provided by CData.

    2. Set required parameters, as shown in the following table.

    Configuration Item
    Value

    AuthScheme

    OAuth

    ProjectId

    Corresponding project ID

    InitiateOAuth

    GETANDREFRESH


    3. Click Test Connection to test the connection. In this case, the user OAuth authorization process webpage will automatically pop up. The connection can be successful only after you agree to the authorization to store account information. For details, see https://cdn.cdata.com/help/DBG/jdbc/pg_oauthembeddedapp.htm.

    iconNote:
    The identity authentication method includes user account authentication and service account authentication. User account authentication is used in this test.


    4. After the connection test is successful, copy the connection information in Connection String (required for later FineReport connection) in the lower part of the page, for example, jdbc:cdata:googlebigquery:InitiateOAuth=GETANDREFRESH;ProjectId=NameOfProject;DatasetId=NameOfDataset.

    Simba Driver

    Driver Preparation

    Driver Download

    Driver InstallationDownload Address

    Choose the appropriate installation package for different system environments such as Windows/Cross-Platform   Unix/Linux/Mac and download it.

    ODBC and JDBC drivers for BigQuery | Google Cloud

    Driver Installation

    1. Decompress the downloaded driver package.

    2. Choose System Management > Data Connection > Data Connection Management and click Driver Management to create a driver named SimbaJDBCDriverforGoogleBigQuery.

    3. Click Upload File and select all files in the folder obtained after decompression. After the files are uploaded successfully, select com.simba.googlebigquery.jdbc.Driver from the Driver drop-down list.

    Connection Information Collection

    Obtain the connection URL by referring to Installation and Configuration Guide.

    Using a Google User Account

    Using a Google Service Account

    1. Obtaining the Project ID (as the Value of ProjectId)

    Create a service account by referring to Google official document.

    iconNote:
    Skip this step if you already have a service account.

    (1) Access the Service accounts page and create a project, as shown in the following figure.

    Google BigQuery 資料連結 图1.png

    (2) Enter required information according to the actual situation and click CREATE to obtain the corresponding project ID (as the value of ProjectId) from this page.

    Google BigQuery 資料連結 图2.png

    2. Obtaining the Email Address (as the Value of OAuthServiceAcctEmail)

    Create a service account by entering required information step by step, and obtain the corresponding email address (as the value of OAuthServiceAcctEmail) from this page, as shown in the following figure.

    Google BigQuery 資料連結 图3.png

    3. Obtaining the Key File (as the Value of ServiceKeyFile)

    Click the email address of the created service account and choose KEYS > ADD KEY > Create new key, as shown in the following figure.

    Google BigQuery 資料連結 图4.png

    Select the required key type and click CREATE. The key file will be automatically downloaded to the local computer, as shown in the following figure.

    Google BigQuery 資料連結 图5.png

    Specific Connection Procedure

    FineReport provides two data connection methods:

    Method 1: Perform data connection in the designer. For details, see [Designer] JDBC Data Connection.

    Method 2: Perform data connection on the decision-making platform. This document mainly describes this method.

    1. Log in to the decision-making platform as the admin, choose System Management > Data Connection > Data Connection Management, and click New Data Connection.

    2. Choose Others > Other JDBC.

    iconNote:
    If you (not the admin) want to configure data connection, you need to be assigned the using permission of Data Connection in System Management by the admin. For details, see Data Connection Permission Overview.


    CData Method

    1. Select Custom from the Driver drop-down list, select your own driver, and enter the connection information obtained in section "Connection Information Collection."

    Google BigQuery 資料連結 图11.png

    The following table describes CData configuration items.

    Configuration Item
    ValueRemark

    Driver

    cdata.jdbc.googlebigquery.GoogleBigQueryDriver

    Enter the driver added in section "Driver Installation" here. You can manually enter it.

    Data Connection URL

    Connection information in Connection String copied in section "Connection Information Collection"

    Example: jdbc:cdata:googlebigquery:InitiateOAuth   = GETANDREFRESH;ProjectId = NameOfProject;DatasetId = NameOfDataset

    Username/Password

    Account and password of the actual database

    /

    Test Before Connection

    No

    You need to manually change the value from Yes (default value) to No.

    4. Click Test Connection. If the connection is successful, click Save.

    Simba Method

    Using a Google User Account

    1. Select Custom from the Driver drop-down list, select your own driver, and enter the connection information obtained in "Using a Google User Account" of section "Connection Information Collection."

    Google BigQuery 資料連結 图12.png

    The following table describes Simba configuration items.

    Configuration ItemValueRemark

    Driver

    com.simba.googlebigquery.jdbc.Driver

    Select the driver added in section "Driver Installation" here. You can manually enter the driver.

    Data Connection URL

    Connection information obtained in "Using a Google User Account" of section "Connection Information Collection"

    Example: jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=civil-sentry-309307;OAuthType=1

    Username/Password

    Account and password of the actual database

    /

    Test Before Connection

    No

    You need to manually change the value from Yes (default value) to No.

    2. Click Test Connection. You will be automatically directed to the Google account login page. After login, click Allow.

    3. Return to the data connection page. If the connection is successful, click Save.

    Using a Google Service Account

    1. Select Custom from the Driver drop-down list, select your own driver, and enter the connection information obtained in

    "Using a Google Service Account" of section "Connection Information Collection."

    Google BigQuery 資料連結 图6.png

    The following table describes Simba configuration items.

    Configuration ItemValueRemark

    Driver

    com.simba.googlebigquery.jdbc.Driver

    Select the driver added in section "Driver Installation" here. You can manually enter the driver.

    Data Connection URL

    Connection information obtained in "Using a Google Service Account" of section "Connection Information Collection"

    Example:

    jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=doc-project-431101;OAuthType=0;OAuthServiceAcctEmail=doc-simba@doc-project-431101.iam.gserviceaccount.com;OAuthPvtKeyPath=C:/Users/Lauren/Downloads/doc-project-431101-fbc864ef47a2.json;

    Test Before Connection

    No

    You need to manually change the value from Yes (default value) to No.

    2. Click Test Connection. If the connection is successful, click Save.

    Adding Tables in Databases to FineReport

    For details, see Dataset.

     


    Attachment List


    Theme: Data Preparation
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy