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

Who agreed with this topic

SQOOP issue with teradata connector powered by teradata and Avro

New Contributor

Hi, I'm trying to use sqoop to import a table from Teradata into Hive, but am having issues.


Everything is working ok when importing as textfile.  However, since some of the columns can contain messy data, and I can't reliably choose text separators that won't appear in the source data, I want to use an avro data file.  However, when I add --as-avrodatafile to the end of my sqoop command, I get a NPE, i.e:



16/07/30 23:33:47 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : SELECT t.* FROM "jph" AS t WHERE 1=0
16/07/30 23:33:47 DEBUG util.ClassLoaderStack: Restoring classloader:
16/07/30 23:33:47 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
        at org.apache.sqoop.manager.SqlManager.execute(
        at org.apache.sqoop.manager.SqlManager.execute(
        at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(
        at org.apache.sqoop.manager.SqlManager.getColumnInfo(
        at org.apache.sqoop.manager.ConnManager.getColumnInfo(
        at org.apache.sqoop.orm.ClassWriter.getColumnInfo(
        at org.apache.sqoop.orm.AvroSchemaGenerator.generate(
        at org.apache.sqoop.orm.AvroSchemaGenerator.generate(
        at com.cloudera.connector.teradata.imports.BaseImportJob.configureInputFormat(
        at com.cloudera.connector.teradata.imports.TableImportJob.configureInputFormat(
        at org.apache.sqoop.mapreduce.ImportJobBase.runImport(
        at com.cloudera.connector.teradata.TeradataManager.importTable(
        at org.apache.sqoop.tool.ImportTool.importTable(
        at org.apache.sqoop.Sqoop.runSqoop(
        at org.apache.sqoop.Sqoop.runTool(
        at org.apache.sqoop.Sqoop.runTool(
        at org.apache.sqoop.Sqoop.main(

Any ideas?  AFAIK, the only supported options are text files, or avro file - sequencefiles don't seem to be supported.



These are the versions:


Running Sqoop version: 1.4.6-cdh5.7.
Cloudera Connector Powered by Teradata' on version 1.4c5



Who agreed with this topic