Michael Moore 2012-03-19, 19:55
-Re: Once more...
Jacob Perkins 2012-03-19, 20:03
Why not just:
D = foreach (join C by datapoint2, B by datapoint1) generate
Does that get you what you need?
On Mon, 2012-03-19 at 15:55 -0400, Michael Moore wrote:
> Really sorry folks. Hotmail stinks. In case this doesn't come through, I put it in a PasteBin: http://pastebin.com/fKxRvCpQ
> Hi All,
> I have a statement like this:
> -- A is omitted, loads data
> B = FOREACH A GENERATE FLATTEN(data1.b.v) as dataPoint1, FLATTEN(data2.b.v) as dataPoint2;
> C = FILTER B BY dataPoint1 == 'sampleDataPoint';
> I'd like to generate a new filter based on the results of C. For instance, I'd like to do something like this:
> D = FILTER B BY datapoint1 == C.dataPoint2;
> (This would look for all rows in B where dataPoint1 is the same as the matching dataPoint2 to 'sampleDataPoint'.)
> For example: (format: dataPoint1,datapoint2)
> B would return:
> If sampleDataPoint =2, C would return
> I'd like D to return:
> Is there a clever way to do this that I'm missing? Thanks!