Page 1 of 1

Where Clause of Filter stage

Posted: Tue Dec 22, 2009 2:02 am
by DS_FocusGroup
Hi all

Someone can help me out as i want to apply filter stage condition which can check for length of a column and based on it data could be transferred to different output streams.where condition currently used is

length(col_name) = 2

but i am getting below error

filter_countryname: Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".
Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".

Regards,

Posted: Tue Dec 22, 2009 2:45 am
by pxraja
hi,

try without brackets,
length col_name =2

or else
try to handle it in source query itself.

Re: Where Clause of Filter stage

Posted: Tue Dec 22, 2009 3:31 am
by DS_FocusGroup
Its giving same sort of error.Filter where is like a constraint so i am wondering there should be a way to handle length function ......





DS_FocusGroup wrote:Hi all

Someone can help me out as i want to apply filter stage condition which can check for length of a column and based on it data could be transferred to different output streams.where condition currently used is

length(col_name) = 2

but i am getting below error

filter_countryname: Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".
Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".

Regards,

Posted: Tue Dec 22, 2009 4:04 am
by ray.wurlod
SQL functions are not permitted in the WHERE clause of a Filter stage. Refer to the Parallel Job Developer's Guide for full information about what is permitted.

Posted: Tue Dec 22, 2009 5:03 am
by dxk9
You can probably calculate the length and store it in a different field in the transformer (prior to the filter) and then use that field in the filter condition.

Regards,
Divya