0
votes

I am using Stream Analytics of Azure to create real-time dashboards. To feed the Stream Analytic job I have one event hub as input.

The question is; I have three different kinds of events (interaction events, session events, user events) each one with different data and structure. I have to combine them in the query part of the Stream Analytic and I want to do it with one event hub. By now I send all the events to the event hub but I have not found a way to distinguish one kind of event from another in order to work with them properly.

I read about "consumer groups of event hub but I do not know how to use them to handle the different kinds of events with different "consumer groups" and if I can use it in a Stream Analytic job.

1
Consumer groups won't help if you can't distinguish one kind of event from another. You should include a property to the data sent to the event hub or have another way to make the distinction. How do your events look like? - Peter Bons
The events are in JSON format and they have different fields I thought that I could distinguish them by the fields, couldn't I?. How could I distinguish them? And how could add the code to the event hub to distinguish among them? - Francisco Aparicio
If they have different fields then you should indeed be able to distinguish them. Can you show the query you have so far so we have a little more to work on? At the moment it is not clear to me what this means: I have to combine them in the query part of the Stream Analytic - Peter Bons
Hi, if each type of events has a different structure, you can indeed distinguish them in the query (e.g. having a WHERE clause looking if the field is NULL or not). Let me know if you need any help for the query. - Jean-Sébastien
I did it, I can distinguish between them, the query; WITH CXUSER AS (SELECT * FROM "DemoDashboard" WHERE ClrType IS NOT NULL), CXSESSION AS (SELECT * FROM "DemoDashboard" WHERE UserAgent IS NOT NULL), CXINTERACTION AS (SELECT * FROM "DemoDashboard" WHERE EventType IS NOT NULL) select * FROM CXINTERACTION LEFT JOIN CXSESSION ON (CXINTERACTION.SessionId = CXSESSION.Id and DATEDIFF(minute, CXSESSION, CXINTERACTION) BETWEEN 0 and 10) - Francisco Aparicio

1 Answers

0
votes

Thank you for your answers.

At the end the event hub it was not the one that cannot handle different kinds of events. The one that cannot handle different kinds of events is the Azure Stream Analytics job (ASA job).

Here is the answer that I obtained from Microsoft support:

  1. An event hub has no visibility to the Events schema, think of it like a black box based on queue system – > event in = event out.
  2. The ASA job is the one that cannot handle different kinds of events because it is referring to event based on the column name and not column number.