AutoMate はHelpSystems 社が提供するRPA ツールです。700項目の自動化機能と15種類の自動実行トリガーが選択可能であるためあらゆるシーンを自動化することが可能です。
また、データベースにODBC経由で接続できるアクションが含まれており、CData ODBC Driverと組み合わせることでCData が対応しているさまざまなデータソースとノーコードで連携ができるようになります。
この記事では、AutoMate と CData ODBC Driver を使って、Azure Data Lake Storage に連携するタスクを作成します。
Azure Data Lake Storage データへの接続
- まずODBC 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.
- 入力後、接続テストが成功すれば設定は完了です。
AutoMate でタスクを作成する
それでは AutoMate でタスクを作成していきましょう。
- タスク アドミニストレーターを起動し新規タスクを作成します。
- 任意のタスク名を入力して、次へ進みます。
- トリガーを追加し、タスクビルダーを起動します。「タスクビルダーを開始する」をクリックします。
AutoMate でAzure Data Lake Storage へのDB 接続を構成
続いて AutoMate でODBC への接続構成を行います。
- ODBC 接続は「データベース」のアクションを使って構成していきます。
- まずは接続を確立します。「SQL 接続を開く」アクションをドラッグアンドドロップで配置しましょう。
- プロパティの「接続」で接続設定をします。「接続の構築」をクリックします。
- 接続するプロバイダーを選択します。「Microsoft OLE DB Provider for ODBC Drivers」を選択します。
- データソースを指定します。接続設定は完了です。
Azure Data Lake Storage のデータをAutoMate で扱う
接続セッションの構成が完了したら、実際にデータを読み取るアクションを設定しましょう。
- SQL クエリでデータを取得するため「SQL クエリ」アクションを配置します。
- 「SQL クエリ」アクション では「SQL ステートメント」に対してSQL を入力して、データを取得することができます。
- 取得したデータを後続ステップで利用するため、データセットを作成します。
- CSV に出力して取得データを確認します。
作成したタスクの動作を確認する
それでは作成したタスクを実際に動かしてみましょう。
- タスクは画面上にある「実行」で手動実行が可能です。
- 処理の完了は画面下の出力から確認できます。
- 指定したCSV ファイルを開きます。正常にAzure Data Lake Storage のデータを元にしたCSV ファイルが生成されていました。