cancel
Showing results for 
Search instead for 
Did you mean: 

Dealing with carriage returns

Former Member
0 Kudos

Hi,

I currently have a problem when running a tab delimted file within BODI.

My source file has a lot of carriage return values, how can I deal with these without having to write a utility which does this for me?

I appreciate your help.

Regards

Azeem

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

you have carriage return as part of column value and also as row delimiter ?

you will have to escape the carriage return and use the escape character in file format or you will have to enclose you varchar column values in double quotes and use that as text delimiter in file format

if this is not too many rows then you could use the error handling and write the bad rows to a file and fix the problem and try loading data again or you may have to change the application generating the txt file to enclose the varchar columns in double quotes

Former Member
0 Kudos

Hi,

Data services has a transformation called as Validation.

You can put these validation transformation and pass your records thru this.

In the Validation transformation you can select Custom condition and give this type of code.

match_pattern(Query.STREET_ADDR, '* *')=1

What will this code do.

Any thing which is a character will be passed by this but a carriage return will not pass thru this.

So you can route ur records which fail this condition to a error table and correct it and pass it again.

Hope this helps.

if this helps please let me know.

Regards

Girish

Former Member
0 Kudos

Hi,

Unfortunately the file I am reading has carriage returns within it. Therefore the rows don;t load as BODI thinks these are additonal tabs and fails to load the row.

I need to be able to strip the carriage return before attempting to load it in to BODI. The validation transform method will work only once the data has succesfully passed through, which in my case it hasn't.

Regards

Azeem