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  -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(
        at com.teradata.connector.common.utils.ConnectorUnicodeCh aracterConverter.fromEncodedUnicode(ConnectorUnicodeCh
        at com.teradata.connector.hdfs.utils.HdfsPlugInConfigurat ion.setInputEscapedBy(
        at com.teradata.connector.common.tool.ConnectorExportTool .processArgs(
        at com.teradata.connector.common.tool.ConnectorExportTool .run(
        at 70)
        at 84)
        at com.teradata.connector.common.tool.ConnectorExportTool .main(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMeth
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delega
        at java.lang.reflect.Method.invoke(
        at org.apache.hadoop.util.RunJar.main(
16/08/31 20:36:30 INFO tool.ConnectorExportTool: job completed with exit code 10000




You must sign in to leave a comment.