For some reason, I am unable to filter inside my nested foreach. The basic
outline of my script is as follows:
1. Load input 1.
2. Load input 2.
3. Join input1 by key1, input2 by key2;
4. foreach joined generate fields + additional field named udf-field (apply
evalfunc udf to generate additional field);
5. group on (key2, key3, key4, key5)
6. FOREACH grouped {
FILTER relation BY udf-field == value
FILTER relation BY udf-field == value2
FILTER relation BY udf-field == value3
FILTER relation BY udf-field == value4
Generate counts of each filtered relation;
}
--
When I try to use the alias relation to reference my original relation
(before the grouping in #5) I get a parsing error for an Invalid alias.
What's the correct alias to use or can I not filter inside foreach?
--
Zaki Rahaman