Test your Azure Stream Analytics query in 3 ways
Published Sep 10 2020 04:22 PM 3,676 Views
Microsoft

Azure Stream Analytics service makes it easy to ingest, process, and analyze streaming data from an events source (Event Hub/IoT Hub/Blob Storage), enabling powerful insights to drive real-time actions. But before you publish your Stream Analytics query to cloud to run 24x7, do you know you can test your query 3 different ways?

 

Benefits of testing the query

Here are the key benefits of testing your query:

  • Development productivity: Fast iteration to test and fix the query in a single box environment
  • Test before deploying: You can test the query logic with live data or local data without deploying to the cloud
  • Query behavior consistency: For live input, the queries will output the same results
  • Fast results: You can view query results in < 4seconds
  • Free: Test your query for free

 

Here are 3 ways you can test your query

  1. Azure Portal 2. VS Code  3. Visual Studio
Platform type Web client Editor IDE
Query execution Test runs in the cloud without charge

Test runs on your machine

Test runs on your machine

Test scenario 1

Local data (JSON/CSV)

  • You can test your Stream Analytics query by using a local file.
Yes Yes Yes

Test scenario 2

Sample data

  • You can test your Stream Analytics query against snapshot/sample of live stream input.

Yes

(Event Hub, IoT Hub, Blob Storage)

 

SQL reference data supported

No No

Test scenario 3

Live data

  • You can test your Stream Analytics query against live stream input.
No

Yes

(Event Hub, IoT Hub, Blob Storage)

 

Blob/SQL reference data supported

Yes

(Event Hub, IoT Hub, Blob Storage)

 

Blob/SQL reference data supported

Job diagram availability while testing the query

No

Yes

You can view the data & metrics of each query step in each intermediate result set to find the source of an issue.

 

Yes

You can view the data & metrics of each query step in each intermediate result set to find the source of an issue.

Documentation

Local data

Sample data

Job diagram

Local data

Live data

Job diagram

Local data

Live data

Job diagram

Limitations

 

No support for Event ordering in testing.

 

C# UDFs and deserializers not supported.


Local input size <2 MB for testing.

 

Queries with <1 min execution time are supported for testing.

Support for Event ordering.

 

C# UDFs and deserializers  support expected by end of year.

Support for Event ordering

 

C# UDFs and deserializers are supported.

 

 

1. Azure Portal

Test your query in Azure portal by using a local file or sample of live dataTest your query in Azure portal by using a local file or sample of live data

 

2. VS Code

Test your query in VS Code by using a local file or live dataTest your query in VS Code by using a local file or live data

 

Use Job Diagram to see intermediate resultsUse Job Diagram to see intermediate results

 

3. Visual Studio

Test your query in VS Code by using a local file or live dataTest your query in VS Code by using a local file or live data

 

Query testing should only be used for functional testing purposes. It does not replace the performance and scalability tests you would perform in the cloud. This testing feature should not be used for production purposes since running in a local environment doesn’t guarantee any service SLA.

 

Feedback and engagement

Engage with us and get early glimpses of new features by following us on Twitter at @AzureStreaming.

The Azure Stream Analytics team is highly committed to listening to your feedback and letting the user's voice influence our future investments. We welcome you to join the conversation and make your voice heard via our UserVoice page

Version history
Last update:
‎Sep 10 2020 04:23 PM
Updated by: