TIBCO Data Virtualization で Workday のデータ にリアルタイムアクセスする方法

CData TIBCO DV Adapter for Workday を使って、TIBCO Data Virtualization Studio でWorkday のデータソースを作成し、TDV Server からWorkday のデータにリアルタイムでアクセスする方法を解説します。

TIBCO Data Virtualization(TDV)は、複数の多様なデータソースへのアクセスを一元管理するエンタープライズデータ仮想化ソリューションです。CData TIBCO DV Adapter for Workday と組み合わせることで、TIBCO Data Virtualization 内からWorkday のデータに直接フェデレーテッドアクセスが可能になります。この記事では、アダプターのデプロイと Workday に基づく新しいデータソースの作成手順を解説します。

CData TIBCO DV Adapter は、最適化されたデータ処理機能が組み込まれており、Workday のデータ とのインタラクションにおいて比類のないパフォーマンスを発揮します。Workday に対して複雑な SQL クエリを発行すると、アダプターはフィルタや集計などサポートされている SQL 操作を直接 Workday にプッシュします。組み込みの動的メタデータクエリにより、ネイティブのデータ型を使用してWorkday のデータを操作・分析できます。

Workday データ連携について

CData は、Workday のライブデータにアクセスし、統合するための最も簡単な方法を提供します。お客様は CData の接続機能を以下の目的で使用しています:

  • Prism Analytics Data Catalog で作成したテーブルやデータセットにアクセスでき、Workday システムの忠実性を損なうことなく、ネイティブの Workday データハブを操作できます。
  • Workday Reports-as-a-Service にアクセスして、Prism から利用できない部門データセットや、Prism の許容サイズを超えるデータセットのデータを表示できます。
  • WQL、REST、または SOAP でベースデータオブジェクトにアクセスし、より詳細で細かいアクセスを実現できます(ただし、クエリの作成には Workday 管理者や IT の支援が必要な場合があります)。

ユーザーは、Tableau、Power BI、Excel などの分析ツールと Workday を統合し、当社のツールを活用して Workday データをデータベースやデータウェアハウスにレプリケートしています。アクセスは、認証されたユーザーの ID とロールに基づいて、ユーザーレベルで保護されます。

Workday を CData と連携させるための設定についての詳細は、ナレッジベース記事をご覧ください:Comprehensive Workday Connectivity through Workday WQL および Reports-as-a-Service & Workday + CData: Connection & Integration Best Practices


はじめに


Workday TIBCO DV Adapter のデプロイ

  1. コンソールで、TDV Server のインストールディレクトリ内の bin フォルダに移動します。現在のバージョンのアダプターがインストールされている場合は、先にアンデプロイする必要があります。

    .\server_util.bat -server localhost -user admin -password ******** -undeploy -version 1 -name Workday
    
  2. CData TIBCO DV Adapter をローカルフォルダに解凍し、解凍した場所から JAR ファイル(tdv.workday.jar)をサーバーにデプロイします。

    .\server_util.bat -server localhost -user admin -password ******** -deploy -package /PATH/TO/tdv.workday.jar
    

新しい JAR ファイルが正しくロードされるように、サーバーの再起動が必要な場合があります。再起動は、C:\Program Files\TIBCO\TDV Server <version>\bin にある composite.bat スクリプトを実行して行えます。サーバーを再起動した後は、TDV Studio への再認証が必要です。

再起動コマンドの例

.\composite.bat monitor restart

OAuth を使用して Workday で認証する

Workday は OAuth プロトコルを使用して認証を行いますが、TDV Studio は内部でブラウザベースの認証をサポートしていないため、OAuth トークンを取得するための簡単な Java アプリケーションを作成して実行する必要があります。取得したトークンは、アダプターから直接 Workday に接続するために使用されます。

Create the Java Application

  1. Create a new Java file with preferred name for example GenOAuthSettings.java. This Java file leverages the WorkdayOAuth class contained within the TDV Adapter JAR to initiate a test connection and perform the required OAuth authentication flow
  2. Copy and insert the following code into the .java file:
  3. 
    public class GenOAuthSettings {
        public static void main(String[] args) {
            try {
        	    if (args.length != 2) {
        			throw new Exception("Input must have two arguments: 'data source', 'connection string'");
        		}
        
        		String source = args[0].replace(" ", "").toLowerCase();
        		String connectionString = args[1];
        		String prefix;
        
        		if (source.equals("workday")) {
        			prefix = "jdbc:workday:";
        
        			com.cdata.cis.workday.WorkdayOAuth oauth = new com.cdata.cis.workday.WorkdayOAuth();
        
        			if (!connectionString.startsWith(prefix)) connectionString = prefix + connectionString;
        			oauth.generateOAuthSettingsFile(connectionString);
        		}
        		// More sources can be added below using the same format.  You must add the import statement and ensure the jar file resides in the classpath
    			//            else if (source.equals("googlebigquery") || source.equals("bigquery")) {
    			//                prefix = "jdbc:googlebigquery:";
    			//
    			//                com.cdata.cis.googlebigquery.GoogleBigQueryOAuth oauth = new com.cdata.cis.googlebigquery.GoogleBigQueryOAuth();
    			//
    			//                if (!connectionString.startsWith(prefix)) connectionString = prefix + connectionString;
    			//                oauth.generateOAuthSettingsFile(connectionString);
    			//            }
        		else {
    				throw new Exception("Data Source not supported.  Available Data Sources: Workday");
    			}
    			
    			System.out.println("Test Connection Successful!");
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    	}
    }
    
  4. Place the .java file in the same directory as the tdv.workday.jar file. This is required to prevent classpath resolution errors during compilation and execution

Build and run the Java Application

  1. Open Console and navigate to the directory containing the .java file and adapter jar
  2. Compile the Java file using the following command:
  3. javac -cp .;tdv.workday.jar GenOAuthSettings.java
    
  4. Execute the application using one of the following commands:
  5. java -cp .;tdv.workday.jar GenOAuthSettings "Workday" "connection string"
    

This command initiates the OAuth authentication flow and generates the OAuth settings file at the location specified in the OAuthSettingsLocation parameter. Once you deploy the adapter and authenticate, you can create a new data source for Workday in TDV Studio.

TDV Studio で Workday データソースを作成する

CData TIBCO DV Adapter for Workday を使用すると、Workday 用のデータソースを簡単に作成し、データソースをイントロスペクトしてリソースを TDV に追加できます。

データソースの作成

  1. データソースを追加するフォルダを右クリックし、New -> New Data Source を選択します。
  2. アダプター(例:Workday)が表示されるまでスクロールし、Next をクリックします。
  3. データソースに名前を付けます(例:CData Workday Source)。
  4. 必要な接続プロパティを入力します。

    Workday 接続プロパティの取得・設定方法

    ここでは、4つのWorkday API の接続パラメータを設定する方法、およびTenant とBaseURL を取得する方法について説明します。必要なAPI のパラメータが設定され、カスタムOAuth および / またはAzure AD API クライアントを作成したら、接続の準備は完了です。

    接続の前提条件

    API / 前提条件 / 接続パラメータ
    WQL / WQL サービスを有効化(下記参照) / ConnectionTypeWQL
    Reports as a Service / カタログレポートの設定(ヘルプドキュメントの「データアクセスのファインチューニング」参照) / ConnectionTypeReports
    REST / 自動で有効化 / ConnectionTypeREST
    SOAP / 自動で有効化 / ヘルプドキュメントのWorkday SOAP API への認証を参照

    BaseURL およびTenant の取得

    BaseURL およびTenant プロパティを取得するため、Workday にログインしてView API Clients を検索します。 この画面では、Workday はBaseURLTenant の両方を含むURL であるWorkday REST API Endpoint を表示します。

    REST API Endpoint のフォーマットは、 https://domain.com//mycompany です。ここで、

    • https://domain.com(URL のサブディレクトリと会社名の前の部分)はBaseURL です。
    • mycompany(URL の最後のスラッシュの後の部分)はTenant です。

    例えば、REST API エンドポイントがhttps://wd3-impl-services1.workday.com/ccx/api/v1/mycompany の場合、 BaseURLhttps://wd3-impl-services1.workday.com であり、Tenantmycompany です。

    WQL サービスを有効化

    Workday WQL API を介して接続するには、はじめにWQL Service を有効にする必要があります。

    1. Workday を開きます。
    2. 検索バーにView Domain と入力します。
    3. プロンプトにWorkday Query Language と入力します。
    4. Allowed Security Group Types のいずれかに、接続するユーザーが含まれていることを確認します。

    Workday への認証

    Basic 認証以外のほとんどのWorkday 接続では、認証のためにOAuth ベースのカスタムAPI クライアントアプリケーションを作成する必要があります。これには、ユーザーがAzure AD 資格情報を介して接続するエンタープライズインストールも含まれます。 Workday への認証につての詳細は、ヘルプドキュメントの「Workday への認証」セクションを参照してください。

    NOTE:DV Adapter の OAuthSettingsLocation プロパティには、OAuth 認証(上記参照)を実行したときと同じ値を設定してください。

  5. Create & Close をクリックします。

データソースのイントロスペクト

データソースを作成したら、右クリックして Open を選択することでデータソースをイントロスペクトできます。ダッシュボードで Add/Remove Resources をクリックし、データソースの一部として含めるテーブル、ビュー、ストアドプロシージャを選択します。Next をクリックし、Finish をクリックして、選択した Workday のテーブル、ビュー、ストアドプロシージャをリソースとして追加します。

After creating and introspecting the data source, you are ready to work with Workday のデータ in TIBCO Data Virtualization just like you would any other relational data source. You can create views, query using SQL, publish the data source, and more.

データソースを作成してイントロスペクトしたら、他のリレーショナルデータソースと同様に TIBCO Data Virtualization でWorkday のデータを操作できるようになります。ビューの作成、SQL によるクエリ、データソースの公開など、さまざまな操作が可能です。

はじめる準備はできましたか?

詳細:

TIBCO DV アダプタ