{"id":38163,"date":"2023-08-12T09:58:16","date_gmt":"2023-08-12T09:58:16","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=38163"},"modified":"2023-09-22T07:34:24","modified_gmt":"2023-09-22T07:34:24","slug":"what-is-microsoft-azure-stream-analytics-and-use-cases-of-microsoft-azure-stream-analytics","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/what-is-microsoft-azure-stream-analytics-and-use-cases-of-microsoft-azure-stream-analytics\/","title":{"rendered":"What is Microsoft Azure Stream Analytics and use cases of Microsoft Azure Stream Analytics?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is Microsoft Azure Stream Analytics?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-331.png\" alt=\"\" class=\"wp-image-38165\" style=\"width:646px;height:444px\" width=\"646\" height=\"444\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-331.png 743w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-331-300x206.png 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Microsoft Azure Stream Analytics<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Azure Stream Analytics is a real-time event processing service provided by Microsoft Azure. It enables you to ingest, process, and analyze streaming data from various sources in real-time, allowing you to gain insights and take actions based on the incoming data streams.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Top 10 Use Cases of Microsoft Azure Stream Analytics:<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>IoT Data Processing:<\/strong> Ingest and process data from IoT devices, sensors, and connected devices in real-time to monitor, analyze, and respond to events.<\/li>\n\n\n\n<li><strong>Real-Time Analytics:<\/strong> Analyze streaming data to detect trends, anomalies, and patterns as they happen, enabling timely decision-making.<\/li>\n\n\n\n<li><strong>Fraud Detection:<\/strong> Monitor financial transactions, online activities, and more to identify potential fraudulent behavior in real-time.<\/li>\n\n\n\n<li><strong>Predictive Maintenance:<\/strong> Analyze sensor data from machines and equipment to predict and prevent failures, optimizing maintenance schedules.<\/li>\n\n\n\n<li><strong>Social Media Analysis:<\/strong> Analyze social media streams to understand sentiment, trends, and user engagement in real-time.<\/li>\n\n\n\n<li><strong>Log and Event Monitoring:<\/strong> Monitor logs and events from applications, servers, and network devices to detect issues and respond promptly.<\/li>\n\n\n\n<li><strong>Supply Chain Optimization:<\/strong> Track and analyze data from supply chain components to optimize inventory management and distribution.<\/li>\n\n\n\n<li><strong>Location-Based Services:<\/strong> Process location data from devices and applications to provide location-based services and insights.<\/li>\n\n\n\n<li><strong>Energy Management:<\/strong> Analyze data from energy meters, sensors, and grids to optimize energy consumption and distribution.<\/li>\n\n\n\n<li><strong>Healthcare Monitoring:<\/strong> Process real-time health data from wearable devices and medical equipment for patient monitoring and alerts.<\/li>\n<\/ol>\n\n\n\n<p>These use cases highlight the versatility of Azure Stream Analytics in various industries and scenarios. It&#8217;s particularly well-suited for scenarios that require real-time data processing, analysis, and response.<\/p>\n\n\n\n<p>Azure Stream Analytics offers a user-friendly, SQL-like language for defining queries and transformations on streaming data. It supports integration with other Azure services like Azure IoT Hub, Azure Event Hubs, Azure Functions, and more, allowing you to build end-to-end solutions that combine streaming data processing with actions and insights.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are the feature of Microsoft Azure Stream Analytics?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-334-1024x403.png\" alt=\"\" class=\"wp-image-38168\" style=\"width:750px;height:295px\" width=\"750\" height=\"295\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-334-1024x403.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-334-300x118.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-334-768x302.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-334.png 1074w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Feature of Microsoft Azure Stream Analytics<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Real-Time Data Processing:<\/strong> Azure Stream Analytics enables processing of streaming data in real-time, allowing for immediate insights and responses.<\/li>\n\n\n\n<li><strong>Scalability:<\/strong> It automatically scales up or down based on the data volume, ensuring efficient resource utilization and performance.<\/li>\n\n\n\n<li><strong>Integration:<\/strong> Seamlessly integrates with other Azure services like Azure IoT Hub, Azure Event Hubs, Azure Functions, and more.<\/li>\n\n\n\n<li><strong>Simple Query Language:<\/strong> Uses a SQL-like query language for defining queries and transformations on streaming data, making it accessible to users familiar with SQL.<\/li>\n\n\n\n<li><strong>Time Windowing:<\/strong> Supports windowing functions to analyze data within specific time intervals, allowing you to group and aggregate data effectively.<\/li>\n\n\n\n<li><strong>Output Sinks:<\/strong> Enables sending processed data to various output sinks, including Azure Storage, Azure SQL Database, Power BI, and more.<\/li>\n\n\n\n<li><strong>Built-in Functions:<\/strong> Offers built-in functions for data transformation, filtering, aggregation, and pattern matching.<\/li>\n\n\n\n<li><strong>Exactly-Once Processing:<\/strong> Provides exactly-once processing semantics, ensuring that data is not duplicated or lost during processing.<\/li>\n\n\n\n<li><strong>Monitoring and Diagnostics:<\/strong> Offers monitoring, diagnostics, and alerts to track the health and performance of your streaming jobs.<\/li>\n\n\n\n<li><strong>Temporal Join Support:<\/strong> Supports joining real-time streaming data with historical reference data for more comprehensive insights.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">How Microsoft Azure Stream Analytics Works and Architecture?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-333-1024x612.png\" alt=\"\" class=\"wp-image-38167\" style=\"width:733px;height:438px\" width=\"733\" height=\"438\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-333-1024x612.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-333-300x179.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-333-768x459.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-333-1536x918.png 1536w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-333-2048x1224.png 2048w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Microsoft Azure Stream Analytics Works and Architecture<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Azure Stream Analytics processes streaming data using a series of steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Ingestion:<\/strong> Data from various sources (e.g., IoT devices, log streams, event hubs) is ingested into Azure Stream Analytics.<\/li>\n\n\n\n<li><strong>Query Definition:<\/strong> You define queries using SQL-like language for filtering, transformation, and analysis. These queries are continuously applied to incoming data streams.<\/li>\n\n\n\n<li><strong>Processing:<\/strong> Stream Analytics processes the data as it arrives in real-time according to the defined queries. This can involve filtering, aggregation, enrichment, and more.<\/li>\n\n\n\n<li><strong>Time Windowing:<\/strong> If required, you can use time windowing to group and analyze data within specific time intervals.<\/li>\n\n\n\n<li><strong>Output Sinks:<\/strong> Processed data is sent to specified output sinks, such as Azure Storage, databases, or visualization tools like Power BI.<\/li>\n\n\n\n<li><strong>Scaling:<\/strong> Azure Stream Analytics automatically scales up or down based on the data volume and processing requirements to ensure optimal resource utilization.<\/li>\n\n\n\n<li><strong>Integration:<\/strong> It integrates with other Azure services, enabling you to trigger actions (Azure Functions) or store data (Azure Storage) based on processed results.<\/li>\n<\/ol>\n\n\n\n<p><strong>Architecture:<\/strong><br>Azure Stream Analytics uses a distributed architecture that involves multiple components:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Job Topology:<\/strong> The job topology defines the data sources, transformations, and outputs for a specific Stream Analytics job.<\/li>\n\n\n\n<li><strong>Input Adapters:<\/strong> Ingest data from various sources such as Azure Event Hubs, IoT Hub, or external sources.<\/li>\n\n\n\n<li><strong>Query Processing Engine:<\/strong> The heart of Stream Analytics, it processes data based on the queries defined in the job.<\/li>\n\n\n\n<li><strong>Output Adapters:<\/strong> Send processed data to output sinks such as Azure Storage, SQL Database, Power BI, and more.<\/li>\n\n\n\n<li><strong>Azure Monitor:<\/strong> Provides monitoring, diagnostics, and logging for Stream Analytics jobs.<\/li>\n<\/ol>\n\n\n\n<p>Azure Stream Analytics abstracts much of the underlying infrastructure complexity, allowing you to focus on defining your data processing logic and queries. It automatically handles scalability, fault tolerance, and resource management to provide a reliable and efficient streaming data processing solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Install Microsoft Azure Stream Analytics?<\/h2>\n\n\n\n<p>There are two ways to install Microsoft Azure Stream Analytics:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Using the Azure CLI:<\/strong>\n<ol class=\"wp-block-list\">\n<li>Open a command prompt and navigate to the directory where you want to install Azure Stream Analytics.<\/li>\n\n\n\n<li>Run the following command:<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">az acr create my-acr --resource-group my-resource-group --location westus2<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">* This command will create an Azure Container Registry (ACR) called <span class=\"hljs-string\">`my-acr`<\/span> <span class=\"hljs-keyword\">in<\/span> the resource group <span class=\"hljs-string\">`my-resource-group`<\/span> <span class=\"hljs-keyword\">in<\/span> the region <span class=\"hljs-string\">`westus2`<\/span>.\n<span class=\"hljs-number\">3.<\/span> Run the following command to download the Azure Stream Analytics image:<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">az acr download --name my-acr --image microsoft.streamanalytics\/streamanalytics:latest<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">* This command will download the latest version of the Azure Stream Analytics image to your local machine.\n4. Run the following command to create a Dockerfile:<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">FROM microsoft.streamanalytics\/streamanalytics:latest<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">* This Dockerfile will use the Azure Stream Analytics image <span class=\"hljs-keyword\">as<\/span> the base image.\n<span class=\"hljs-number\">5.<\/span> Add the following lines to the Dockerfile:<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">COPY my-stream-analytics.json \/opt\/streamanalytics\/config\/my-stream-analytics.json\nCMD streamanalytics controller start --config \/opt\/streamanalytics\/config\/my-stream-analytics.json<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">* These lines will copy the <span class=\"hljs-string\">`my-stream-analytics.json`<\/span> file to the container and start the Azure Stream Analytics controller.\n<span class=\"hljs-number\">6.<\/span> Build the Docker image:<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">docker build -t my-stream-analytics .<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">* This will build the Docker image called <span class=\"hljs-string\">`my-stream-analytics`<\/span>.\n<span class=\"hljs-number\">7.<\/span> Run the Docker image:<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">docker run -it --rm my-stream-analytics<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">* This will start the Azure Stream Analytics controller in a Docker container.<\/code><\/span><\/pre>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Using the Azure Portal:<\/strong>\n<ol class=\"wp-block-list\">\n<li>Go to the Azure Portal and sign in to your account.<\/li>\n\n\n\n<li>Select the <strong>Create a resource<\/strong> button.<\/li>\n\n\n\n<li>Search for <strong>Stream Analytics<\/strong> and click the <strong>Create<\/strong> button.<\/li>\n\n\n\n<li>In the <strong>Create Stream Analytics job<\/strong> blade, enter the following information:\n<ul class=\"wp-block-list\">\n<li>Name: The name of your Stream Analytics job.<\/li>\n\n\n\n<li>Location: The region where you want to create your Stream Analytics job.<\/li>\n\n\n\n<li>Subscription: The subscription that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>Resource group: The resource group that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>Compute: The compute tier for your Stream Analytics job.<\/li>\n\n\n\n<li>Storage: The storage account that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>Input: The input data source for your Stream Analytics job.<\/li>\n\n\n\n<li>Output: The output data sink for your Stream Analytics job.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click the <strong>Create<\/strong> button to create your Stream Analytics job.<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n\n\n\n<p>Once you have installed Azure Stream Analytics, you can start creating and running Stream Analytics jobs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Basic Tutorials of Microsoft Azure Stream Analytics: Getting Started<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-336.png\" alt=\"\" class=\"wp-image-38170\" style=\"width:832px;height:391px\" width=\"832\" height=\"391\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-336.png 1000w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-336-300x141.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/08\/image-336-768x361.png 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Basic Tutorials of Microsoft Azure Stream Analytics<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Here are some step-by-step basic tutorials of Microsoft Azure Stream Analytics:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Create a simple Stream Analytics job using the Azure Portal:<\/strong> This tutorial shows you how to create a simple Stream Analytics job using the Azure Portal.\n<ol class=\"wp-block-list\">\n<li>Open the Azure Portal and sign in to your account.<\/li>\n\n\n\n<li>Apply a hit on the <strong>Create a resource<\/strong> button.<\/li>\n\n\n\n<li>Search for <strong>Stream Analytics<\/strong> and click the <strong>Create<\/strong> button.<\/li>\n\n\n\n<li>In the <strong>Create Stream Analytics job<\/strong> blade, enter the following information:\n<ul class=\"wp-block-list\">\n<li>Name: The name of your Stream Analytics job.<\/li>\n\n\n\n<li>Location: The region where you want to create your Stream Analytics job.<\/li>\n\n\n\n<li>Subscription: The subscription that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>Resource group: The resource group that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>Compute: The compute tier for your Stream Analytics job.<\/li>\n\n\n\n<li>Storage: The storage account that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>Input: The input data source for your Stream Analytics job.<\/li>\n\n\n\n<li>Output: The output data sink for your Stream Analytics job.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click the <strong>Create<\/strong> button to create your Stream Analytics job.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Create a simple Stream Analytics job using the Azure CLI:<\/strong> This tutorial shows you how to create a simple Stream Analytics job using the Azure CLI.\n<ol class=\"wp-block-list\">\n<li>Open a command prompt and navigate to the directory where you want to create your Stream Analytics job.<\/li>\n\n\n\n<li>Run the following command to create a Stream Analytics job:<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n\n\n\n<p>az streamanalytics job create my-job &#8211;location westus2 &#8211;resource-group my-resource-group &#8211;compute standard &#8211;storage my-storage-account &#8211;input my-input &#8211;output my-output<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">* This command will create a Stream Analytics job called <span class=\"hljs-string\">`my-job`<\/span> <span class=\"hljs-keyword\">in<\/span> the resource group <span class=\"hljs-string\">`my-resource-group`<\/span> <span class=\"hljs-keyword\">in<\/span> the region <span class=\"hljs-string\">`westus2`<\/span>. The job will use the standard compute tier, the storage account <span class=\"hljs-string\">`my-storage-account`<\/span>, the input <span class=\"hljs-string\">`my-input`<\/span>, and the output <span class=\"hljs-string\">`my-output`<\/span>.<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Create a simple Stream Analytics job using Visual Studio:<\/strong> This tutorial shows you how to create a simple Stream Analytics job using Visual Studio.\n<ol class=\"wp-block-list\">\n<li>Go to Visual Studio and generate a new project.<\/li>\n\n\n\n<li>Select the <strong>Azure Stream Analytics Job<\/strong> project template.<\/li>\n\n\n\n<li>In the <strong>Project name<\/strong> field, enter the name of your Stream Analytics job.<\/li>\n\n\n\n<li>In the <strong>Subscription<\/strong> field, select the subscription that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>In the <strong>Resource group<\/strong> field, select the resource group that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>In the <strong>Location<\/strong> field, select the region where you want to create your Stream Analytics job.<\/li>\n\n\n\n<li>In the <strong>Compute<\/strong> field, select the compute tier for your Stream Analytics job.<\/li>\n\n\n\n<li>In the <strong>Storage<\/strong> field, select the storage account that you want to use for your Stream Analytics job.<\/li>\n\n\n\n<li>In the <strong>Input<\/strong> field, select the input data source for your Stream Analytics job.<\/li>\n\n\n\n<li>In the <strong>Output<\/strong> field, select the output data sink for your Stream Analytics job.<\/li>\n\n\n\n<li>Click the <strong>Create<\/strong> button to create your Stream Analytics job.<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n\n\n\n<p>Once you have created a Stream Analytics job, you can start writing Stream Analytics queries.<\/p>\n\n\n\n<p>Here is an example of a simple Stream Analytics query:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">from<\/span> my-input\nselect count(*) <span class=\"hljs-keyword\">as<\/span> total_events<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This query will count the number of events in the input stream and output the count to the output sink.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Microsoft Azure Stream Analytics? Azure Stream Analytics is a real-time event processing service provided by Microsoft Azure. It enables you to ingest, process, and analyze streaming data from various sources in real-time, allowing you to gain insights and take actions based on the incoming data streams. Top 10 Use Cases of Microsoft Azure&#8230;<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[7853],"tags":[],"class_list":["post-38163","post","type-post","status-publish","format-standard","hentry","category-azure"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/38163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=38163"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/38163\/revisions"}],"predecessor-version":[{"id":38171,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/38163\/revisions\/38171"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=38163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=38163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=38163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}