Ready to get started?

Download a free trial of the IBM Cloud Object Storage Driver to get started:

 Download Now

Learn more:

IBM Cloud Object Storage Icon IBM Cloud Object Storage JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with IBM Cloud Object Storage.

Connect to IBM Cloud Object Storage Data in HULFT Integrate



Connect to IBM Cloud Object Storage as a JDBC data source in HULFT Integrate

HULFT Integrate is a modern data integration platform that provides a drag-and-drop user interface to create cooperation flows, data conversion, and processing so that complex data connections are easier than ever to execute. When paired with the CData JDBC Driver for IBM Cloud Object Storage, HULFT Integrate can work with live IBM Cloud Object Storage data. This article walks through connecting to IBM Cloud Object Storage and moving the data into a CSV file.

With built-in optimized data processing, the CData JDBC Driver offers unmatched performance for interacting with live IBM Cloud Object Storage data. When you issue complex SQL queries 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 client-side (often SQL functions and JOIN operations). Its built-in dynamic metadata querying allows you to work with and analyze IBM Cloud Object Storage data using native data types.

Enable Access to IBM Cloud Object Storage

To enable access to IBM Cloud Object Storage data from HULFT Integrate projects:

  1. Copy the CData JDBC Driver JAR file (and license file if it exists), cdata.jdbc.ibmcloudobjectstorage.jar (and cdata.jdbc.ibmcloudobjectstorage.lic), to the jdbc_adapter subfolder for the Integrate Server
  2. Restart the HULFT Integrate Server and launch HULFT Integrate Studio

Build a Project with Access to IBM Cloud Object Storage Data

Once you copy the JAR files, you can create a project with access to IBM Cloud Object Storage data. Start by opening Integrate Studio and creating a new project.

  1. Name the project
  2. Ensure the "Create script" checkbox is checked
  3. Click Next
  4. Name the script (e.g.: IBMCloudObjectStoragetoCSV)

Once you create the project, add components to the script to copy IBM Cloud Object Storage data to a CSV file.

Configure an Execute Select SQL Component

Drag an "Execute Select SQL" component from the Tool Palette (Database -> JDBC) into the Script workspace.

  1. In the "Required settings" tab for the Destination, click "Add" to create a new connection for IBM Cloud Object Storage. Set the following properties:
    • Name: IBM Cloud Object Storage Connection Settings
    • Driver class name: cdata.jdbc.ibmcloudobjectstorage.IBMCloudObjectStorageDriver
    • URL: jdbc:ibmcloudobjectstorage:ApiKey=myApiKey;CloudObjectStorageCRN=MyInstanceCRN;Region=myRegion;OAuthClientId=MyOAuthClientId;OAuthClientSecret=myOAuthClientSecret;

      Built-in Connection String Designer

      For assistance constructing the JDBC URL, use the connection string designer built into the IBM Cloud Object Storage JDBC Driver. Either double-click the JAR file or execute the JAR file from the command-line.

      java -jar cdata.jdbc.ibmcloudobjectstorage.jar

      Fill in the connection properties and copy the connection string to the clipboard.

      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:

      1. Log in to your IBM Cloud account.
      2. 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:

      1. Log in to your IBM Cloud account.
      2. Navigate to the Platform API Keys page.
      3. On the middle-right corner click "Create an IBM Cloud API Key" to create a new API Key.
      4. 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.

      1. Extracts the access token and authenticates requests.
      2. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
  2. Write your SQL statement. For example:
    SELECT Key, Etag FROM Objects
  3. Click "Extraction test" to ensure the connection and query are configured properly
  4. Click "Execute SQL statement and set output schema"
  5. Click "Finish"

Configure a Write CSV File Component

Drag a "Write CSV File" component from the Tool Palette (File -> CSV) onto the workspace.

  1. Set a file to write the query results to (e.g. Objects.csv)
  2. Set "Input data" to the "Select SQL" component
  3. Add columns for each field selected in the SQL query
  4. In the "Write settings" tab, check the checkbox to "Insert column names into first row"
  5. Click "Finish"

Map IBM Cloud Object Storage Fields to the CSV Columns

Map each column from the "Select" component to the corresponding column for the "CSV" component.

Finish the Script

Drag the "Start" component onto the "Select" component and the "CSV" component onto the "End" component. Build the script and run the script to move IBM Cloud Object Storage data into a CSV file.

Download a free, 30-day trial of the CData JDBC Driver for IBM Cloud Object Storage and start working with your live IBM Cloud Object Storage data in HULFT Integrate. Reach out to our Support Team if you have any questions.