Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to use create-hive-table flag for teradata connector in sqoop

Highlighted

Unable to use create-hive-table flag for teradata connector in sqoop

Explorer

Hi,

Referring with the documentation in https://community.hortonworks.com/articles/53531/importing-data-from-teradata-into-hive.html

I have teradata table with near-to 100 columns, its not practically feasible to create schema manually. I rather prefer to import the table automatically using create-hive-table flag

I have followed the below syntax:

sqoop create-hive-table -libjars /usr/hdp/current/sqoop-client/lib/hortonworks-teradata-connector-1.4.1.2.3.2.0-2950.jar --connect jdbc:teradata://txxxxx.xxxx.net/Database=pxxxxx,LOGMECH=LDAP --connection-manager org.apache.sqoop.teradata.TeradataConnManager --username sxxxxx -p --table pdcrdata.DBQLogTbl_Hst_1 --map-column-hive EFF_TSP=STRING --hive-table xx_teradata_test.teradata_import

And its throwing the following error:

17/03/03 10:35:47 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.4.2.0-258 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/2.4.2.0-258/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/2.4.2.0-258/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Error parsing arguments for create-hive-table:

17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Unrecognized argument: -p 17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Unrecognized argument: --table

17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Unrecognized argument: pdcrdata.DBQLogTbl_Hst_1

17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Unrecognized argument: --map-column-hive

17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Unrecognized argument: EFF_TSP=STRING

17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Unrecognized argument: --hive-table

17/03/03 10:35:48 ERROR tool.BaseSqoopTool: Unrecognized argument: pi_talend_test.teradata_import Try --help for usage instructions.

Thanks,

Suresh Kumar

5 REPLIES 5

Re: Unable to use create-hive-table flag for teradata connector in sqoop

Mentor

Please try the following

sqoop import -libjars /usr/hdp/current/sqoop-client/lib/hortonworks-teradata-connector-1.4.1.2.3.2.0-2950.jar --connect jdbc:teradata://txxxxx.xxxx.net/Database=pxxxxx,LOGMECH=LDAP --connection-manager org.apache.sqoop.teradata.TeradataConnManager --username sxxxxx -p --table pdcrdata.DBQLogTbl_Hst_1 --map-column-hive EFF_TSP=STRING --hive-table xx_teradata_test.teradata_import --create-hive-table

Re: Unable to use create-hive-table flag for teradata connector in sqoop

Explorer

Hi Arten,

I tried as you have suggested and Its showing the following error .

17/03/04 18:54:35 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.4.2.0-258 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/2.4.2.0-258/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/2.4.2.0-258/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Error parsing arguments for import: 17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: -p

17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: --table 17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: pdcrdata.DBQLogTbl_Hst_1 17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: --map-column-hive 17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: EFF_TSP=STRING 17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: --hive-table 17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: pi_teradata_test.teradata_import 17/03/04 18:54:36 ERROR tool.BaseSqoopTool: Unrecognized argument: --create-hive-table

Thanks,

Suresh

Re: Unable to use create-hive-table flag for teradata connector in sqoop

Mentor

-p should be capitalized -P

Re: Unable to use create-hive-table flag for teradata connector in sqoop

Explorer

I see this is also not working either.

the sqoop command, is getting frozen and not generating an application-id

Re: Unable to use create-hive-table flag for teradata connector in sqoop

Mentor

Take out libjars argument, place the connector into /usr/lib/hdp/current/sqoop-client/lib and try again

Don't have an account?
Coming from Hortonworks? Activate your account here