Power Apps は、カスタムソフトウェア開発の時間をかけずに、データに接続してWeb とモバイル全体で機能するカスタムビジネスアプリを構築および使用するためのサービスです。CData Connect Server と組み合わせると、Power Apps を使用して構築したアプリからAzure Data Lake Storage データにアクセスできます。この記事では、Power Apps からConnect Server に接続し、ライブAzure Data Lake Storage データを使用してアプリを構築する方法を説明します。
CData Connect Server は、純粋なSQL インターフェースをAzure Data Lake Storage に提供し、データを複製せずにPower Apps からライブAzure Data Lake Storage データに簡単に連携できるようにします。、Power Apps は、CData Connect Server をSQL Server データベースとして認識し、最適化されたデータ処理を使用してサポートされているすべてのSQL 操作(フィルタ、JOIN など)をAzure Data Lake Storage に直接プッシュし、サーバーサイドの処理を利用して、Azure Data Lake Storage データを素早く返します。
Azure Data Lake Storage データの仮想SQL データベースを作成
CData Connect Server は、簡単なポイントアンドクリックインターフェースを使用してAPI を生成します。
- Connect Server にログインし、「Databases」をクリックします。
- 「Available Data Sources」から「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:
- Sign in to your Azure Account through the
[.
]- Select "Azure Active Directory".
- Select "App registrations".
- Select "New application registration".
- Provide a name and URL for the application. Select Web app for the type of application you want to create.
- 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.
- 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.
- 「 Test Database」をクリックします。
- 「Permission」->「 Add」とクリックし、適切な権限を持つ新しいユーザー(または既存のユーザー)を追加します。
CData Connect Server に接続する
Connect Server を使用してAzure Data Lake Storage データをPower Apps に統合するには、新しいSQL Server 接続が必要です。
- Power Apps にログインします。
- 「Data」->「Connections」->「New connection」とクリックします。
- SQL Server を選択します。
- 接続ウィザードにて:
- 直接接続を選択します。
- SQL server name をConnect Server インスタンスのアドレスに設定します。(CONNECT_SERVER_URL)
- SQL database name を以前作成したAzure Data Lake Storage の仮想データベース名(azuredatalakedb など)に設定します。
- Username とPassword を設定し、「Create」をクリックします。
Azure Data Lake Storage データを活用するアプリの構築
Connect Server への接続が構成されたら、ライブAzure Data Lake Storage データをPower Apps で作成したアプリに統合する事ができるようになります。
- Power Apps にログインします。
- 「Create」をクリックし、「Start from data」にカーソルを合わせて「Make this app」をクリックします。
- 作成したSQL Server 接続を選択します。
- 使用するテーブルを検索または選択します。
- 「Connect」をクリックします。
- 新しく作成したアプリのレイアウトや、BrowseScreen、DetailScreen、EditScreen で表示されるフィールドの設定などを、ほかのアプリと同じようにカスタマイズします。
これで、組織内で使用するために保存・公開することができるライブAzure Data Lake Storage データへの読み取りアクセスが可能なアプリが完成しました。
アプリケーションからAzure Data Lake Storage データへのSQL アクセス
Microsoft Power Apps からライブAzure Data Lake Storage データへの直接接続ができるようになりました。これで、Azure Data Lake Storage データを複製せずにより多くの接続とアプリを作成してビジネスを推進できます。
アプリケーションから直接240+ SaaS 、Big Data 、NoSQL ソースへのSQL データアクセスを取得するには、CData Connect Server を参照してください。