製品をチェック

無償トライアル:

無償トライアルへ

製品の情報と無償トライアルへ:

IBM Cloud Object Storage JDBC Driver

IBM Cloud Object Storage データに連携するJava アプリケーションを素早く、簡単に開発できる便利なドライバー。

データ連携でお困りですか?

お問い合わせ

Clover ETL からIBM Cloud Object Storage データに連携


データ連携ツールのCloverETL のビジュアルワークフローでIBM Cloud Object Storage データ連携を作成。


加藤龍彦
ウェブデベロッパー

ibmcloudobjectstorage ロゴ画像

JDBC Driver

jdbc ロゴ画像
CloverDX ロゴ画像

CData JDBC Driver for IBMCloudObjectStorage は、CloverETL からIBM Cloud Object Storage へのクエリ 処理を実現します。本記事では、CloverETL でJDBC Driver を使い、IBM Cloud Object Storage をシンプルなCSV ファイルに変換します。

JDBC Data Source でIBM Cloud Object Storage に接続

  1. IBM Cloud Object Storage データへの連携を作成します。CloverETL の新しいgraph で、Outline ペインのConnections ノードを右クリックして、Create Connection をクリックします。Database Connection ウィザードが表示されます。
  2. +アイコンをクリックして、.jar ファイルをロードします。インストールディレクトリのlib フォルダの cdata.jdbc.ibmcloudobjectstorage.jar ファイルを選択します。
  3. JDBC URL を入力します。一般的な接続文字列は: jdbc:ibmcloudobjectstorage:ApiKey=myApiKey;CloudObjectStorageCRN=MyInstanceCRN;Region=myRegion;OAuthClientId=MyOAuthClientId;OAuthClientSecret=myOAuthClientSecret;

    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.
Required connection properties specified in the JDBC URL.(Salesforce is shown.)

DBInputTable コンポーネントで、IBM Cloud Object Storage データをクエリ

  1. DBInputTable をReaders セクションからドラッグし、ジョブフローに置きます。ダブルクリックして、設定エディタを開きます。
  2. DB コネクションプロパティで、IBM Cloud Object Storage JDBC をドロップダウンから選択します。
  3. SQL クエリを入力します。例: SELECT * FROM Objects

UniversalDataWriter でQuery のOutput を記述

  1. Writer セクションからUniversalDataWriter をドラッグして、ジョブフローに置きます。
  2. UniversalDataWriter をダブルクリックして、設定エディタを開き、ファイルURL を足します。
  3. DBInputTable をダブルクリックして、Extract Metadata をクリックします。
  4. DBInputTable のOutput ポートをUniversalDataWriter に接続します。
  5. UniversalDataWriter のSelect Metadata メニューでObjects テーブルを選択します。(UniversalDataWriter のInput ポートを右クリックしてメニューを開くことも可能です。)
  6. Run をクリックして、ファイルの書き込みを実行します。
A simple transfer to a flat file.