製品をチェック

無償トライアル:

無償トライアルへ

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

Azure Data Lake Storage JDBC Driver

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

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

お問い合わせ

Oracle Data Integrator でAzure Data Lake Storage をETL


この記事では、Oracle Data Integrator を使用してAzure Data Lake Storage をデータウェアハウスに転送する方法を説明します。


azuredatalake ロゴ画像
jdbc ロゴ画像

JDBC

Oracle Data Integrator ロゴ画像

JDBC 標準を使用してconnectをAzure Data Lake Storage に接続することにより、基準のスキルを活用します。 Oracle Data Integrator (ODI) ののようなETL ツールへのドロップイン統合により、CData JDBC Driver for ADLS は、リアルタイムAzure Data Lake Storage をデータウェアハウスやビジネスインテリジェンス、Big Data テクノロジーに接続します。

JDBC 接続により、ODI の他のデータベースと同じようにAzure Data Lake Storage を操作できます。RDBMS と同様に、フラットファイルを操作する代わりに、ドライバーを使用してAzure Data Lake Storage API にリアルタイムで直接接続できます。

この記事では、JDBC ベースのAzure Data Lake Storage データのETL からOracle へのロードまでについてを説明します。Azure Data Lake Storage エンティティのデータモデルをリバースエンジニアリングした後、マッピングを作成し、データ読み込み戦略を選択します。ドライバーはSQL-92 をサポートしているため、この最後のステップは、組み込みのSQL からSQL Loading Knowledge Module をセンタすることで簡単に実行できます。

ドライバーをインストール

ドライバーをインストールするには、インストールフォルダにあるドライバーJAR を.lic ファイルをODI userlib ディレクトリにコピーします。

Unix: ~/.odi/oracledi/userlib Windows %APPDATA%\Roaming\odi\oracledi\userlib

ODI を再起動してインストールを完了します。

モデルのリバースエンジニアリング

モデルをリバースエンジニアリングすると、Azure Data Lake Storage のドライバーのリレーショナルビューに関するメタデータが取得されます。リバースエンジニアリング後、リアルタイムのAzure Data Lake Storage をクエリし、Azure Data Lake Storage テーブルに基づいてマッピングを作成できます。

  1. ODI でリポジトリに接続し、[New]->[Model and Topology Objects]とクリックします。
  2. 表示されるダイアログの[Model]画面で、以下の情報を入力します。
    • Name:ADLS を入力します。
    • Technology:Generic SQL を選択します。(ODI がVersion 12.2+ の場合は、Microsoft SQL ServerW選択します。)
    • Logical Schema:ADLS を入力します。
    • Context:[Global]を選択します。
  3. 表示されるダイアログの[Data Server]画面で、以下の情報を入力します。
    • Name:ADLS を入力します。
    • Driver List:Oracle JDBC Driver を選択します。
    • Driver:cdata.jdbc.adls.ADLSDriver と入力します。
    • URL:接続文字列を含むJDBC URL を入力します。

      Authenticating to a Gen 1 DataLakeStore Account

      Gen 1 uses OAuth 2.0 in Azure AD for authentication.

      For this, an Active Directory web application is required. You can create one as follows:

      1. Sign in to your Azure Account through the .
      2. Select "Azure Active Directory".
      3. Select "App registrations".
      4. Select "New application registration".
      5. Provide a name and URL for the application. Select Web app for the type of application you want to create.
      6. Select "Required permissions" and change the required permissions for this app. At a minimum, "Azure Data Lake" and "Windows Azure Service Management API" are required.
      7. Select "Key" and generate a new key. Add a description, a duration, and take note of the generated key. You won't be able to see it again.

      To authenticate against a Gen 1 DataLakeStore account, the following properties are required:

      • Schema: Set this to ADLSGen1.
      • Account: Set this to the name of the account.
      • OAuthClientId: Set this to the application Id of the app you created.
      • OAuthClientSecret: Set this to the key generated for the app you created.
      • TenantId: Set this to the tenant Id. See the property for more information on how to acquire this.
      • Directory: Set this to the path which will be used to store the replicated file. If not specified, the root directory will be used.

      Authenticating to a Gen 2 DataLakeStore Account

      To authenticate against a Gen 2 DataLakeStore account, the following properties are required:

      • Schema: Set this to ADLSGen2.
      • Account: Set this to the name of the account.
      • FileSystem: Set this to the file system which will be used for this account.
      • AccessKey: Set this to the access key which will be used to authenticate the calls to the API. See the property for more information on how to acquire this.
      • Directory: Set this to the path which will be used to store the replicated file. If not specified, the root directory will be used.

      ビルトイン接続文字列デザイナ

      JDBC URL の構成については、Azure Data Lake Storage JDBC Driver に組み込まれている接続文字列デザイナを使用してください。JAR ファイルのダブルクリック、またはコマンドラインからJAR ファイルを実行します。

      java -jar cdata.jdbc.adls.jar

      接続プロパティを入力し、接続文字列をクリップボードにコピーします。

      Using the built-in connection string designer to generate a JDBC URL (Salesforce is shown.)

      以下は一般的な接続文字列です。

      jdbc:adls:Schema=ADLSGen2;Account=myAccount;FileSystem=myFileSystem;AccessKey=myAccessKey;InitiateOAuth=GETANDREFRESH
  4. [Physical Schema]画面で、以下の情報を入力します。
    • Schema (Schema):ADLS を入力します。
    • Schema (Work Schema):ADLS を入力します。
    Connection properties and the driver class in the model wizard.(Salesforce is shown.)
  5. 開いたモデルで、[Reverse Engineer]をクリックしてAzure Data Lake Storage テーブルのメタデータを取得します。

Azure Data Lake Storage データの編集・保存

リバースエンジニアリング後、ODI でAzure Data Lake Storage を操作できるようになります。 Azure Data Lake Storage を表示するには、Designer ナビゲーターでモデルアコーディオンを展開し、テーブルを右クリックして[View data]をクリックします。 Data can be refreshed on demand.(Salesforce is shown.)

ETL プロジェクトの作成

以下のステップに従って、Azure Data Lake Storage からETL を作成します。Resources エンティティをODI Getting Started VM に含まれているサンプルデータウェアハウスにロードします。

  1. SQL Developer を開き、Oracle データベースに接続します。[Connections]ペインでデータベースのノードを右クリックし、[New SQL Worksheet]をクリックします。

    もしくは、SQLPlus を使用することもできます。コマンドプロンプトから、以下のように入力します。

    sqlplus / as sysdba
  2. 以下のクエリを入力し、ODI_DEMO スキーマにあるサンプルデータウェアハウスに新しいターゲットテーブルを作成します。以下のクエリは、Azure Data Lake Storage のResources テーブルに一致するいくつかのカラムを定義します。 CREATE TABLE ODI_DEMO.TRG_RESOURCES (PERMISSION NUMBER(20,0),FullPath VARCHAR2(255));
  3. ODI でDesigner ナビゲーターのModels アコーディオンを展開し、ODI_DEMO フォルダのSales Administration ノードをダブルクリックします。Model Editor でモデルが開きます。
  4. [Reverse Engineer]をクリックします。TRG_RESOURCES テーブルがモデルに追加されます。
  5. プロジェクトの[Mappings]ノードを右クリックし、[New Mapping]をクリックします。マッピングの名前を入力し、[Create Empty Dataset]オプションを無効にします。[Mapping Editor]が表示されます。
  6. TRG_RESOURCES テーブルをSales Administration モデルからマッピングにドラッグします。
  7. Resources テーブルをAzure Data Lake Storage モデルからマッピングにドラッグします。
  8. ソースコネクタポイントをクリックしてターゲットコネクタポイントにドラッグします。[Attribute Matching]ダイアログが表示されます。ここでは、デフォルトオプションを使用します。その場合、目的の動作はターゲットカラムのプロパティに表示されます。
  9. Mapping Editor の[Physical]タブを開き、TARGET_GROUP のRESOURCES_AP をクリックします。
  10. RESOURCES_AP プロパティで、[Loading Knowledge Module]タブの[LKM SQL to SQL (Built-In)]を選択します。 SQL-based access to Azure Data Lake Storage enables you to use standard database-to-database knowledge modules.

これで、マッピングを実行してAzure Data Lake Storage をOracle にロードできます。