TDCH: escapedby and enclosedby

Tools & Utilities

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


Tags (3)
Teradata Employee

Re: TDCH: escapedby and enclosedby

The job is failing when trying to parse the command-line arguments.  Try enclosing your enclosed by and escaped by with quotes (i.e. -enclosedby "\"" -escapedby "/").  I also noticed that you said that you want the escaped by with a forward slash but you are using a backslash instead.


Best regards,


Sean Dorval

TDCH Development