製品をチェック

無償トライアル:

無償トライアルへ

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

Azure Data Lake Storage JDBC Driver

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

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

お問い合わせ

Google Cloud Data Fusion でAzure Data Lake Storage データを扱う方法:CData JDBC Driver


CData JDBC Driver for ADLS を使って、Google Cloud Data fusion で Azure Data Lake Storage data をBigQuery にETL。


azuredatalake ロゴ画像
jdbc ロゴ画像

JDBC

Google Cloud Data Fusion ロゴ画像

Google Cloud Data Fusion は、ノーコードでデータ連携の設定が可能な言わば GCP の ETL ツール(サービス)です。たくさんのコネクタや変換・分析機能がデフォルトで用意されているため、さまざまなデータソースを色々な組み合わせで扱うことが可能なようです。 また JDBC を扱うこともできるため、この記事では、CData JDBC Driver for Azure Data Lake Storage data を使って、Azure Data Lake Storage data データをCloud Data Fusion でGoogle BigQuery にノーコードでパイプラインします。

Cloud Data Fusion の準備

まずはCloud Data Fusion のインスタンスを作成します。

  1. Data Fusion のトップ画面にある「CREATE INSTANCE」からインスタンスを作成します。
  2. 作成されたインスタンス名を先ほどの画面でクリックすると以下の画面に遷移しますので、画面下部にある Service Account をコピーします。
  3. Cloud Data Fusion のインスタンス作成
  4. 画面上部にある追加からメンバーを追加します。メンバー名は先ほどコピーした「Service Account」に合わせてください。 役割は BiqQuery へもアクセスしますので、「BigQuery 管理者」、「Cloud Data Fusion 管理者」、「Cloud Data Fusion API サービス エージェント」を付与します。

CData JDBC Driver for ADLS のアップロード

ここからは実際に、Data Fusion の設定をしていきます。 まずは JDBC Driver をアップロードを行います。

  1. 「View Instance」をクリックして、Data Fusion の Control Center を開きます。
  2. Cloud Data Fusion のControl Center を開く
  3. Control Center が表示されたら、「+」ボタンをクリックして JDBC Driver をアップロードしていきます。
    • Name:アップロードしたドライバーに設定する名前
    • Class name:cdata.jdbc.adls.ADLSDriver
    JDBC Driver をCloud Data Fusion にアップロード
  4. アップロードする際の注意点として、Driver のファイル名を name-version の形式に変更してアップロードする必要があります。 なお、jarファイルをダブルクリックした際に表示されているバージョンをもとに「adls-connector-java-19.0.7115.0.jar」に変更しました。
  5. JDBC Driver をCloud Data Fusion にアップロード
  6. アップロードが成功するとこのような画面が表示されるので、「Create a Pipeline」をクリックします。
  7. JDBC Driver のアップロード終了

Azure Data Lake Storage からGoogle BigQuery へのパイプラインの作成

Data Fusion のパイプライン作成

インプット元はサイドメニューの「Source」から選択します。今回は先ほどアップロードした Azure Data Lake Storage data の JDBC Driver を使用するため、「DataBase」を選択します。 アウトプット先は同じくサイドメニューより「Sink」→「BigQuery」を選択します。

Source およびSink 先の選択

「DataBase」の設定

「DataBase」のアイコンにカーソルを持ってくるとプロパティというボタンが表示されるのでクリックし、下記内容を設定します。

  • Label:ADLS
  • Reference Name:ADLS
  • Plugin Name:ADLS Driver(Driver をアップロードした際の名前)
  • Plugin Type:jdbc
  • Connection String:ADLS へ接続する際の JDBC URL
  • Import Query:インプットしたいデータを抽出するクエリ

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.

Connection String は以下の形式です。

jdbc:adls:Schema=ADLSGen2;Account=myAccount;FileSystem=myFileSystem;AccessKey=myAccessKey;InitiateOAuth=GETANDREFRESH

Database プロパティ設定

上のキャプチャの赤枠は、Salesforce から BigQuery へアウトプットするデータの定義となります。 こちらは「Import Query」のすぐ右上にある「Get Schema」をクリックすると下の画面が表示されますので、「Import Query」で入力したクエリを実行し、カラムを定義します。

Output schema 設定

「BigQuery」の設定

こちらも同様に BigQuery のプロパティから下記内容を設定します。

  • Label:BigQuery
  • Reference Name:BigQuery
  • Project ID:使用するProject ID
  • DataSet:使用するDataSet
  • Table:使用するテーブル名、例:Account_DataFusion
BigQuery のプロパティ設定

作成したAzure Data Lake Storage data からBigQuery のパイプラインの実行

まずは作成したパイプラインをデプロイします。赤枠の「Deploy」ボタンをクリックしてデプロイを行います。

Deploy Cloud Data Fusion Pipeline

デプロイ完了後、Runボタンが表示されますので、クリックします。

デプロイしたパイプラインを実行

このようにCData JDBC Driver をアップロードすることで、簡単にGoogle Cloud Data Fusion でAzure Data Lake Storage data データをノーコードで連携し、BigQuery などへのパイプラインを作成することができます。

是非、CData JDBC Driver for ADLS 30日の無償評価版 をダウンロードして、お試しください。