Support Questions
Find answers, ask questions, and share your expertise

sqoop issue while importing table from teradata to hive

I am trying to create schema from teradata to hive , but even tough command is successfully executed but table is not create inti hive . please find below command for the same .

sqoop create-hive-table --connect jdbc:teradata://<tdip>/database=db_tmp --connection-manager org.apache.sqoop.teradata.TeradataConnManager --username <username> -P --table tbl_emp --hive-table db_tmp.tbl_emp


Super Guru
@Anurag Mishra

Could you try to execute sqoop import with the below command

sqoop import --connect jdbc:teradata://<tdip>/database=db_tmp -connection-manager org.apache.sqoop.teradata.TeradataConnManager --username <username> -P --table tbl_emp --hive-import --hive-table <hivedatabase.hivetable> --create-hive-table --fields-terminated-by',' -m 1 

Let us know if you are facing any issues..!!

I am using TDCH , I think import is not required with sqoop if you are using TDCH .

Super Guru
@Anurag Mishra

If you are using TDCH then try with below command

hadoop jar $USERLIBTDCH
-libjars $LIB_JARS
-url jdbc:teradata://testsystem/database=testdb
-username testuser
-password testpassword
-jobtype hive
-fileformat rcfile
-sourcetable example4_td
-sourcefieldnames "c1,c3,c2"
-nummappers 1
-targetdatabase default
-targettable example4_hive
-targettableschema "h1 int,h2 float"
-targetpartitionschema "h3 string"
-targetfieldnames "h1,h2,h3 "

by using targetdabase/table/schema/fieldnames we can create hive table by using TDCH.

Refer to this link and section 5.5.2 for more details regarding Create Hive table using TDCH.

; ;