nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Thomsen <mikerthom...@gmail.com>
Subject Re: GetMongo Truncates Dates
Date Tue, 07 Aug 2018 17:47:15 GMT
I just checked the code, and it's using the default Jackson mapping
behavior for that. The Mongo driver returns a Date, and looks like Jackson
is just turning that into an ISO8601 string without that level of
precision. A custom mapper for Date objects should be able to solve that.
I'll work it when I get some free time from the daily grind.

Thanks,

Mike

On Tue, Aug 7, 2018 at 12:55 PM Ryan Hendrickson <
ryan.andrew.hendrickson@gmail.com> wrote:

> Hi all,
>    I'm using GetMongo configured with JSON Type of "Standard JSON".  The
> document I've got in Mongo has a date field that looks like the following:
> {
>    ...
>    "date" : ISODate("2018-08-06T16:20:10.912Z"
>    ...
> }
>
>    When GetMongo spits it out, the date comes out as:
> "2018-08-06T16:20:10Z", noticeably missing the milliseconds.
>
>    I've created a bug ticket here:
> https://issues.apache.org/jira/browse/NIFI-5495.
>
>    I'm not sure if there's a work around or anything like that.  If anyone
> else has suggestions to either add back the missing milliseconds, even if
> it's just tagging on ".000" to get the format back, I'm all ears.
>
> Thanks,
> Ryan
>

Mime
View raw message