DEV Community

Timothy Spann.   πŸ‡ΊπŸ‡¦
Timothy Spann. πŸ‡ΊπŸ‡¦

Posted on β€’ Originally published at datainmotion.dev on

3 2

Generating JSON Data in Apache NiFi

Example of a JSON IoT Generator

{

"ip": "${ip()}",
"unique_id": "${UUID()}",

"thread": "${thread()}",

"hostname": "${hostname()}",

"sensor_9": ${random():mod(100)},

"sensor_id": ${random():mod(30)},

"sensor_3": ${random():mod(50)},

"sensor_2": ${random():mod(500)},

"sensor_1": ${random():mod(110)},

"sensor_0": ${random():mod(150)},

"sensor_7": ${random():mod(255)},

"sensor_6": ${random():mod(95)},

"sensor_5": ${random():mod(80)},

"sensor_ts": ${now():toNumber()},

"sensor_8": ${random():mod(120)},

"sensor_4": ${random():mod(60)},

"sensor_11": ${random():mod(20)},

"sensor_10": ${random():mod(10)}

}

Resources

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay