If the end goal is to put that into Mongo, I would strongly recommend using PutMongoRecord and use the record API's capabilities to insert a timestamp instead of messing with Mongo Extended JSON (your $date issue from what I can tell). You would set the date field's data type to be a long with, I think timestamp-millis, as the logicalType (all of the syntax is documented on the Avro site) and then set up the timestamp parser field in the JSON reader to have the Java date format syntax for an ISO 8601 string.
On Fri, Oct 26, 2018 at 6:58 AM ttzhang <[email protected]> wrote: > Ronnie Dove, > i have a problem of ISODate to mongodb, i use JoltTransformJson processor > convert{"time":"2018-10-26","count":11} to > {"time":{"date":"2018-10-26"},"count":11},but i need a json structure is > {"time":{"$date":"2018-10-26"},"count":11},Do you know how I should fix > this > or any other method I should try? Any advice is appreciated. > > > > -- > Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/ >
