![]() |
VOOZH | about |
The CData JDBC Driver for Google Data Catalog enables you to execute queries to Google Data Catalog data in tools like Squirrel SQL Client. In this article, you will create a JDBC data source for Google Data Catalog data and execute queries.
Follow the steps below to add the driver JAR.
Follow the steps below to save connection properties in the driver alias.
In the Add Alias wizard that opens, the following fields are required for the JDBC driver:
Google Data Catalog uses the OAuth authentication standard. Authorize access to Google APIs on behalf on individual users or on behalf of users in a domain.
Before connecting, specify the following to identify the organization and project you would like to connect to:
Click the project selection drop-down, and select your organization from the list. Then, click More -> Settings. The organization ID is displayed on this page.
Find this by navigating to the cloud console dashboard and selecting your project from the Select from drop-down. The project ID will be present in the Project info card.
When you connect, the OAuth endpoint opens in your default browser. Log in and grant permissions to the application to completes the OAuth process. For more information, refer to the OAuth section in the Help documentation.
Below is a typical connection string:
jdbc:googledatacatalog:ProjectId=YourProjectId;InitiateOAuth=GETANDREFRESH;π Connection properties automatically detected by Squirrel SQL. (Salesforce is shown.)
After the metadata has loaded, a new tab for the Google Data Catalog data source is displayed. On the Objects subtab, you can discover schema information, such as the available tables and views.
π Column metadata for a table. (Salesforce is shown.)
To view table data, select the table on the Objects tab. The table data is then loaded in a grid on the Content tab.
π Tables can be edited on the Content tab. (Salesforce is shown.)To execute an SQL query, enter the query on the SQL tab and then click Run SQL (the runner icon). For example:
SELECT Type, DatasetName FROM Schemas WHERE ProjectId = 'bigquery-public-data'π A query and the results. (Salesforce is shown.)
Download a free trial of the Google Data Catalog Driver to get started:
Download NowLearn more:
π Google Data Catalog IconRapidly create and deploy powerful Java applications that integrate with Google Data Catalog.