All Forums Tools
Cvinodh 32 posts Joined 10/11
31 Aug 2016
TDCH: escapedby and enclosedby

I am not able to use enclosedby and escapedby arguments in Teradata hadoop connector. I get the following error when I pass these arguments. here I am trying to set enclosedby with a double quote and escapedby with forward slash. The error goes away when I remove the enclosedby and escapedby arguments. The below command is being run from a Linux Centos machine.
/usr/bin/hadoop jar teradata-connector-1.4.2.jar com.teradata.connector.common.tool.ConnectorExportTool -Dmapred.job.queue.name=public  -separator \u002c -method batch.insert -jobtype hdfs -targettable database.tablename -sourcepaths /user/testuser/file.txt -password ******* -nummappers 10 -url jdbc:teradata://teradata/database=mydb -fileformat textfile -username myusername -enclosedby \" -escapedby \\
 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
16/08/31 20:36:30 INFO tool.ConnectorExportTool: ConnectorExportTool starts at 1472675790301
16/08/31 20:36:30 INFO common.ConnectorPlugin: load plugins in file:/tmp/hadoop-unjar4357814236461756098/ teradata.connector.plugins.xml
16/08/31 20:36:30 INFO tool.ConnectorExportTool: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
        at java.lang.String.charAt(String.java:646)
        at com.teradata.connector.common.utils.ConnectorUnicodeCh aracterConverter.fromEncodedUnicode(ConnectorUnicodeCh aracterConverter.java:79)
        at com.teradata.connector.hdfs.utils.HdfsPlugInConfigurat ion.setInputEscapedBy(HdfsPlugInConfiguration.java:96)
        at com.teradata.connector.common.tool.ConnectorExportTool .processArgs(ConnectorExportTool.java:492)
        at com.teradata.connector.common.tool.ConnectorExportTool .run(ConnectorExportTool.java:53)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java: 70)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java: 84)
        at com.teradata.connector.common.tool.ConnectorExportTool .main(ConnectorExportTool.java:780)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMeth odAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delega tingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
 
16/08/31 20:36:30 INFO tool.ConnectorExportTool: job completed with exit code 10000

 

 

 

You must sign in to leave a comment.