3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Microsoft Power BIでAutomation Anywhereのデータを表示させる

Last updated at Posted at 2020-08-23

Microsoft Power BI August 2020 Update (2.84.802.0 (2020年8月)) でAutomation Anywhereコネクタのベータ版が組み込まれました。これによりAutomation AnywhereでBot Insightに表示していたデータがPower BIにも取り込めるようになりました。Automation Anywhereの対応バージョンはv11.xおよびA2019です。

どのように接続するのか、やってみました。(今回はA2019でやってみました)

参考資料

必要要件

  • Automation Anywhere Control Room
  • 使用するAutomation Anywhereユーザーアカウントで、ユーザーがAAE_Bot Insight AdminAAE_Adminロールを持っていること
  • Power BI Desktopをインストール済み

全体像

Automation Anywhere Control Room APIの中のBot Insight APIを使ってREST APIでデータをPower BI Desktopに読み込みます。
image.png

扱えるデータの種類

  • Business Information: ビジネスデータ。Botの実行で記録されたビジネスデータを取得します。AAE_Bot Insight Admin権限が必要。
  • Business Variable Profile: ビジネスデータ。Botで使われている変数名、変数型、最大値、最小値に関する情報を得ます。AAE_Bot Insight Admin権限が必要。
  • Get Bot Run Data Detail: オペレーションデータ。過去のアクティビティに関する情報を取得します。AAE_Bot Insight Admin権限が必要。
  • Get Audit Trail Data Detail: オペレーションデータ。他のユーザーも含めた監査データを取得します。AAE_Admin権限が必要。

Power BI DesktopでAutomation Anywhereをデータソースとして指定

  1. Power BI Desktopで「データを取得」-「詳細」を選択します。
    image.png
  2. 「データを取得」ダイアログボックスで「Automation Anywhere (ベータ)」を選択します。
    image.png
    以下のダイアログで「続行」ボタンをクリックします。
    image.png
  3. Automation Anywhereのバージョン選択とControl Room URLを指定します。ここでは「A2019」を選択し、あらかじめ用意してあるControl Room URLを入力します。URLの最後に "/" は入れないようにしてください。
    image.png
  4. ユーザー名とパスワードを入力して「接続」ボタンをクリックします。
    image.png
  5. Power QueryでAPIの一覧がテーブルとして表示されます。
    image.png

Get Bot Run Data Detailのデータを整形してPower BIに出力

以下では、APIの例としてGet Bot Run Data Detailを扱います。URLを指定するControl Roomではあらかじめある程度Botを実行していることで過去のアクティビティデータが溜まります。

  1. Get Bot Run Data Detailの右隣にあるFunctionをクリックします。
    image.png

    ※2回目に実行すると、替わりに以下のダイアログになることもあります。その場合はGet Bot Run Data Detailを選択して「データの変換」ボタンをクリックすると同等の操作となります。
    image.png
  2. パラメータの入力ダイアログボックスで「OK」ボタンをクリックします。
    image.png
  3. Listで返ってきた結果をクリックします。
    image.png
    Listの中のRecordの一覧が表示されます。
    image.png
  4. リボンの「テーブルへの変換」ボタンをクリックします。Listの中のRecord型のデータをTableに変換できます。
  5. List/Recordの内容がテーブルに展開された形のクエリが完成しました。リボンの一番左の「閉じて適用」ボタンをクリックすると、Power Queryが閉じてデータがPower BIにテーブル形式で読み込まれます。
    image.png

Power BI Desktop上でレポートを仕上げる

Power BIにGet Bot Run Data Detailテーブルが読み込まれました。これからレポートを作成していきます。

  1. 視覚化パネルから「テーブル」と「円グラフ」を選択してキャンバス上に置きます。
    image.png
  2. テーブルは表示したい列を選択します。
    image.png
  3. 円グラフの方は「Cloumn1.status」を凡例と値にセットします。

このように、Automation AnywhereのBot Insight API経由でPower BIにも同じデータが表示できます。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?