Azure Data Lake Storage 用のCData ODBCドライバは、ODBC標準のAzure Data Lake Storage からのライブデータへのアクセスを可能にし、使い慣れたSQL クエリで多種多様なBI、レポート、ETL ツールでAzure Data Lake Storage を扱うことができます。 この記事では、セルフサービスBI、データプレパレーション、データブレンディング、アドバンスドアナリティクスを得意とするAlteryx Designer でODBC 接続を使用してAzure Data Lake Storageに接続して利用する方法を示します。
Azure Data Lake Storage データへの接続
- まだ行っていない場合は、データソース名(DSN)に必要な接続プロパティの値を入力します。 組み込みのMicrosoft ODBC データソースアドミニストレーターを使用してDSN を構成できます。 これは、ドライバのインストールじの最後のステップでも可能です。 Microsoft 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.
- Alteryx Designer を開いて新しいワークフローを作成します。
- 新しいInput Data ToolをWorkflowにドラッグ&ドロップします。
- 新しい input data toolをクリックして、File or Database 下の「Database Connection -> New ODBC Connection...」を選択します。
- Alteryx用に定義下設定済みDSNを選択します。
- 開かれたウィザードの中で、クエリーに含めたいフィールドを選択します。
Azure Data Lake Storage 内のデータを要件にあった内容で正確に取得しているかを確認する場合には、SQLEditor を開き、クエリーを手動で変更することができます。
クエリー定義で、Alteryx Designer 内でAzure Data Lake Storage への接続の準備ができました。
Azure Data Lake Storage に対するセルフサービス分析の実行
これで、Azure Data Lake Storage のデータプレパレーション、ブレンディング、分析を行うワークフローを作成する準備が整いました。 以下の例では、データを整理して参照します。
- workflow にデータクレンジングツールを追加し、Null テキストフィールドをブランクに置き換え、ヌル数値フィールドを0に置き換えるには、NULL を置き換えるのボックスをオンにします。また、不要な文字を削除するにチェックを入れて先頭と末尾の空白を削除することもできます。
- workflow にbrowse data tool を追加します。
- run the workflow (CTRL+R) をクリック。
- 結果ビューにてクレンジングされたAzure Data Lake Storage データを確認します。