How to remove ctrl M or(^M) characters in file using Sequential File stage?
Answers were Sorted based on User's Feedback
Answer / subbuchamala
1) In Sequential file, we have an option like 'filter'.
in the filter we can mention like:
sed 's/\^M//g' FileName.txt
or
2) we can do this in Before job routine(executeSH) and we can cal this in Seq file stage. here we can use UNIX command 'unix2dos fileName.txt'
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / subhash (subbuchamala)
We can use these ways also to remove Control M Characters
tr -d '\r' < yourfile.txt > yourfile1.txt
mv yourfile1.txt yourfile.txt
or
Change the line terminator in Sequential File stage from
UNIX-style to DOS-style(it's a stage property).
| Is This Answer Correct ? | 3 Yes | 0 No |
What is audit table?
What is the difference between datastage and informatica?
which unix commands mostly used in datastage
WHERE YOU USE UNIX COMMANDS AS A ETL DEVELOPER?
Thanks to all people who are posting their comments...
1.what is materialized data? 2.how to view the materialized data?
which memory is used by lookup and join
1.What is the flow of Transformer? 2.How can you do INDEX table in DataStage level?
What are the different kinds of views available in a datastage director?
Differentiate between data file and descriptor file?
what is meant by port ? what is the use of port ? what are the different type of ports and its usage
root tree will find which is server job and which is parallel job?