nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo Mota Fontes (Jira)" <j...@apache.org>
Subject [jira] [Updated] (NIFI-6293) MongoDB Aggregation does not parse dates
Date Fri, 21 Feb 2020 16:39:00 GMT

     [ https://issues.apache.org/jira/browse/NIFI-6293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Eduardo Mota Fontes updated NIFI-6293:
--------------------------------------
    Affects Version/s: 1.12.0

> MongoDB Aggregation does not parse dates
> ----------------------------------------
>
>                 Key: NIFI-6293
>                 URL: https://issues.apache.org/jira/browse/NIFI-6293
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 1.12.0
>         Environment: Ubuntu 16.04, MongoDB 4.0.3, TLS to MongoDB.
>            Reporter: Emil Sarkissian
>            Assignee: Eduardo Mota Fontes
>            Priority: Major
>              Labels: easyfix, newbie
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> *Repro Steps*:
>  # Create a "Generate Flow File" Processor to kick off things
>  # Connect that to a Nifi MongoDB Aggregation Processor
>  # Set the query to a $match with date criteria, for example:
> {code:java}
> [ { "$match": { "someDate": { "$gt": "2019-01-01T00:00:00Z" } } } ]{code}
>  
> *Expected Result*: Query returns correct documents per the date criteria.
> *Actual Result*: Condition always evaluates to false and no documents are returned.
> *Notes:*
>  # I have tried every possible way to make this work, including \{ "$date": "2019-01-01T00:00:00Z"
} and also using "$expr" with Mongo, as well as "$dateFromString", and "$convert".
>  # Using an "$expr" seems to work functionally but refuses to use any indexes - probably
a MongoDB issue (4.0.3 is what I run) and introduces unnecessary complexity.
> I have fixed this for our fork, as we need to go to Production soon, but I am new to
the contribution process and didn't want to just put a feature branch without explaining the
issue.
> The fix is to provide a Jackson custom deserializer to handle dates based on what Date
Format is specified on the processor.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message