Tableau Server は、企業のデータ活用による問題解決の方法を変革させるビジュアルアナリティクスプラットフォームです。Tableau にCData Tableau Connector for ADLS を組み合わせて使うことで、Tableau Server からシームレスにAzure Data Lake Storage データを連携利用することができるようになります。この記事では、Tableau Server でAzure Data Lake Storage データに接続してシンプルなチャートを作る方法と、Tableau Desktop でAzure Data Lake Storage データソースをパブリッシュする方法の二つを説明します。
CData Tableau Connectors は、Tableau でリアルタイムAzure Data Lake Storage データへのハイスピードなデータアクセスを可能にします。
Connector をインストールして、Azure Data Lake Storage への認証を行うだけで、すぐにレスポンシブで動的なビジュアライズやダッシュボードを作成しはじめられます。
Tabelau では、Azure Data Lake Storage データがネイティブデータタイプでアクセス可能になり、複雑なフィルタリング、集計、他の処理を自動的に行います。
NOTE: CData Tableau Connectors の日本語版は、Tableau 2020.4 以降のバージョンで使用可能です。それより前のTableau バージョンではCData ODBC Driver for ADLS もしくは、CData JDBC Driver for ADLS を使ってAzure Data Lake Storage に接続することができます。2020.4 より前のTableau Online からAzure Data Lake Storage に接続するには、CData Connect を使って連携できます。
Tableau Server にAzure Data Lake Storage Connector をインストール
Tableau Server をホストしているマシンにCData Tableau Connector をインストールします。
- Tableau Desktopがインストールされていない環境の場合、インストール中に「This setup could not copy important connector files to ...」というダイアログが表示されます。サーバーマシン上で、cdata.adls.taco と cdata.tableau.adls.lic ファイルを、インストールディレクトリ(C:\Program Files\CData\CData Tableau Connector for ADLS\lib\)からコピーします。
- コピーしたファイルをTableau Server Connectors のフォルダに貼り付けて「サインイン」をクリックして接続します。
C:\ProgramData\Tableau\Tableau Server\data\tabsvc\vizqlserver\Connectors
- ファイルをコピーしたら、後のダイアログはOK ボタンをクリックしてインストールを完了します。
- Tableau Server を再起動します。
Tableau Server にブラウザからAzure Data Lake Storage データをビジュアライズ
Tableau Server にブラウザからアクセスして、ブラウザからAzure Data Lake Storage データに連携する設定を行い、Azure Data Lake Storage のダッシュボードを作成することができます。
Tableau Server でのAzure Data Lake Storage データへの接続
- Tableau Server サイトにブラウザでアクセスします。
- 「Create」 -> 「Workbook」でワークブックを作成します。「Connect to Data」ダイアログでConnectors タブを開きます。コネクタ一覧内の「Azure Data Lake Storage by CData」を選択します。
- 接続プロパティを設定して「SignIn」をクリックして接続を確立します。
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.
Connection String での設定の場合には、スタートメニューのConnection Builder をクリック、もしくはインストールディレクトリのlib フォルダの.jar ファイルをダブルクリックしてConnection Builder を開き、プロパティを設定をすることでConnection String を取得することができます。「接続テスト」をクリックして、接続を確認します。Builder の「接続文字列」に表示された文字列をコピーしてTableau の接続画面のConnection String に貼り付けて「SignIN」をクリックして接続します。
接続したAzure Data Lake Storage データのビジュアライズをブラウザから作成
- 「Database」のプルダウンメニューが表示された場合にはCData もしくは表示されたデータベース名で使用するものを選択します。
- 「Schema」のプルダウンメニューが表示された場合にはADLS もしくは表示されたスキーマ名を選択します。
- 左ペインの「Table」にAzure Data Lake Storage で使用可能なテーブルが表示されます。ビジュアライズで使うテーブルをデータセット作成エリアにドラッグ&ドロップします。複数のテーブルを選択してドロップすることが可能です。複数のテーブルを選択して、リレーションを設定することが可能です。
- 右上の接続モード選択で、「ライブ」もしくは「抽出」を選択します。
- 「今すぐ更新」もしくは「自動更新」 をクリックします。「今すぐ更新」では、はじめの10,000行を取得します。取得する行数は個別に行ボックスで設定可能です。「自動更新」ではプレビューエリアのデータが自動的に更新されます。
- 「ワークシート」タブをクリックします。選択したデータのカラムがデータ型によりディメンションかメジャーとしてリスト表示されています。CData Tableau Connector は、自動的にデータ型を検出してくれるので、このようにすぐにデータをビジュアライズで使うことができます。
- 「ディメンション」 もしくは 「メジャー」 を「列」 もしくは 「行」 にドラッグ&ドロップします。
- 「表示形式」 タブから、お好みのグラフタイプを選択します。Tableau がデータを選択したグラフタイプで表示します。
Tableau Desktop からAzure Data Lake Storage データソースをTableau Server にパブリッシュ
Tableau Desktop 側にも同じCData Tableau Connectors 製品をインストール済の場合は、Tableau Desktop で作成したデータソースをTableau Server にパブリッシュして利用することが可能です。Tableau Desktop への CData Tableau Connectors製品のインストール手順はこちら を参照してください。
まずは、Tableau Desktop でAzure Data Lake Storage Connector でAzure Data Lake Storage データをデータソースとして設定します。
- 「サーバー -> 「サインイン」をクリックします。
- Tableau Server のURL をセットして、接続ボタンをクリックするとサインインダイアログが表示されるのでTableau Serve rにサインインします。
- Tableau Desktop のメニューで「サーバー」->「データソースのパブリッシュ」-> からパブリッシュするデータソース名をクリックします。
- Tableau Server にデータソースをパブリッシュするダイアログが表示されます。プロジェクトを選択して「パブリッシュ」をクリックします。
- ブラウザが起動してTableau Server のパブリッシュしたデータソースが表示されます。Connections タブ内のDataSource 右下の「...」をクリックして「Edit Connection...」を開きます。
- パスワードをコネクションに埋め込むために、Password を「Embedded password in conneciton」に変更してパスワードをセット、Test Connection で接続を確認してSave します。
- これで、New > Workbook using this datasource から本データソースを利用したワークブックが作成できるようになります。
- ビジュアライズを作成します。
このように、CData Tableau Connector for ADLS を使うことで、Tableau Server で簡単にAzure Data Lake Storage データを扱うことができます。是非、30日の無償トライアル を使って、パワフルかつシンプルなデータ連携を体感してください。