Check the documentation. Grouping isn’t available as such bu you should be able to use something like fragmentTyp/fragmentValue and withTotalPages to get the number of events.
The payload is in the JSON Format. Example payload stored in DB:
{
Time: 2023-02-08 14:00:00,
Lot : 55649607,
Reason: No code,
Test_status: Rejected,
Quality : A
},
{
Time: 2023-02-08 14:15:00,
Lot : 55649607,
Reason: “”,
Test_status: Passed,
Quality : B
}
My question is how to count the number of the specific Lot Number here in the example 55649607 happend. For example the total count of lot number 556490 happend is 2.
Can I achieve this by the stream anyalytics builder similar to the groupby statement and count() function?
Can these blocks check if the lot id is already present in the DB and increment the counter to the last counted value because events of similar lot number come not subsequently.
For example, if the lot number 535 event happens at 10:00:00 am then count of 535 lot number equal to 1.
Next event could be lot number 631 event that happens at 10:01:00 am then count of 631lot number equal to 1.
Later event could be lot number 535 event happens at 10:29:00 am then count of the 535 lot number equal to 2.
Is this possible with stream analytics builder blocks?
Or simple groupby function once the events are stored in the DB.
every 1 hour
groupby by the lot number and count the number of events happend.