製品をチェック

製品についての詳細情報や無償トライアルをご案内します:

CData Connect Server

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

お問い合わせ

コラボフローでAzure Data Lake Storage データと連携したワークフローを作成


クラウドワークフローのコラボフローで、Azure Data Lake Storage データと連携したワークフローを作成


azuredatalake ロゴ画像
connect ロゴ画像

Connect Server

Collaboflow ロゴ画像

コラボフロー(www.collabo-style.co.jp/ )は誰でも簡単に作れるクラウドベースのワークフローサービスです。さらにCData Connect Server と連携することで、Azure Data Lake Storage データへのクラウドベースのアクセスをノーコードで追加できます。本記事では、CData Connect Server 経由でコラボフローからAzure Data Lake Storage 連携を実現する方法を紹介します。

CData Connect Server はAzure Data Lake Storage データへのクラウドベースのOData インターフェースを提供し、コラボフローからAzure Data Lake Storage データへのリアルタイム連携を実現します。

Azure Data Lake Storage の仮想OData API エンドポイントを作成

まずCData Connect Server でデータソースへの接続およびOData API エンドポイント作成を行います。

  1. CData Connect Server にログインして、「DATA MODEL」をクリックします。 Adding a database
  2. 利用できるデータソースアイコンから"Azure Data Lake Storage" を選択します。
  3. Azure Data Lake Storage に接続するために必要なプロパティを入力します。

    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.
    Configuring a connection (Azure Data Lake Storage is shown).
  4. 「Test Connection」をクリックします。
  5. 「USERS」 -> Add をクリックして、新しいユーザーを追加し、適切な権限を指定します。
  6. API タブをクリックして OData API エンドポイントが生成されていることを確認します。

コネクションとOData エンドポイントを設定したら、Collaboflow からAzure Data Lake Storage データに接続できます。

Azure Data Lake Storage データに接続したワークフローを作成

コラボフローからConnect Server に連携するためのJavaScript の準備

コラボフロー上で使用するConnect Server との接続用JavaScriptを準備します。

(function () { 'use strict'; // Setting Propeties const AutocompleteSetting = { // Autocomplete target field for Collaboflow InputName: 'fid0', // Collaboflow item detils line number ListRowNumber : 15, // Autocomplete tartget field for Connect Server ApiListupFiledColumn : 'adls_column', // Key Column Name for Connect Server resource ApiListupKeyColumn : 'adls_keycolumn', // Mapping between Collaboflow field and Connect Server column Mappings: [ { PartsName: 'fid1', // Collabo flow field name APIName: 'adls_column1' // Connect Server column name }, { PartsName: 'fid2', APIName: 'adls_column2' }, { PartsName: 'fid3', APIName: 'adls_column3' }, { PartsName: 'fid4', APIName: 'adls_column4' } ] }; const CDataConnectServerSetting = { // Connect Server URL ConnectServerUrl : 'http://XXXXXX', // Connect Server Resource Name ConnectServerResourceName : 'adls_table', // Connect Server Key Headers : { Authorization: 'Basic YOUR_BASIC_AUTHENTICATION' }, // General Properties ParseType : 'json', get BaseUrl() { return CDataConnectServerSetting.ApiServerUrl + '/api.rsc/' + CDataConnectServerSetting.ApiServerResourceName } } let results = []; let records = []; // Set autocomplete processing for target input field collaboflow.events.on('request.input.show', function (data) { for (let index = 1; index < AutocompleteSetting.ListRowNumber; index++) { $('#' + AutocompleteSetting.InputName + '_' + index).autocomplete({ source: AutocompleteDelegete, autoFocus: true, delay: 500, minLength: 2 }); } }); // This function get details from Connect Server, Then set values at each input fields based on mappings object. collaboflow.events.on('request.input.' + AutocompleteSetting.InputName + '.change', function (eventData) { debugger; let tartgetParts = eventData.parts.tbl_1.value[eventData.row_index - 1]; let keyId = tartgetParts[AutocompleteSetting.InputName].value.split(':')[1\; let record = records.find(x => x[AutocompleteSetting.ApiListupKeyColumn] == keyId); if (!record) return; AutocompleteSetting.Mappings.forEach(x => tartgetParts[x.PartsName].value = ''); AutocompleteSetting.Mappings.forEach(x => tartgetParts[x.PartsName].value = record[x.APIName]); }); function AutocompleteDelegete(req, res) { let topParam = '&$top=10' let queryParam = '$filter=contains(' + AutocompleteSetting.ApiListupFiledColumn + ',\'' + encodeURIComponent(req.term) + '\')'; collaboflow.proxy.get( CDataConnectServerSetting.BaseUrl + '?' + queryParam + topParam, CDataConnectServerSetting.Headers, CDataConnectServerSetting.ParseType).then(function (response) { results = []; records = []; if (response.body.value.length == 0) { results.push('No Results') res(results); return; } records = response.body.value; records.forEach(x => results.push(x[AutocompleteSetting.ApiListupFiledColumn] + ':' + x[AutocompleteSetting.ApiListupKeyColumn])); res(results); }).catch(function (error) { alert(error); }); } })();
  • 「CDataConnectServerSetting」のそれぞれのプロパティには構成したSSH Server のURL とConnect Server の認証情報をそれぞれ設定してください。
  • 「AutocompleteSetting」はどのフィールドでオートコンプリートを動作させるか?といった設定と、API のプロパティとのマッピングを行います。
  • 今回はコラボフローのデフォルトテンプレートで提供されている「12a.見積書・注文書」で利用しますので、デフォルトでは商品名のフィールドを、Product テーブルのName と紐付けて、Autocomplete を行うように構成しています。値が決定されたら、Key となるProductID を元に「型番、標準単価、仕入単価、御提供単価」をそれぞれAPI から取得した値で自動補完するようになっています。

コラボフロー側でJavaScript を登録

JavaScript を作成したら、後はコラボフローにアップするだけです。

  • コラボフローにログインし「アプリ設定」→「フォーム設定」に移動します。
  • CollaboFlow
  • フォーム一覧から使用するフォームを選択します。
  • CollaboFlow
  • フォーム編集画面に移動後、「カスタマイズ」タブをクリックし、ファイルをアップロードから作成したJSファイルをアップロードし、保存します。
  • CollaboFlow
  • これでConnect Server 経由でAzure Data Lake Storage データを取得し、自動入力補完する機能がコラボフローの申請フォームに追加できました。

クラウドアプリケーションからAzure Data Lake Storage データへのライブ接続

コラボフローからAzure Data Lake Storage ライブデータに直接接続できるようになりました。これで、Azure Data Lake Storage データを複製せずにより多くの接続とアプリを作成できます。

クラウドアプリケーションから直接100を超えるSaaS 、ビッグデータ、NoSQL ソースへのリアルタイムデータアクセスを取得するには、CData Connect Server を参照してください。