Page 1 of 1

RCP and intact property

Posted: Thu May 17, 2012 2:46 pm
by abhinavsuri
I have 5 columns in my source table. The 5th column contains multiple data values delimited by pipes.

I need to pass the 4 columns as is and I need to parse the 5th column data values into individual columns and load a target file. The job must also be reusable/generic.

I tried building this with RCP and import column stage. However, I am getting only the first 4 columns in output file. The file is not getting loaded with the parsed columns from the 5th column.

My job looks like this
Oracle conn -->Column import-->Seq File

If I change this job and do not pass the first 4 columns to the target file, I get the parsed contents of the 5th source column.

Can anyone tell me what I need to use to get this working correctly?
I tried using intact property but couldn't get it to work. Don't know if intact is meant for this scenario or not.

Posted: Thu May 17, 2012 4:44 pm
by Kryt0n
Are you passing to a sequential file? Just convert the pipes to your sequential file delimiter

Is there a limit to the number of fields within the 5th column? If so, then using the Field function for those few should be easy enough

Posted: Fri May 18, 2012 11:41 am
by abhinavsuri
I was able to achieve the required results except the columns were not in required order. The intact property is not required.

All you need to do is define the schema file for the data to be passed from 5th column. Remaining 4 columns should only be defined upto i/p link of import column stage. Output columns should be blank and RCP should be checked on i/p column stage. This will automatically populate output columns.

My only problem is that the output link is being populated with the data parsed from column 5 first and then the remaining 4 columns. However, in input link column 1-4 are dined before column 5

Posted: Fri May 18, 2012 12:37 pm
by FranklinE
I have a personal bias against using RCP. In my experience it is not worth the hassle in other areas, especially in researching production problems.

Because RCP suppresses the table definition display in a stage, you can't adjust the order of the columns. That's an example of why I avoid using RCP.

Good luck.

Posted: Mon May 21, 2012 1:49 am
by Kryt0n
Have you got an output schema definition? Or just relying on RCP?

Posted: Mon May 21, 2012 3:02 am
by Harini
You can have two sequential files. One reading the first four columns with the key column and other file with key column and the fifth column and join them with the key column.

Posted: Mon May 21, 2012 5:15 pm
by Kryt0n
Harini wrote:You can have two sequential files. One reading the first four columns with the key column and other file with key column and the fifth column and join them with the key column.
What would that solve?