This document describes how to synchronize Oracle table data to hive with the ODI.
1. Preparatory work
Install Oracle Big Data connectors on each node of the Hadoop cluster, as shown in the following components:
Just install Oracle Loader for Hadoop (oraloader) and Oracle SQL Connector for Hadoop distributed File System (Oraosch) two software. Installation is simple and can be extracted directly (the ODI, Oraosch, and Oraloader components are installed as Oracle users. )
2. Create a target table
Create the target table on hive as follows:
CREATE TABLE `RHNPACKAGE2`( `id` bigint, `org_id` bigint, `name_id` bigint, `evr_id` bigint, `package_arch_id` bigint, `package_group` bigint, `rpm_version` string, `description` string, `summary` string, `package_size` bigint, `payload_size` bigint, `installed_size` bigint, `build_host` string, `build_time` timestamp, `source_rpm_id` bigint, `checksum_id` bigint, `vendor` string, `payload_format` string, `compat` bigint, `path` string, `header_sig` string, `copyright` string, `cookie` string, `last_modified` timestamp, `created` timestamp, `header_start` bigint, `header_end` bigint, `modified` timestamp);
3. Create a Map
The Oracle and hive models have been created before and are directly used to create the mappings. As shown in the following:
Integration Type Setting Properties:
Connection Settings Properties:
Filter Settings Properties:
Lkm Setting Properties:
IKM Setting Properties:
If you set the value of truncate to true, the data in the table is emptied and imported before each import, and the default is False.
4. Perform the mapping
Results such as:
Loading Data from Oracle to Hive by ODI 12c