Page 1 of 1

Runtime column propagation

Posted: Fri Oct 29, 2010 9:37 am
by prashanth.spl
Hi,

I have a source to target direct mapping with RCP enabled. when i am moving the data from source to target, i want to transform all the columns datatype TIMESTAMP to DATE in target. Is this possible?


Thanks

Posted: Fri Oct 29, 2010 9:59 am
by ArndW
No, not via RCP. RCP allows you to copy columns across stages without explicitly defining them everywhere, but doesn't perform implicit conversions.
There are different approaches you can use if you really want to do this, but they require that you have a list of the column name(s) in your parameters. You can then use the modify stage to create new columns with DATE type based on the column name you have in a parameter and perform an explicit conversion from timestamp to date on that column.

Another possibility is to declare your output to be a string of length 10 and ignore the "possible truncation" warning message when DataStage performs the implicit conversion from timestamp to string.