Success using value.converter=org.apache.kafka.connect.json.JsonConverter
use Sensors
switched to db Sensors
show collections
sink
db.sink.find();
{ “_id” : ObjectId(“604c54c6868c0042fcc9da14”), “81-0-17” : NumberLong(808) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da15”), “81-1-18” : NumberLong(0) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da16”), “81-0-17” : NumberLong(1043) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da17”), “81-1-18” : 1056.89 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da18”), “81-0-17” : NumberLong(1048) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da19”), “81-1-18” : 1056.9 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da1a”), “81-0-17” : NumberLong(1066) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da1b”), “81-1-18” : 1056.91 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da1c”), “81-0-17” : NumberLong(1024) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da1d”), “81-1-18” : 1056.93 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da1e”), “81-0-17” : NumberLong(1003) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da1f”), “81-1-18” : 1056.94 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da20”), “81-0-17” : NumberLong(1020) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da21”), “81-1-18” : 1056.95 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da22”), “81-0-17” : NumberLong(936) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da23”), “81-1-18” : 1056.96 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da24”), “81-0-17” : NumberLong(914) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da25”), “81-1-18” : 1056.97 }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da26”), “81-0-17” : NumberLong(1065) }
{ “_id” : ObjectId(“604c54c6868c0042fcc9da27”), “81-1-18” : 1056.98 }
Now I have this working I can make schema design decisions about how I store the data. The key is inherently storing a lot of information - “-”<“metric number”>-<“metric reading type e.g watts, or temp in celcius, humidity in % etc”>. The metric reading type is held in a schema store defined by webthings.io so I could keep a copy as a lookup, but I would have to do it every time … not so easy if trying to use a simple visualisation app … this is this the whole database debate I guess…I think I’m leaning toward being readable … its not as if its someones name which can change and duplicates seem to be ok or worried about saving bytes on disk … a temperature reading for that date and time will always be that temperature reading for that moment in time …
Anyway I like your idea of transformations - it makes sense, so I’ll be researching that more…
Speaking of time - how do I get the reading date/time stamp into the document - just occurred to me - its not in the values -next problem to solve… anyway I’ll close this - thankyou for your help Robert