locked
different kind of events handled by one event hub RRS feed

  • Question

  • Hello,

    I am using Stream Analytics to create <g class="gr_ gr_31 gr-alert gr_gramm gr_hide gr_inline_cards gr_run_anim Grammar multiReplace replaceWithoutSep replaceWithoutSep" data-gr-id="31" id="31">a real-time dashboards</g>. To feed the Stream Analytic job I have one event hub as input

    The question is that 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 job 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. In <g class="gr_ gr_30 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="30" id="30">fact</g> I only obtain one kind of event.

    I read about "consumer groups<g class="gr_ gr_15 gr-alert gr_gramm gr_inline_cards gr_run_anim Style replaceWithoutSep" data-gr-id="15" id="15">"of</g> event hub but I do not know how to use them to handle the different kinds of events with different "consumer groups<g class="gr_ gr_16 gr-alert gr_gramm gr_inline_cards gr_run_anim Style replaceWithoutSep" data-gr-id="16" id="16">"and</g> if I can use it in a Stream Analytic job.

    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.

    Friday, February 9, 2018 4:09 PM

Answers

  • 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).

    For each of this case, you can have a different behavior and output.

    Let me know if you need any help for the query.

    Thanks,

    JS

    Monday, February 12, 2018 9:06 PM

All replies

  • 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).

    For each of this case, you can have a different behavior and output.

    Let me know if you need any help for the query.

    Thanks,

    JS

    Monday, February 12, 2018 9:06 PM
  • Hello, I did it thank you!

    This is how I did it:

    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)

    Wednesday, February 14, 2018 8:42 AM