Azure SQL Edge: SQL Server for IoT

On this page

Azure SQL Edge is a small-footprint container (less than 500MB) optimized for IoT edge gateways. It runs SQL Server engine on ARM64 devices (like Raspberry Pi or Jetson Nano) and includes streaming capabilities.

Architecture

flowchart LR
    Sensor -->|MQTT| EdgeHub[IoT Edge Hub]
    EdgeHub -->|JSON| SQLEdge[SQL Edge Container]
    SQLEdge -->|Filter/Agg| Cloud[Azure SQL / Blob]
    
    style SQLEdge fill:#E1F5FE,stroke:#0277BD

Streaming T-SQL

You can create a `STREAM` object in T-SQL to process incoming data windows.

SQL14 lines
CREATE STREAM TempSensorData (
    SensorId nvarchar(10),
    Temperature float,
    EventTime datetime2
);

-- Streaming aggregation (Tumbling Window)
SELECT 
    SensorId,
    AVG(Temperature) as AvgTemp,
    System.Timestamp() as WindowEnd
INTO AvgTemps
FROM TempSensorData
GROUP BY SensorId, TumblingWindow(second, 10);

Key Takeaways

  • Runs on ARM64 and x64 Docker.
  • Supports time-series data handling natively.
  • Syncs data to Azure when connectivity is restored (Data Sync).

Discover more from C4: Container, Code, Cloud & Context

Subscribe to get the latest posts sent to your email.

Written by

Nithin Mohan TK

Hello Namaste! 👋🏻 I'm an accomplished Enterprise Solution Architect & Engineering Leader with 20+ years of progressive experience architecting, building, and scaling transformative enterprise solutions. ⚜️ Solution Architect / AI & Cloud 📌 Galway, Ireland

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.