Home >> Big Data Hadoop >> Hive with Sqoop in Big Data Hadoop

Hive with Sqoop in Big Data Hadoop

Can directly import data from RDBMS to Hive(Internal or external table)


create table emp1(id int primary key,ename varchar(30) ,deptid int,job varchar(30),mgr varchar(30),hiredate date ,sal varchar(30),ts timestamp default current_timestamp on update current_timestamp);


CREATE TABLE IF NOT EXISTS emp1 (id bigint,ename string ,deptid bigint,job string,mgr string,hiredate date ,sal string,ts timestamp ) ROW FORMAT DELIMITED  FIELDS TERMINATED BY ',';

CREATE TABLE IF NOT EXISTS dept (deptid bigint, dname string,loc string) ROW FORMAT DELIMITED  FIELDS TERMINATED BY ',';

sqoop job --create emp1 -- import --connect jdbc:mysql://localhost:3306/test --username root --password root --table emp1 --incremental lastmodified -check-column ts  --merge-key id  --fields-terminated-by "," --hive-import --hive-overwrite --hive-table test.emp1 -m 1

Post Your Comment

Next Questions
How to save hive query output in csv using python
Hive How To Convert External table to Internal table or vice-versa
Hive What is User Defined Function and User Defined Aggregate Function
What are the different components of a Hive architecture
How can you prevent a large job from running for a long time
What is a Hive Metastore
Explain about the different types of join in Hive
How can you configure remote metastore mode with Hive
How data transfer happens from HDFS to Hive
Hbase Vs Hive
Hive What is the use of Hcatalog
Where is table data stored in Apache Hive by default
Hive Difference between partitioning and bucketing
Explain about the different types of partitioning in Hive
How will you read and write HDFS files in Hive
What are the components of a Hive query processor
Differentiate between describe and describe extended
Will the reducer work or not if you use Limit 1 in any HiveQL query
What is difference between hive internal table and external table
Why you should choose Hive instead of Hadoop MapReduce
How will you optimize Hive performance
Hive Difference between Sort By and Order By
Sqoop vs Flume
What is the default file format to import data using Apache Sqoop

Copyright ©2022 coderraj.com. All Rights Reserved.