pgfunc Azure Function to write IoT Hub data to PostgreSQL Data should be JSON {"device": "devicename", "temperature": temp, "humidity": hum} You can use IoT Simulator to simulate sending this data. Also see this blog post