Page 1 of 1

Loading only values of a particular attribute value

Posted: Wed Jun 29, 2005 11:42 pm
by aditya
All,

I have a job which works like this

SequentialFile --> Transformer --> HashFile

I have some attributes in the seq. file and I want to do a select on those attributes where attribute_value = 'XXXX'. I tried specifiying this condition as a constraint in the transformer where mention attribute_value='xxx' but the hashfiles continues to be populated with all the data from the sequential file.

Could some on help me on this

Thnx.

Aditya.

Posted: Thu Jun 30, 2005 12:12 am
by ArndW
aditya,

the method you described is the normal way of filtering data. Perhaps you have a syntax error or similar error in your constraint. Most likely your "attribute_value" is specified incorrectly, you can check that and perhaps post your exact constraint to this thread.

-Arnd.

Posted: Thu Jun 30, 2005 1:01 am
by ray.wurlod
That suggests that every row in the sequential file satisfies your condition, or that you have mistyped the constraint expression.

Can you check the latter?

Use the Debugger to step through a row at a time, inspecting (watching) the values of the attribute(s) as you step through. Set a breakpoint to pause when the condition is not met.

Posted: Thu Jun 30, 2005 2:43 am
by Sainath.Srinivasan
Did you clear the hash file before load?

Posted: Thu Jun 30, 2005 4:18 am
by Sreenivasulu
I faced this issue once. What i did was that i assigned the logic to the particular column instead of putting it as a stage vairable/constraint. It worked...