Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Connect to IBM Cloud Object Storage Data in DBeaver
Use the CData ODBC Driver to connect to IBM Cloud Object Storage data in DBeaver.
NOTE: The Legacy ODBC driver was removed in DBeaver Community Edition 23.1. As an alternative, you can use a CData JDBC Driver (learn how here: How to Connect DBeaver to IBM Cloud Object Storage via JDBC). If you need to use ODBC Drivers, refer to the DBeaver Documentation.
The CData ODBC Driver for IBM Cloud Object Storage enables access to live data from IBM Cloud Object Storage under the ODBC standard, allowing you work with IBM Cloud Object Storage data in a wide variety of BI, reporting, and ETL tools and directly, using familiar SQL queries. This article shows how to manage IBM Cloud Object Storage data with visual tools in DBeaver like the query browser.
The CData ODBC drivers offer unmatched performance for interacting with live IBM Cloud Object Storage data in DBeaver due to optimized data processing built into the driver. When you issue complex SQL queries from DBeaver to IBM Cloud Object Storage, the driver pushes supported SQL operations, like filters and aggregations, directly to IBM Cloud Object Storage and utilizes the embedded SQL engine to process unsupported operations (often SQL functions and JOIN operations) client-side. With built-in dynamic metadata querying, you can manage and analyze IBM Cloud Object Storage data.
Connect to IBM Cloud Object Storage
If you have not already done so, provide values for the required connection properties in the data source name (DSN). You can configure the DSN using the Microsoft ODBC Data Source Administrator. This is also the last step of the driver installation. See the "Getting Started" chapter in the Help documentation for a guide to using the Microsoft ODBC Data Source Administrator to create and configure a DSN.
Register a New Instance of Cloud Object Storage
If you do not already have Cloud Object Storage in your IBM Cloud account, follow the procedure below to install an instance of SQL Query in your account:
- Log in to your IBM Cloud account.
- Navigate to the page, choose a name for your instance and click Create. You will be redirected to the instance of Cloud Object Storage you just created.
Connecting using OAuth Authentication
There are certain connection properties you need to set before you can connect. You can obtain these as follows:
API Key
To connect with IBM Cloud Object Storage, you need an API Key. You can obtain this as follows:
- Log in to your IBM Cloud account.
- Navigate to the Platform API Keys page.
- On the middle-right corner click "Create an IBM Cloud API Key" to create a new API Key.
- In the pop-up window, specify the API Key name and click "Create". Note the API Key as you can never access it again from the dashboard.
Cloud Object Storage CRN
If you have multiple accounts, you will need to specify the CloudObjectStorageCRN explicitly. To find the appropriate value, you can:
- Query the Services view. This will list your IBM Cloud Object Storage instances along with the CRN for each.
- Locate the CRN directly in IBM Cloud. To do so, navigate to your IBM Cloud Dashboard. In the Resource List, Under Storage, select your Cloud Object Storage resource to get its CRN.
Connecting to Data
You can now set the following to connect to data:
- InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
- ApiKey: Set this to your API key which was noted during setup.
- CloudObjectStorageCRN (Optional): Set this to the cloud object storage CRN you want to work with. While the connector attempts to retrieve this automatically, specifying this explicitly is recommended if you have more than Cloud Object Storage account.
When you connect, the connector completes the OAuth process.
- Extracts the access token and authenticates requests.
- Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
Finally, set the "Map To WVarchar connection property to False in the DSN Configuration window for the driver. This configuration will allow string types to be mapped to SQL_VARCHAR and prevent SQL_WVARCHAR types from being displayed as NULL.
Connecting to the IBM Cloud Object Storage ODBC Data Source in DBeaver
- Open the DBeaver application and in the Database menu, select the New Database Connection option.
- In the 'Connect to a database' window, select ODBC and click Next.
- In the Database/Schema field, enter the DSN name (CData IBM Cloud Object Storage Source by default). It will be automatically added to the JDBC URL as well.
- Click the Test Connection button. You should receive a 'Connected' message after DBeaver has detected the DSN, along with details about the driver if the connection is successful.
Query IBM Cloud Object Storage Data
You can now query information from the tables exposed by the data source connection. You can expand the database structure in order to view all the tables. You can retrieve the table's data by right-clicking on a table name and selecting View data. The data will then be available in the Data tab.
Free Trial & More Information
At this point, you have connected to live IBM Cloud Object Storage data from DBeaver. For more information, visit the CData ODBC Driver page. Download a free, 30-day trial and start working live IBM Cloud Object Storage data DBeaver today.