Created 05-30-2018 06:17 AM
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
Created 05-30-2018 10:10 AM
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..!!
Created 05-31-2018 07:49 AM
I am using TDCH , I think import is not required with sqoop if you are using TDCH .
Created 06-02-2018 09:25 PM
If you are using TDCH then try with below command
hadoop jar $USERLIBTDCH com.teradata.connector.common.tool.ConnectorImportTool -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.