Aggregate (like count) on non-sql data (like created example set)

Ziggizag
Ziggizag New Altair Community Member
edited November 2024 in Community Q&A
Hi,

Is there a way to aggregate without SQL?

Let's say I have a huge MySQL data set, and I map some values to arbitrary "categories" through a join with a "created example set". For example, I assign a value "high", to records where "offer_id" was 1,3,5 or 7, and I assign a value "low" to records where "offer_id" was 2, 4 or 6. Presume I do not want to load the mapping "offer_id" --> "category" into a database at the moment, but I like having it in a handy "created example set".

I have noticed, rather unfortunately, that "category" argument (which is set on "example data set" by the "set meta data" operator) is not visible to "aggregate" operator, so I see no easy way to count "high" and "low" records after join.

The question is: how to aggregate by attributes coming from such an "example data set"?

Here you are my process:

Tagged:

Answers

  • YYH
    YYH
    Altair Employee
    There are at least two methods. You can join the mapping table to the big table. Or replace the offer id with dictionary. Then use aggregate operator.
    I replace the id in golf data, here is the sample process that you can import into your own RM studio.