Loading Data From Oracle To Hive By ODI 12c

本文描述如何通过ODI将Oracle表数据同步到Hive。
1、准备工作
在hadoop集群的各个节点分别安装Oracle Big Data Connectors,具体的组件如下图所示:

这里只需安装Oracle Loader For Hadoop(oraloader)以及Oracle SQL Connector for Hadoop Distributed File System (oraosch)两个软件。安装比较简单,直接解压即可使用(这里的ODI、oraosch以及oraloader组件都是以oracle用户身份安装的。)
2、创建目标表
在Hive上创建目标表,如下:

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、创建映射
之前已经创建好oracle和hive模型,这里直接使用其创建映射。如下图所示:

Integration Type设置属性:

连接设置属性:

过滤设置属性:

LKM设置属性:

IKM设置属性:

如果设置TRUNCATE的值为True,每次导入之前,会把表里的数据清空再导入,默认为false。
4、执行映射
结果如下图:

原文地址:http://blog.51cto.com/candon123/2088516

时间: 2024-08-24 15:08:51

Loading Data From Oracle To Hive By ODI 12c的相关文章

SQOOP Load Data from Oracle to Hive Table

sqoop import -D oraoop.disabled=true --connect "jdbc:oracle:thin:@(description=(address=(protocol=tcp)(host=HOSTNAME)(port=PORT))(connect_data=(service_name=SERVICE_NAME)))" --username USERNAME --table TABLE_NAME --null-string '\\N' --null-non-s

Manipulating Data from Oracle Object Storage to ADW

0. Introduction and Prerequisites This article presents an overview on how to use Oracle Data Integrator in order to manipulate data from Oracle Cloud Infrastructure Object Storage on OCI. The scenarios here present loading the data in an object stor

使用OGG"Loading data from file to Replicat"的方法应该注意的问题:replicat进程是前台进程

使用OGG的 "Loading data from file to Replicat"的方法应该注意的问题:replicat进程是前台进程 因此.最好是在vncserver中调用该replicat进程或者以nohup方式放在后台执行.以下的是使用nohup方式放在后台执行. [[email protected] ~]$ ll rep_backgroud.sh -rwxr-xr-x 1 oracle oinstall 98 Jun 2 03:02 rep_backgroud.sh [[e

使用OGG"Loading data from file to Replicat"的方法应该注意的问题:replicat进程是前台进程

使用OGG的 "Loading data from file to Replicat"的方法应该注意的问题:replicat进程是前台进程 因此,最好是在vncserver中调用该replicat进程或者以nohup方式放在后台运行.下面的是使用nohup方式放在后台运行. [[email protected] ~]$ ll rep_backgroud.sh -rwxr-xr-x 1 oracle oinstall 98 Jun 2 03:02 rep_backgroud.sh [[e

Loading Data into HDFS

How to use a PDI job to move a file into HDFS. Prerequisites In order to follow along with this how-to guide you will need the following: Hadoop Pentaho Data Integration Sample Files The sample data file needed for this guide is: File Name Content we

关于 OGG "Loading data from file to Replicat"同步含有lob字段表的部分记录的关键参数

首先说明一点: Loading data with an Oracle GoldenGate direct load 这个方法,对含有如下数据类型的table,是无法使用的: LOBs, LONGs, user-defined types (UDT), or any other large data type that is greater than 4 KB in size. 因此,遇到如下需求时,就不得不用OGG "Loading data from file to Replicat&quo

Data Base Oracle 常用命令

Data Base  Oracle 常用命令 1.登录:(不需要密码,属于管理员权限) conn /as sysdba 2.查看数据库存储位置: select name from v$datafile; 3.创建表空间: 语法:create tablespace 表空间名称 datafile '数据文件的路径' size 大小; 示例:create tablespace test_db datafile 'D:\ORACLE\ORADATA\ORCL\test_db.dbf' size 3000

OGG "Loading data from file to Replicat"table静态数据同步配置过程

OGG "Loading data from file to Replicat"table静态数据同步配置过程 一个.mgr过程 GGSCI (lei1) 3> view params mgr port 7809 二.抽取进程extftor GGSCI (lei1) 4> view params extftor SOURCEISTABLE userid goldengate, password yyyyy rmthost 192.168.100.189, mgrport 7

解决ODI 12C Studio 运行缓慢问题

一.配置 ODI 12C Studio 1.1 修改ODI Studio process的-Xms和-Xmx ide.conf: modifying the initial Heap size (-Xms), and/or maximum Heap size (-Xmx) of the ODI Studio Java process. 路径: "$ODI_HOME\jdeveloper\ide\bin\ide.conf  (我的路径为D:\Oracle\Middleware\Oracle_Hom