Transform and store data to Azure SQL database using the Stream Analytics no code editor

This article describes how you can use the no code editor to easily create a Stream Analytics job. It continuously reads from your Event Hubs, transform the incoming data, and then writes the results continuously to Azure SQL database.


  • Your Azure Event Hubs and Azure SQL database resources must be publicly accessible and not be behind a firewall or secured in an Azure Virtual Network
  • The data in your Event Hubs must be serialized in either JSON, CSV, or Avro format.

Develop a Stream Analytics job to transform event hub data and store to SQL database

  1. In the Azure portal, locate and select the Azure Event Hubs instance.

  2. Select Features > Process Data and then select Start on the Transform and store data to SQL database card.

    Screenshot showing the Filter and ingest to ADLS Gen2 card where you select Start.

  3. Enter a name for the Stream Analytics job, then select Create.

    Screenshot showing where to enter a job name.

  4. Specify the Serialization type of your data in the Event Hubs window and the Authentication method that the job will use to connect to the Event Hubs. Then select Connect.
    Screenshot showing the Event Hubs connection configuration.

  5. When the connection is established successfully and you have data streams flowing into your Event Hubs instance, you'll immediately see two things:

    • Fields that are present in the input data. You can choose Add field or select the three dot symbol next to a field to remove, rename, or change its type.
      Screenshot showing the Event Hubs field list where you can remove, rename, or change the field type.
    • A live sample of incoming data in the Data preview table under the diagram view. It automatically refreshes periodically. You can select Pause streaming preview to see a static view of the sample input data.
      Screenshot showing sample data under Data Preview.
  6. Select the Group by tile to aggregate the data. In the Group by configuration panel, You can specify the field that you want to Group By along with the Time window. Then you can validate the results of the step in the Data preview section.

    Screenshot that shows the group by operator configuration.

  7. Select the Manage tile. In the Manage fields configuration panel, choose the fields you want to output. If you want to add all the fields, click Add all fields.

    Screenshot that shows the manage field operator configuration.

  8. Select SQL tile. In the SQL Database configuration panel, fill in needed parameters and connect.


    The schema of the table you choose to write must exactly match the number of fields and their types that your data preview generates.

    Screenshot that shows the sql database output configuration.

  9. Optionally, select Get static preview/Refresh static preview to see the data preview that will be ingested in event hub.
    Screenshot showing the Get static preview/Refresh static preview option.

  10. Select Save and then select Start the Stream Analytics job.
    Screenshot showing the Save and Start options.

  11. To start the job, specify:

    • The number of Streaming Units (SUs) the job runs with. SUs represents the amount of compute and memory allocated to the job. We recommended that you start with three and then adjust as needed.
    • Output data error handling – It allows you to specify the behavior you want when a job’s output to your destination fails due to data errors. By default, your job retries until the write operation succeeds. You can also choose to drop such output events.
      Screenshot showing the Start Stream Analytics job options where you can change the output time, set the number of streaming units, and select the Output data error handling options.
  12. After you select Start, the job starts running within two minutes and the metrics will be open in tab section below.

    Screenshot that shows the job metrics after it is started.

    You can also see the job under the Process Data section on the Stream Analytics jobs tab. Select Open metrics to monitor it or stop and restart it, as needed.

    Screenshot of the Stream Analytics jobs tab where you view the running jobs status.

Next steps

Learn more about Azure Stream Analytics and how to monitor the job you've created.