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.
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.