製品をチェック

無償トライアル:

無償トライアルへ

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

Azure Data Lake Storage JDBC Driver

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

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

お問い合わせ

Azure Data Lake Storage データを帳票ツールbiz-Stream で連携利用する方法


CData JDBC Driver for ADLS を使って、帳票ツールのbiz-Stream で Azure Data Lake Storage をノーコードで連携。


azuredatalake ロゴ画像
jdbc ロゴ画像

JDBC

biz-Stream ロゴ画像

biz-Stream は、多様な表現が可能なWeb 帳票ソリューションです。

この記事では、biz-Stream からCData JDBC Driver 経由でAzure Data Lake Storage データにリアルタイムで連携接続して帳票から利用する方法を紹介します。CData Drivers を使うことで、RDB のようにbiz-Stream 内でAzure Data Lake Storage データを扱うことができるようになります。

biz-Stream へのAzure Data Lake Storage JDBC ドライバーの配置

デフォルトの内容でインストールした場合、以下のパスに jar ファイルが配置されますので、その jar ファイルを biz-Stream の所定のパスにコピーします。

  • cdata.jdbc.adls.jar
  • cdata.jdbc.adls.lic (試用版では.lic ファイルは不要)
  • コピー元:C:\Program Files\CData\CData JDBC Driver for ADLS 20xxJ\lib
  • コピー先:C:\Program Files (x86)\brainsellers\biz-Stream レイアウト・デザイナ\lib_jdbc

biz-Stream からAzure Data Lake Storage への接続設定

レイアウトデザイナを起動後、リソース定義にて Azure Data Lake Storage への接続設定を行います。ドライバー選択のプルダウンに CData ADLS JDBC Driver が表示されますので選択します。

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.

サーバURLは以下の形式で入力します。
URL: jdbc:adls:Schema=ADLSGen2;Account=myAccount;FileSystem=myFileSystem;AccessKey=myAccessKey;InitiateOAuth=GETANDREFRESH

Azure Data Lake Storage data リソースの作成

JDBC Driver の接続文字列デザイナーを使う

JDBC 接続文字列を作るには、Azure Data Lake Storage JDBC Driver のビルトイン接続文字列デザイナーを使う方法があります。ドライバーの.jar ファイルをダブルクリックするか、コマンドラインから.jar ファイルを実行します。

Windows:

java -jar 'C:\Program Files\CData\CData JDBC Driver for ADLS 20xxJ\lib\cdata.jdbc.adls.jar'

MacOS:

java -jar cdata.jdbc.adls.jar

接続プロパティに値を入力して、生成される接続文字列をクリップボードにコピーします。

接続文字列デザイナーを使って、JDBC URL を生成する (Salesforce is shown.)

次にデータ取得条件を設定します。SQL 定義から定義名を設定し、編集ボタンをクリックします。

Azure Data Lake Storage data リソースの編集

上のグレーエリアで右クリック → テーブルリストと選択しますと、Azure Data Lake Storage のオブジェクトがリストで表示されます。使用するテーブルを選択します。

Azure Data Lake Storage data リソースの選択

ここでは取得対象の項目や条件などを設定することができます。対象項目や条件を指定できたらOKボタンをクリックし、戻った画面で追加ボタンをクリックします。

Azure Data Lake Storage data のカラム選択と条件設定

最後にデータソース設定を行います。データソース定義名に先ほど設定したものを選択し、画面下部にある追加ボタンをクリックします。これでbiz-Stream でAzure Data Lake Storage データを利用する準備ができました。

データソース設定

Azure Data Lake Storage データをリアルタイムで参照するbiz-Stream 帳票のデザイン

用紙設定を行います。今回は A4 設定にしました。設定後は画面下部にある追加ボタンをクリックします。

ページ設定では新規ボタンをクリックします。

ここではレイアウトデザイナが帳票テンプレートを xml で保存しますので、ファイル名を設定します。

レイアウトにはさまざまなメニューがありますが、今回は表を使用します。表を設定後、Azure Data Lake Storage から取得したデータをセットするエリアを作成します。各セルにテキストボックスを挿入し、そのテキストボックス自体に Azure Data Lake Storage の項目を紐づけします。
※ヘッダーにもそれぞれテキストボックスを追加します。

表オブジェクトとしてAzure Data Lake Storage を使用

レイアウト作成画面を閉じた後、ページ設定の画面に戻りますので、画面下部にある追加ボタン(一度作成している場合は適用)をクリックし、レイアウトの作成が完了となります。

レイアウトデザイナーのトップ画面のヘッダーメニューからプレビューアイコンをクリックします。先ほど作成したレイアウトで Azure Data Lake Storage のデータを表示させることができます。

このようにCData JDBC Driver をアップロードすることで、簡単にbiz-Stream でAzure Data Lake Storage データをリアルタイムに参照する帳票をノーコードで連携して作成することができます。

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