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

Sqoop Import Error from Teradata

Highlighted

Re: Sqoop Import Error from Teradata

@Abhishek Srivastava seems 1.3.4 don't contain the TeradataConnManager class, please download hdp-connector v1.4.1 from http://hortonworks.com/downloads/#data-platform and extract it in sqoop lib folder. it has required class in it.

[root@sandbox exp]# jar tvf hortonworks-teradata-connector-1.4.1.2.3.2.0-2950.jar | grep TeradataConnManager
 22035 Sat Oct 17 00:13:42 UTC 2015 org/apache/sqoop/teradata/TeradataConnManager.class
Highlighted

Re: Sqoop Import Error from Teradata

Explorer

Thanks Rajkumar ..

That issue was resolved but stucked in the below line

[root@sandbox bin]# sqoop import \ > -libjars /usr/hdp/2.2.0.0-2041/sqoop/lib/hortonworks-teradata-connector-1.4.1.2.3.2.0-2950.jar \ > --connection-manager org.apache.sqoop.teradata.TeradataConnManager \ > --connect jdbc:teradata://192.168.146.133/Database=temp \ > --hive-delims-replacement '\0D' \ > --fields-terminated-by '\001' \ > --table emp --username dbc --password dbc --target-dir /usr/hue/Abhishek Warning: /usr/hdp/2.2.0.0-2041/accumulo does not exist! Accumulo imports will fail. Please set $ACCUMULO_HOME to the root of your Accumulo installation. 16/06/12 10:26:09 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5.2.2.0.0-2041 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/2.2.0.0-2041/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/2.2.0.0-2041/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [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 for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 16/06/12 10:26:10 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 16/06/12 10:26:10 INFO manager.SqlManager: Using default fetchSize of 1000 16/06/12 10:26:10 INFO tool.CodeGenTool: The connection manager declares that it self manages mapping between records & fields and rows & columns. No class will will be generated. 16/06/12 10:26:10 INFO teradata.TeradataConnManager: Importing from Teradata Table:emp 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Setting input file format in TeradataConfiguration to textfile 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Table name to import emp 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Setting job type in TeradataConfiguration to hdfs 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Setting input file format in TeradataConfiguration to textfile 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Setting number of mappers in TeradataConfiguration to 4 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Setting input batch size in TeradataConfiguration to 1000 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Setting input separator in TeradataConfiguration to \u0001 16/06/12 10:26:10 INFO teradata.TeradataSqoopImportHelper: Setting source table to : emp 16/06/12 10:26:11 INFO common.ConnectorPlugin: load plugins in jar:file:/usr/hdp/2.2.0.0-2041/sqoop/lib/teradata-connector-1.3.4.jar!/teradata.connector.plugins.xml 16/06/12 10:26:11 INFO processor.TeradataInputProcessor: input preprocessor com.teradata.connector.teradata.processor.TeradataSplitByHashProcessor starts at: 1465727171090 16/06/12 10:26:12 INFO utils.TeradataUtils: the input database product is Teradata 16/06/12 10:26:12 INFO utils.TeradataUtils: the input database version is 13.10 16/06/12 10:26:12 INFO utils.TeradataUtils: the jdbc driver version is 13.10

Regards

Abhishek

Highlighted

Re: Sqoop Import Error from Teradata

@Abhishek Srivastavado you have old connector jars into sqoop lib dir? if yes then please remove those and try some small work load.

Highlighted

Re: Sqoop Import Error from Teradata

Explorer

@Rajkumar Singh

Hi ,

Initially,I am able to sqoop import data (1 record) from Teradata to HDFS successfully

But when tried with another go got error message like Directory /temp/test/ already exists .

I also tried with different path /temp/test1/ but again getting the same error .

Can you please help me on this ?

Regards

Abhishek

Highlighted

Re: Sqoop Import Error from Teradata

@Abhishek Srivastava if you are getting the directory already exists error then make sure target-dir is not available on HDFS.

Re: Sqoop Import Error from Teradata

Explorer

Thanks @Rajkumar Singh

My Sqoop import is taking 15-20 minutes to load 1 record whether i am using --m 1,2,3,4 .

Any idea on this ??

Highlighted

Re: Sqoop Import Error from Teradata

@Abhishek Srivastava I am not sure about the why it is taking so much time, it could be conncetivity or resource issue or some enviornmental issue. with --m 1 you are basically telling sqoop to launch 1 mapper to fetch the record from teradata.