Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: jmaHi,
I'm quite new to Lavastorm but catching up quickly. However, I didn't find a solution to this from help or browsing the forum.
I have a data set of customers with different characteristics and I want to create a sample customer set which includes 1-n random customers from each category or characteristic.
I tried this with Agg Ex and random() but hit the problem that when the Group starts (firstInGroup), I don't have the full count of rows in the group. If I understood right, groupCount increases with every iteration and doesn't give the final count until lastInGroup is reached.
So how I can emit 1-n random rows from each group?
Also:
emit *
where groupCount == x
gives an error, I wonder why?
I'm using version 4.6, trying to upgrade in the next few days. Many thanks for your help!