Azure Stream Analytics How to handle multiple output table?

Viewed 2579

I have created one ASA job and also created one input alias and one output alias
like this

and I edited query section like this

WITH 
[StreamData]
AS (
SELECT
    employee_id, 
    first_name,
    last_name,
    age,
    salary
FROM 
  [DeviceDataStream] 
WHERE
    [ObjectType] IS NULL -- Filter out device info and command responses
) 

SELECT
    employee_id, 
    first_name,
    last_name,
    age,
    salary
INTO
    [Telemetry]
FROM
    [StreamData]

I have created table in SQL database
like this

and my input from IOT device is like this

{"employee_id":4,"first_name":"Joseph","last_name":"Marshal","age":34,"salary":890000}

up to this all things are working fine.

now I want to store my input JSON to different tables based on type and my new input JSON will be like this

{"type":"emp","employee_id":4,"first_name":"Joseph","last_name":"Marshal","age":34,"salary":890000}

different fields will be there with different types and as per that I want to store data in different table, so what changes I need and where please guide me for that. thanks

1 Answers
Related