この記事では、CData BizTalk アダプターを使用して取得したAzure Synapse を処理するスキーマを作り出す方法を紹介します。SELECT コマンド用のスキーマを作成します。
CData BizTalk Adapter for AzureSynapse を使用して、Azure Synapse に標準のSQL コマンドを実行できます。 このガイドに従って、SELECT やINSERT、UPDATE、DELETE のコマンドを実行できます。
プロジェクトのAzure Synapse 用アダプターを追加する
以下のステップに従って、アダプターをBizTalk サーバープロジェクトに追加します。
- 未作成の場合は、Visual Studio で新規のBizTalk サーバープロジェクトを作成します。
- [Solution Explorer] の[project] で右クリックし、[Add] -> [Add Generated Items] と進みます。
- [resulting dialog box] の[Add Adapter Metadata] を選択します。
- 表示される[Add Adapter] ウィザードで、リストからアダプターを選択します。
- [Port menu] では、選択を空白のままにします。そのトランスポートタイプに合わせて構成されたアダプターを持つ受信場所や送信ポートを選択することもできます。
SQL コマンド用のスキーマを作り出す
[Add Adapter] ウィザードでアダプターを選択すると、[Schema] ウィザードが表示されます。以下のステップに従って接続プロパティを構成し、コマンドの結果のメタデータを取得します。
- BizTalk アプリで構成済みのアダプターを選択しなかった場合は、[Connection String] ページで、認証資格情報とその他の接続プロパティを入力します。下は一般的な接続文字列です。
User=myuser;Password=mypassword;Server=localhost;Database=Northwind;
Connecting to Azure Synapse
In addition to providing authentication (see below), set the following properties to connect to a Azure Synapse database:
- Server: The server running Azure. You can find this by logging into the Azure portal and navigating to Azure Synapse Analytics -> Select your database -> Overview -> Server name.
- Database: The name of the database, as seen in the Azure portal on the Azure Synapse Analytics page.
Authenticating to Azure Synapse
Connect to Azure Synapse using the following properties:
- User: The username provided for authentication with Azure.
- Password: The password associated with the authenticating user.
- 次ページ[Schema Information] の[General Options] セクションで、アダプターの構成に応じて[Send Port] または[Receive Location] を選択します。
- 結果セット全体のスキーマを作成するには、[Message Mode]メニューの[Single Message] オプションを選択します。結果セットの行ごとに1つずつのスキーマを作成したい場合は、[Message Per Row] オプションを選択し、メッセージのルート要素が[row] であることを確認します。
- [Command Type] メニューで、SQL コマンドを選択します。
[Statement Information] ページの[SQL Command Text box] に、SQL コマンドを入力します。(受信場所や送信ポートが構成してある場合は、そのSQL コマンドがボックスに入力されます。)ここでは、下のクエリを使用します。
SELECT * FROM Products
- ウィザードで表示される概要の設定を確認し、[Finish] をクリックしてschema.xsd ファイルを作成します。
スキーマの処理
簡易版BizTalk アプリでスキーマを利用する場合、 こちらのチュートリアルをご覧ください。