6.0
/
When the volume of data in Google BigQuery to be connected to FineBI is tens of millions, performance problems may occur if you directly invoke BigQuery APIs through server datasets. This document will introduce how to connect Google BigQuery to FineBI through JDBC drivers (namely, CData drivers or Simba drivers).
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/
1. Install the driver by decompressing the downloaded package.
The following figure shows the directory structure after installation.
2. Choose System Management > Data Connection > Data Connection Management and click Driver Management to create a driver named cdata.jdbc.googlebigquery.GoogleBigQueryDriver.
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.jar.GoogleBigQueryDriver from the Driver drop-down list.
1. In the driver lib 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.
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.
4. After the connection test is successful, copy the connection information in Connection String (required for later FineBI connection) in the lower part of the page, for example, jdbc:cdata:googlebigquery:InitiateOAuth = GETANDREFRESH;ProjectId = NameOfProject;DatasetId = NameOfDataset.
ODBC and JDBC drivers for BigQuery | Google Cloud
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 except slf4j-api-1.7.36.jar in the folder obtained after decompression. After the files are uploaded successfully, select com.simba.googlebigquery.jdbc.Driver from the Driver drop-down list.
Obtain the connection URL by referring to Installation and Configuration Guide.
1. Obtaining the Project ID (as the Value of ProjectId)
Create a service account by referring to Google official document.
(1) Access the Service accounts page and create a project, as shown in the following figure.
(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.
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.
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.
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.
1. Log in to FineBI as the admin, choose System Management > Data Connection > Data Connection Management, and click New Data Connection.
2. Choose Others > Other JDBC.
1. Select Custom from the Driver drop-down list, select your own driver, and enter the connection information obtained in "Connection Information Collection" of section "CData Driver."
The following table describes CData configuration items.
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 "Connection Information Collection" of section "CData Driver"
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.
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."
The following table describes Simba configuration items.
com.simba.googlebigquery.jdbc.Driver
Select the driver added in section "Driver Installation" here. You can manually enter the driver.
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
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.
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."
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;
2. Click Test Connection. If the connection is successful, click Save.
For details, see Dataset.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy