First, an overview of the task map:
The process is to first delete the files on HDFs with Thdfsdelete, then import the data from the organization tables in Oracle into HDFS, establish hive connection-"Hive Build Table-" Tjava Get system Time-" Thiveload Import the files on HDFs into the hive table.
The settings for each of these components are described below:
Thdfsdelete_1:
Institutions:
Thdfsoutput_1:
Hive
Thivecreatetable:
Tjava_1:
Thiveload_1:
Create a content variable below the context:
This content variable is Riqi, assigned in Tjava_1, and then used in thiveload_1, so that the inserted partition is the system date that the program is running.
[[email protected] root]$ hivelogging initialized using configurationinch file:/etc/Hive/Conf/Hive-Log4j.propertiesSLF4J:Class Pathcontainsmultiple SLF4J bindings. Slf4j:found bindinginch [Jar:file:/usr/hdp/2.2.0.0-2041/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/staticloggerbinder.class ]Slf4j:found Bindinginch [jar:file:/usr/hdp/2.2.0.0-2041/hive/lib/hive-jdbc-0.14.0.2.2.0.0-2041-standalone.jar!/org/slf4j/impl/ Staticloggerbinder.class]Slf4j:see http://www.slf4j.org/Codes.html#multiple_bindings forAn explanation. Slf4j:actual binding is ofType[org.slf4j.impl.Log4jLoggerFactory]Hive> UseZhangchao;oktime taken:1.023secondshive>Show Tables;okjigoutime taken:0.255Seconds, fetched:1row (s) Hive> Select * fromJigou limitTen; okd64ceb0d-c85a-43ca-a705-c34f4258e938002Chengdu High-Tech zone West Park Community Health Service Center CDGXQXYSQW1 09465203-3Cheng Oracle.sql.OPAQUE@7cfa3f14 510109 13323434821028cc-30cc-461b-a197-28d62abc92dc002CDGXQZHSQW Community Health Service Center in Chengdu High-tech Zone1 45081237-2Jia Zhaoyong028-85658497No. 56th Oracle.sql.OPAQUE Road 3, Middle and high-tech zone, Chengdu, China@11437a26 133234340a49de29-5562-4951-Abf3-829b0cff9692004Chengdu High-tech zone Xiaojiahe Community Health Service Center CDGXQXJHSQ1Yu Hui028-85178759Chengdu Hi-Tech Zone Xiaojiahe Lane No. 8th Oracle.sql.OPAQUE@65085da4 13323434fd6d1f13-e435-4461-8cdc-d2fe48158c8c001High-Tech District Cooperative Community Health Service Center GXQHZSQWSF1 45085201-6Rohonglin028-87876286Chengdu High-Tech zone cooperation Qingjiang District Qing Yuan Huan Street No. 171th Oracle.sql.OPAQUE@83bedce 510109 1332343494ac1712-199f-4461-9761-5d5ed3410a7f003Gxqfcsqwsf Grass Community Health Service center in Gaoxin district1 003Administrator Oracle.sql.OPAQUE@1679739b 13323434d64ceb0d-c85a-43ca-a705-c34f4258e938002Chengdu High-Tech zone West Park Community Health Service Center CDGXQXYSQW1 09465203-3Cheng Oracle.sql.OPAQUE@3116aa4b 510109 -- .- in821028cc-30cc-461b-a197-28d62abc92dc002CDGXQZHSQW Community Health Service Center in Chengdu High-tech Zone1 45081237-2Jia Zhaoyong028-85658497No. 56th Oracle.sql.OPAQUE Road 3, Middle and high-tech zone, Chengdu, China@47063b1a -- .- in0a49de29-5562-4951-Abf3-829b0cff9692004Chengdu High-tech zone Xiaojiahe Community Health Service Center CDGXQXJHSQ1Yu Hui028-85178759Chengdu Hi-Tech Zone Xiaojiahe Lane No. 8th Oracle.sql.OPAQUE@6a124c63 -- .- infd6d1f13-e435-4461-8cdc-d2fe48158c8c001High-Tech District Cooperative Community Health Service Center GXQHZSQWSF1 45085201-6Rohonglin028-87876286Chengdu High-Tech zone cooperation Qingjiang District Qing Yuan Huan Street No. 171th Oracle.sql.OPAQUE@57552dfc 510109 -- .- in94ac1712-199f-4461-9761-5d5ed3410a7f003Gxqfcsqwsf Grass Community Health Service center in Gaoxin district1 003Administrator Oracle.sql.OPAQUE@193e282f -- .- inTime taken:0.807Seconds, fetched:Tenrow (s) Hive>
Talend importing data from Oracle into hive, setting hive partition fields based on system time