Page 1 of 1

Modify Stage specification Parameterization

Posted: Thu Jul 19, 2012 12:46 am
by nani0907
Hi All,

I had parmeterized the modify stage specification to make my multi-instance job generic and reusable.In one of the execution, the job does not require the paramater. In that case i didn't pass anything to job parameter,It aborts.Could any body help what to pass in specification parameter if there in no transformation required.

Thanks in advance

Posted: Thu Jul 19, 2012 12:48 am
by ArndW
Could you give an example of what the parameter looks like? Perhaps you might need to add a dummy modify stage action such as dropping a non-existant column.

Posted: Thu Jul 19, 2012 12:55 am
by nani0907
Hi sir,

It's a job parameter where iam using for dropping columms and changing datatypes.For one of the run, i have my source metadata &target metadata with same layout which doesn't require that job paramater in modify stage.How to proceed in that scenario...

Posted: Thu Jul 19, 2012 1:01 am
by ArndW
Could you give an example of what the parameter looks like?

Posted: Thu Jul 19, 2012 1:10 am
by nani0907
Here is the value i passed for my first multi-instance run and complted sucessfully--- drop A_DUMMY;drop B_DUMMY; IC_ID : string [16] = IC_ID

In second multi-instance run, i not passing any thing to parameter as there are no transformation required.Pls suggest..

Posted: Thu Jul 19, 2012 1:41 am
by ArndW
Try passing "drop nothing" as the parameter.

Posted: Thu Jul 19, 2012 7:20 am
by surfsup
It's unlikely the source data will have a column called nothing, but "nowarn" also works.

Posted: Mon Jul 23, 2012 9:54 am
by BI-RMA
ArndW wrote:Try passing "drop nothing" as the parameter.
Usually if You drop a nonexisting column I would expect Datastage to throw a warning telling You that column "nothing" is not present in the input schema. To prevent this You will either have to demote this warning to informational (with the risk that you miss messages related to other columns), or add a Dummy-column to the stream that you can safely drop within the modify stage.

A modify stage with an empty specification is invalid.

Posted: Mon Jul 23, 2012 10:47 am
by ArndW
I suggested dropping a nonexistant column in the OP's modify stage as a route to solving the problem. As you noted, the warning message would need to be deprecated. But with that approach, the OP could have added a field that would get dropped in the modify, or done a "{col}={col}" where "col" is known column name that is always in the data. As you noted, the core of the problem was than an empty command is not allowed.