How to Connect Azure IoT Hub and CrateDB Cloud to Ingest IoT Sensor Data

This article will describe how to launch a CrateDB cluster on Azure, connect it to Azure IoT Hub, and test it by ingesting simulated sensor data using an Azure IoT Solution Accelerator.

Step #1: Simulating Sensor Data

It’s necessary to first understand the type of data your IoT application will produce in order to accurately mimic this information for testing purposes. Smart factories, for example, will have myriad sensors that collect data in a variety of structures. CrateDB makes it possible to model different data structures in a single table through the use of dynamic objects, which can be queried to an arbitrary depth (this is not a recommended practice for production, but is helpful within the simple confines of this demonstration).