製品をチェック

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

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

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

お問い合わせ

Azure Data Lake Storage をSalesforce の外部オブジェクトとしてノーコード連携


API Server を使ってAzure Data Lake Storage のOData サービスを作成し、クラウドアプリケーションからのアクセスを可能にします。Salesforce からAzure Data Lake Storage のOData サービスを外部オブジェクトとして設定して利用します。


古川えりか
コンテンツスペシャリスト

azuredatalake ロゴ画像

API Server

apiserver ロゴ画像
Salesforce ロゴ画像

CData API Server はAzure Data Lake Storage (および 240+ の他のクラウドデータソース)をOData API 化し、Salesforce の画面やSalesforce1 のようなモバイルアプリケーションでの利用を実現します。 この記事では、API Server によりAzure Data Lake Storage データを外部オブジェクトとしてSalesforce Connect に設定して、Salesforce の標準オブジェクトと同感覚で使用する方法を説明します。
Salesforce 外部オブジェクトでAzure Data Lake Storage にデータ連携。

API Server の設定

次のステップに従い、セキュアなAzure Data Lake Storage OData サービスを立ち上げます:

デプロイ

API Server はサーバー上で稼働します。Windows 版は、製品に組み込まれているスタンドアロンのサーバーかIIS に配置して稼働させることができます。Java 版では、Java servlet コンテナにAPI Server のWAR ファイルを配置します。 デプロイの詳細は製品ヘルプを参照してください。API Server をAzure、Amazon EC2、Heroku にデプロイする方法はKB に記事があります。

Azure Data Lake Storage への接続

サーバーへのデプロイ後に、API Server の管理コンソールで[設定]→[接続]から新しい接続を追加してAzure Data Lake Storage を追加します。 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.

接続を確立後、[設定]→[リソース]の画面でAzure Data Lake Storage からOData API として公開するエンティティを選択します。

API Server のユーザー設定

[設定]→[ユーザー]からAPI にアクセスできるユーザーの認証設定を行います。API Server はトークンでの認証を行うことができます。 IP アドレスでAPI へのアクセスを制限することも可能です。デフォルトではローカルマシンからのアクセスのみが許可されています。SSL の設定も可能です。

Azure Data Lake Storage データにOData サービスとしてアクセス

次のステップでAPI Server で生成されたOData フィードを接続します。

  1. Salsforce にログインし、[設定]→[開発]→[外部システムへの接続を管理する]をクリックします。
  2. [新規外部データソース]をクリックします。
  3. Enter values for the following properties:
    • 外部データソース: Salesforce ユーザインターフェースに表示する表示ラベル
    • 名前: 一意の識別子
    • 種別: "Salesforce Connect: OData 4.0" を選択。
    • URL: API Server のOData エンドポイントのURL を設定します。フォーマットは、https://your-server:your-port.rsc.

      です。

      プレーンテキストはテストのみに使用し、本番ではTSL の仕様を推奨します。

  4. 形式メニューでは、JSON を選択します。

  5. 認証セクションで、次のプロパティを設定します:
    • ID 種別: 組織のすべてのメンバーが同じ認証情報でAPI Server にアクセスする場合には[指定ユーザー]を指定します。組織のメンバーがそれぞれの認証情報を使う場合には[ユーザ]を指定します。
    • 認証プロトコル: ベーシック認証には、[パスワード認証]を選択します。
    • 証明書: Salesforce からサーバーへの通信を暗号化し認証するには証明書を指定します。
    • ユーザ名: API Server に登録されたユーザー名。
    • パスワード: ユーザーのAuth トークン。
Configuration settings for the data source. (NetSuite is shown.)

Azure Data Lake Storage オブジェクトの同期

外部オブジェクトを作成したら、次のステップでAzure Data Lake Storage 外部オブジェクトのデータソース側の変更を反映させます。 Azure Data Lake Storage テーブルの定義とAzure Data Lake Storage 外部オブジェクトの定義を同期する必要があります。

  1. 作成した外部オブジェクトをクリックします。
  2. [検証して同期]をクリックします。
  3. 外部オブジェクトとして作業するAzure Data Lake Storage テーブルを選択し、[同期]します。

Salesforce オブジェクトとしてAzure Data Lake Storage データにアクセス

Azure Data Lake Storage を外部オブジェクトとして設定したので、Salesforce 標準オブジェクトと同じようにアクセスが可能になりました。

  • フィルタリストビューで新しいタブを作成:

    A filtered list view shown on a custom tab. (NetSuite Invoices are shown.)
  • Azure Data Lake Storage 外部オブジェクトの関連テーブルを標準セールスフォースオブジェクトのように表示する:

    A related list that shows an indirect lookup relationship, which links a child external object to a parent standard object. (Salesforce accounts and associated NetSuite invoices are shown.)

トラブルシューティング

以下によく質問がある接続の問題についてリストします:

  • サーバーがインターネットにつながるIP アドレスを有していること。アプリケーションレイヤーでそのIP アドレスからのアクセスが許可されていること。

    API Server をホスティングしているサーバーがTLS 1.1 以上を使っていること。Windows 版のAPI Server の組み込みサーバーはこれに準拠しています。

    IIS の場合には、TLS 1.1 および1.2 がサポートされていますが、デフォルトでは有効化されていません。 これらのプロトコルを有効化するにはhow-to on MSDN および Microsoft technical referenceを参照してください。

    Java 版の場合、Java 8では、TLS 1.2 がデフォルトでサポートされていますが、Java 6、7 ではサポートされていません。 もしJava 7以前のベージョンを利用している場合、 this Oracle how-to を参照してください。