[
https://issues.apache.org/jira/browse/NIFI-5495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16593733#comment-16593733
]
ASF GitHub Bot commented on NIFI-5495:
--------------------------------------
Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2969#discussion_r212992888
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/AbstractMongoProcessor.java
---
@@ -173,6 +175,29 @@
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.build();
--- End diff --
Because extended is the raw output from Mongo's driver and doesn't return a
Data object or a String. It looks like this:
```
{
"date_field": {
"$date": 1234567890L
}
```
We don't mess with extended JSON because it's a safe assumption that if the
user wants that version they want the raw output for its Mongisms.
> Allow configuration of DateFormat for Mongo Processors
> ------------------------------------------------------
>
> Key: NIFI-5495
> URL: https://issues.apache.org/jira/browse/NIFI-5495
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.7.1
> Environment: CentOS 7.5, Java 1.8.0 u172
> Reporter: Ryan Hendrickson
> Assignee: Mike Thomsen
> Priority: Blocker
>
> When using the GetMongo, configured with JSON Type of "Standard JSON", it
> truncates dates with milliseconds.
>
> I've got a document in Mongo that 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)