Azure Stream Analytics is a managed platform for continuous event processing. Its fundamental deployment unit is a job, which contains input definitions, a SQL-based query, and output definitions. A job can filter telemetry, normalize event structures, calculate rolling metrics, correlate streams, and send different results to multiple destinations. It is intended for processing data in motion rather than replacing a persistent database or an interactive analytics engine.
Common streaming inputs include Azure Event Hubs and Azure IoT Hub. Azure Storage can also supply input data, while Azure Blob Storage and Azure SQL Database support static or slowly changing reference datasets. For example, a job can join device readings with an equipment inventory to attach site identifiers and operating thresholds before calculating alerts. Built-in input formats include JSON, CSV, and Avro. Event Hubs inputs can retrieve Avro schemas from Azure Schema Registry, avoiding the need to embed complete schemas in every event.
The query language extends familiar SQL concepts with temporal operations. Tumbling, hopping, sliding, and session windows support different aggregation requirements, while time-bounded joins correlate related events across streams. Use TIMESTAMP BY when processing should follow a timestamp carried in the event rather than its arrival time. Configure late-arrival and out-of-order policies deliberately: accepting more delayed data can improve completeness but also delay results. Geospatial functions, anomaly-detection functions, and JavaScript extensions address more specialized processing requirements.
Capacity is allocated using streaming units. Throughput depends on event size, query complexity, state size, partitioning, and destination performance, not simply the number of events received. Align input partitions and query partitioning where possible, and load-test representative traffic before selecting capacity. Monitor streaming-unit utilization, watermark delay, backlogged input events, and input or output errors. An overloaded destination can create processing delays even when the query has sufficient compute capacity.
The service checkpoints processing state and can replay source events during recovery. Configure source retention to cover the longest stateful query window plus operational recovery margin. Exactly-once processing does not imply exactly-once delivery to every destination; delivery guarantees depend on the output connector and configuration. Where duplicates are possible, design downstream writes or consumers to tolerate replay.
Deploy jobs through infrastructure-as-code tools and test queries with representative sample events before releasing changes. Prefer managed identities where supported, and configure permissions separately for each input and output. New implementations should not use the retiring Power BI output connector: new customers have been blocked from creating jobs using it since October 31, 2024, and existing jobs using it are scheduled to stop on October 31, 2027. The retired .NET Standard user-defined functions and custom .NET deserializers should be replaced with supported alternatives such as JavaScript functions and built-in input formats.