製品をチェック

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

Azure Data Lake Storage 連携ソリューション

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

お問い合わせ

CData BizTalk Adapter for ADLS のSQL コマンドスキーマを作成する方法


CData BizTalk アダプターは、XML としてデータを返すことにより、BizTalk でのAzure Data Lake Storage の処理を容易にします。BizTalk でアクセスしたいテーブルのXML スキーマファイル作成することで、このデータをBizTalk オーケストレーションで使用できます。


azuredatalake ロゴ画像
biztalk ロゴ画像

Biztalk ロゴ画像

この記事では、CData BizTalk アダプターを使用して取得したAzure Data Lake Storage を処理するスキーマを作り出す方法を紹介します。SELECT コマンド用のスキーマを作成します。

CData BizTalk Adapter for ADLS を使用して、Azure Data Lake Storage に標準のSQL コマンドを実行できます。

プロジェクトのAzure Data Lake Storage 用アダプターを追加する

以下のステップに従って、アダプターをBizTalk サーバープロジェクトに追加します。

  1. 未作成の場合は、Visual Studio で新規のBizTalk サーバープロジェクトを作成します。
  2. [Solution Explorer] の[project] で右クリックし、[Add] -> [Add Generated Items] と進みます。
  3. [resulting dialog box] の[Add Adapter Metadata] を選択します。
  4. 表示される[Add Adapter] ウィザードで、リストからアダプターを選択します。
  5. [Port menu] では、選択を空白のままにします。そのトランスポートタイプに合わせて構成されたアダプターを持つ受信場所や送信ポートを選択することもできます。
  6. CData Adapters in the Select Adapter wizard.(Salesforce is shown.)

SQL コマンド用のスキーマを作り出す

[Add Adapter] ウィザードでアダプターを選択すると、[Schema] ウィザードが表示されます。以下のステップに従って接続プロパティを構成し、コマンドの結果のメタデータを取得します。

  1. BizTalk アプリで構成済みのアダプターを選択しなかった場合は、[Connection String] ページで、認証資格情報とその他の接続プロパティを入力します。下は一般的な接続文字列です。

    Schema=ADLSGen2;Account=myAccount;FileSystem=myFileSystem;AccessKey=myAccessKey;

    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.

    The connection string properties used by the adapter.(Salesforce is shown.)
  2. 次ページ[Schema Information] の[General Options] セクションで、アダプターの構成に応じて[Send Port] または[Receive Location] を選択します。
  3. 結果セット全体のスキーマを作成するには、[Message Mode]メニューの[Single Message] オプションを選択します。結果セットの行ごとに1つずつのスキーマを作成したい場合は、[Message Per Row] オプションを選択し、メッセージのルート要素が[row] であることを確認します。
  4. [Command Type] メニューで、SQL コマンドを選択します。 A Receive Location configured in the Schema wizard.(Salesforce is shown.)
  5. [Statement Information] ページの[SQL Command Text box] に、SQL コマンドを入力します。(受信場所や送信ポートが構成してある場合は、そのSQL コマンドがボックスに入力されます。)ここでは、下のクエリを使用します。

    SELECT * FROM Resources

    The SQL command for which the XML schema will be generated.(Salesforce is shown.)
  6. ウィザードで表示される概要の設定を確認し、[Finish] をクリックしてschema.xsd ファイルを作成します。

スキーマの処理

簡易版BizTalk アプリでスキーマを利用する場合、 こちらのチュートリアルをご覧ください。