CData ODBC drivers は、幅広い種類のデータソースのデータを扱うことを可能にします。この記事では、Azure Data Lake Storage に接続してQlikView でデータビジュアライゼーションを作成する簡単な手順を説明します。
Azure Data Lake Storage データをチャートに連携
下記の手順では、SQL クエリ結果をQlikView のビジュアライゼーションに提供します。
この記事では、次のクエリを使って棒グラフを作成します:
SELECT FullPath, Permission FROM Resources WHERE Type = 'FILE'
未指定の場合は、初めにODBC DSN (data source name) で接続プロパティを指定します。ドライバーのインストールの最後にアドミニストレーターが開きます。Microsoft ODBC Data Source Administrator を使用して、ODBC DSN を作成および構成できます。
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.
Microsoft ODBC データソースアドミニストレーターで必要なプロパティを設定する方法は、ヘルプドキュメントの「はじめに」をご参照ください。
- ツールバーで[Edit Script]ボタンをクリックして接続を追加します。
- [Data]タブの[Database]メニューから[ODBC]を選択して[Connect]をクリックします。
- ダイアログが表示されたら、[DSN]を選択します。次のようなコマンドが生成されます:
ODBC CONNECT TO [My DSN];
- [Select]をクリックして[SELECT statement]ウィザードでクエリをビルドします。あるいは、SQL コマンドを使ってクエリを直接スクリプトに入力できます。
- スクリプトエディタを閉じてドキュメントをリロードし、スクリプトを実行します。
- [Tools]>[Quick Chart Wizard]をクリックします。ウィザードでチャートの種類を選択します。この例では棒グラフを使います。
- [First Dimension]メニューでFullPath を選択します。
- 必要なサマリー機能をクリックし、メニューでPermission を選択します。
ウィザードを終了してチャートを生成します。