常時起動のアプリケーションは、自動フェイルオーバー機能およびリアルタイムなデータアクセスを必要とします。CData Sync は、IBM DB2 インスタンスに直近のAzure Data Lake Storage を反復同期します。CData Sync で、アーカイブ、レポーティング、アナリティクス、機械学習、AI などで使えるよう、企業内の多様なデータを一か所に統合して管理することが可能になります
IBM DB2 をレプリケーションの同期先に設定
CData Sync を使って、IBM DB2 にAzure Data Lake Storage をレプリケーションします。レプリケーションの同期先を追加するには、[接続]タブを開きます。
- [同期先]タブをクリックします。
- IBM DB2 を同期先として選択します。
- 必要な接続プロパティを入力します。IBM DB2 との接続には、以下のプロパティが必要です:
- Server:サーバーのアドレスもしくはホスト名、とポート。
- Database:データベース名。
- UID:DB2 データベースにアクセスするユーザー名。
- PWD:データベースにアクセスするパスワード。
- [接続のテスト]をクリックして、正しく接続できているかをテストします。
- [変更を保存]をクリックします。
Azure Data Lake Storage 接続の設定
データソース側にAzure Data Lake Storage を設定します。[接続]タブをクリックします。
- [データソース]タブをクリックします。
- Azure Data Lake Storage アイコンをデータソースとして選択します。プリインストールされたソースにAzure Data Lake Storage がない場合には、追加データソースとしてダウンロードします。
- 接続プロパティに入力をします。
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.
- [接続のテスト]をクリックして、正しく接続できているかをテストします。
- [変更を保存]をクリックします。
レプリケーションを実行するクエリの設定
CData Sync はレプリケーションをコントロールするSQL クエリを簡単なGUI 操作で設定できます。レプリケーションジョブ設定には、[ジョブ]タブに進み、[ジョブを追加]ボタンをクリックします。 次にデータソースおよび同期先をそれぞれドロップダウンから選択します。
テーブル全体をレプリケーションする
テーブル全体をレプリケーションするには、[テーブル]セクションで[テーブルを追加]をクリックします。表示されたテーブルリストからレプリケーションするテーブルをチェックします。
テーブルをカスタマイズしてレプリケーションする
レプリケーションはテーブル全体ではなく、カスタマイズが可能です。[変更]機能を使えば、レプリケーションするカラムの指定、同期先でのカラム名を変更しての保存、ソースデータの各種加工が可能です。レプリケーションのカスタマイズには、ジョブの[変更]ボタンをクリックしてカスタマイズウィンドウを開いて操作を行います。
レプリケーションのスケジュール起動設定
[スケジュール]セクションでは、レプリケーションジョブの自動起動スケジュール設定が可能です。反復同期間隔は、15分おきから毎月1回までの間で設定が可能です。
レプリケーションジョブを設定したら、[変更を保存]ボタンを押して保存しますAzure Data Lake Storage のIBM DB2 へのレプリケーションジョブは一つではなく複数を作成することが可能です。