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
Sign in to the Azure portal.
Locate your existing Stream Analytics job and select it.
On the Stream Analytics job page, under the Job Topology heading, select Query to open the Query editor window.
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.
After the upload is complete, select Test to test this query against the sample data you have provided.
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.
Iteratively modify your query and test it again to see how the output changes.
When you use multiple outputs in a query, the results are shown on separate tabs, and you can easily toggle between them.
After you verify the results shown in the browser, Save your query. Then Start the job, and let it process the incoming events.