Page 1 of 1

passing a hard coded filter condition for a job parameter

Posted: Mon Apr 23, 2012 6:48 pm
by cparru
Hi,

I am passing a hard coded filter condition to the job parameter and there by using it as a constraint in the transformer stage. but it is giving an error saying missing =..

the actual condition is

linkname.columnname=2 AND (linkname.columnname=\'A\'OR linkname.columnname=\'M\')

even the simple linkname.columnname=2 is also not working throwing the same error.

Any help!

Thanks,

Posted: Mon Apr 23, 2012 6:53 pm
by qt_ky
The parameter can hold a value like A or M but not so much code, I don't believe, because the Transformer code must be compiled before the job is run (before the parameter is resolved).

Posted: Mon Apr 23, 2012 7:35 pm
by vmcburney
The Transformer stage will never accept a column name from a job parameter. You can only pass in Values and Constants, not column names. The easiest way to pass in an entire constraint including the column name is to use the Filter Stage. Some of the specialised parallel stages such as Filter and Modify can use run time column names. With the filter stage your entire Where Clause can be a job parameter.