Search code examples
replaceprocessdatastage

DATASTAGE replace values in csv file


I have a parallel job in DATASTAGE which load table from CSV file and insert the values to ORACLE DB. I want to use process that replace values in one of the column. let's say I have a column call: ID and I want to change values like "null" or "0" to value: "N/A" How can I do it?

thanks.


Solution

  • For the few information in your question it seems a pretty normal job with a transformer stage upfront the Oracle target. In the derivation field you can specify thing like

    NullToValue (this is a DataStage provided function for the one usecase described) so this would look like NullToValue(<inputcol>, "N/A") or something like IF <inputcol> = "X" THEN "y"

    This should do the job