We are exporting data using Teradata to a delimited text file using the TPT utility.We are setting the delimiter to '|' by setting TextDelimiter Attribute of DataConnector Operator.Now we need to set the delimiter to some control character preferably based on the ascii value of the control character.Is there any possible way to do this?
Solved! Go to Solution.
Thanks @feinholz it worked fine.Now the data which is exported into delimited text also has some newline characters in the data.When I export the data using TPT the end of record marker is also LF(Line Feed) character thereby making it difficult for the downstream system to identify the end of each record.There are two ways to avert this problem:
The end of record marker cannot be changed.
If you quote your fields and set QuotedData to "yes", then we support embedded newline characters as part of the field data.
Yes this option worked perfectly fine.Also if there is quotecharacters is present in the data we need to escape it using 'Escapequotecharacter' property.
Else if we have any quote character in the data we are are getting extra quotes.
For instance if the data in table is like
1 Stephen \n "Murphy"
Exported data is like:
"1"|"Stephen \n ""Murphy"" "
As we can see we get extra quotes around "Murphy" unless we use the property 'Escapequotecharacter'.
If you are indicating that you want every field to be quoted on output, then yes your quotes will be doubled.
That allows that same data to be read in correctly.