Test a Stream Analytics query with sample data

By using Azure Stream Analytics, you can upload sample data and test queries in the Azure portal without starting or stopping a job.

Upload sample data and test the query

  1. Sign in to the Azure portal.

  2. Locate your existing Stream Analytics job and select it.

  3. On the Stream Analytics job page, under the Job Topology heading, select Query to open the Query editor window.

  4. To test your query with sample input data, right-click on any of your inputs. Then select Upload sample data from file.

    The data must be JSON formatted data only. If your data is in a different format such as CSV, you should convert it to JSON before uploading. You can use any opensource conversion tool such as CSV to JSON convertor to convert your data to JSON.

    stream analytics query editor test query

  5. After the upload is complete, select Test to test this query against the sample data you have provided.

    stream analytics query editor test sample data

  6. If you need the test output for later use, the output of your query is displayed in the browser with a link to the download results.

  7. Iteratively modify your query and test it again to see how the output changes.

    Stream Analytics query editor sample output

    When you use multiple outputs in a query, the results are shown on separate tabs, and you can easily toggle between them.

  8. After you verify the results shown in the browser, Save your query. Then Start the job, and let it process the incoming events.

Next steps