This graph models a sensor that tracks the temperature and surface illuminance of ice cream.
Metadata Generator generates sample metadata for a single sensor and passes it to Metadata Producer. Metadata Producer pushes the generated metadata to the Kafka cluster.
Measurements Generator generates sample sensor measurements and passes it to Measurements Producer. Measurements Producer pushes the generated sensor measurements to the Kafka cluster.
Metadata Consumer consumes the sample metadata, and Measurements Consumer consumes the generated sensor measurements.
Validation Rule tests the ice cream's temperature value is between -34.8°C and -24.8°C and the illuminance value is between 830 and 970 lux.
Sensor measurements that have passed the Validation Rule tests can be viewed with Pass Output.
Sensor measurements that have failed the Validation Rule tests can be viewed with Fail Output.
Detailed rule failure information can be viewed with Fail Info Output.
Any errors that may have occurred can be viewed with Error Output.
You need a running Kafka broker (version 0.9.0 or greater) and Zookeeper.
Configure and Run the Graph
To run the example from the Data Hub UI:
- Check the configuration of the Metadata Generator node: brokers and topic.
- Check the configuration of the Measurements Generator node: brokers and topic.
- Check the configuration of the Metadata Consumer node: brokers, topic (must be the same as Metadata Consumer), and kafkaVersion (>= 0.9.0).
- Check the configuration of the Measurements Consumer node: brokers, topic (must be the same as Measurements Generator), and kafkaVersion (>= 0.9.0)
- In the toolbar, select Run (play button). The Status panel indicates whether the graph is running.