<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: NiFi Processor: Save ISO format date into mongoDb using PutMongo Processor in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/368848#M240288</link>
    <description>&lt;P&gt;Put Mongo is throwing an error while using this&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;***PutMongo[id=e57c5334-b5a8-1c6c-0840-73050fa4acd5] Failed to insert FlowFile[filename=a2268e35-1e97-4f75-b58c-f33396290666] into MongoDB due to Failed to parse string as a date: org.bson.json.JsonParseException: Failed to parse string as a date&amp;nbsp;&lt;BR /&gt;Caused by: java.time.format.DateTimeParseException: Text '2023-04-18 13:07:38.000+0000' could not be parsed at index 10****&lt;BR /&gt;&lt;BR /&gt;Is there a way to use jolt and putMongo to store the iso date in mongo db&amp;nbsp;&lt;BR /&gt;pls help&lt;BR /&gt;thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 06:39:57 GMT</pubDate>
    <dc:creator>ramMuka</dc:creator>
    <dc:date>2023-04-19T06:39:57Z</dc:date>
    <item>
      <title>NiFi Processor: Save ISO format date into mongoDb using PutMongo Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/301933#M220926</link>
      <description>&lt;P class="p1"&gt;I am trying to insert a flow file into MongoDb which has a &lt;STRONG&gt;createdAt&lt;/STRONG&gt; date key record as an attribute.&lt;/P&gt;&lt;P class="p1"&gt;When I inserted that flow file into MongoDb using PutMongo processor, it saves the "&lt;STRONG&gt;createdAt&lt;/STRONG&gt;" attribute as a string. I want this to be saved as an ISO date object in mongoDB.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class="p1"&gt;When I inserted flow file by sending "2020-08-26T04:00:00.000Z" PutMongo&amp;nbsp;Processor inserts as a string.&lt;/P&gt;&lt;P class="p1"&gt;When I sent like this “ISODate("2020-08-26T04:00:00.000Z”)” it also inserts same string as it is into mongo.&lt;/P&gt;&lt;P class="p1"&gt;When I tried like this ISODate("2020-08-26T04:00:00.000Z”) without&amp;nbsp;double quotation it throws error&lt;STRONG&gt; invalid object.&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN&gt;I need&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;output&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;as :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;{&lt;/P&gt;&lt;P class="p1"&gt;“createdAt”: ISODate("2020-08-26T04:00:00.000Z”)&lt;/P&gt;&lt;P class="p1"&gt;}&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Kindly help if there is any way to do so.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 11:26:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/301933#M220926</guid>
      <dc:creator>Manoj90</dc:creator>
      <dc:date>2026-04-21T11:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Processor: Save ISO format date into mongoDb using PutMongo Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/302110#M220992</link>
      <description>&lt;P&gt;I have achieved this by using&amp;nbsp;&lt;SPAN&gt;AVRO&lt;/SPAN&gt; schema.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-08-29 at 9.06.06 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/28741iB5E0ACCBEE6DF421/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-08-29 at 9.06.06 PM.png" alt="Screen Shot 2020-08-29 at 9.06.06 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In place of putMongo Now I am using putMongoRecord and convertRecord for converting schema.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is an example for AVRO schema :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
"type": "record",
"namespace": "nifi",
"name": "fredSchema",
"fields": [
 {
    "name": "createdAt",
    "type": {
      "type": "int",
      "logicalType": "date"
    }
 }
]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Use the above AVRO schema, and remember the date what you are going to sen should be yyyy-MM-dd format. Thanks.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 17:22:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/302110#M220992</guid>
      <dc:creator>Manoj90</dc:creator>
      <dc:date>2020-08-29T17:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Processor: Save ISO format date into mongoDb using PutMongo Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/302325#M221075</link>
      <description>&lt;P&gt;I also tried it with the Avro schema and type 'timestamp-millis' but I had the problem, that the milliseconds everytime got saved as .000 instead of .123, .987, ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So another solution for you would be to use Jolt and add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"createdAt": { "$date": "${dateAttr}" }&lt;/LI-CODE&gt;&lt;P&gt;to your JSON, that converts the type to date in MongoDB&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 15:18:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/302325#M221075</guid>
      <dc:creator>Faerballert</dc:creator>
      <dc:date>2020-09-03T15:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Processor: Save ISO format date into mongoDb using PutMongo Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/368848#M240288</link>
      <description>&lt;P&gt;Put Mongo is throwing an error while using this&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;***PutMongo[id=e57c5334-b5a8-1c6c-0840-73050fa4acd5] Failed to insert FlowFile[filename=a2268e35-1e97-4f75-b58c-f33396290666] into MongoDB due to Failed to parse string as a date: org.bson.json.JsonParseException: Failed to parse string as a date&amp;nbsp;&lt;BR /&gt;Caused by: java.time.format.DateTimeParseException: Text '2023-04-18 13:07:38.000+0000' could not be parsed at index 10****&lt;BR /&gt;&lt;BR /&gt;Is there a way to use jolt and putMongo to store the iso date in mongo db&amp;nbsp;&lt;BR /&gt;pls help&lt;BR /&gt;thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 06:39:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/368848#M240288</guid>
      <dc:creator>ramMuka</dc:creator>
      <dc:date>2023-04-19T06:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Processor: Save ISO format date into mongoDb using PutMongo Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/369574#M240509</link>
      <description>&lt;P&gt;"createdOn": {"$date":"${now():format('YYYY-MM-dd HH:mm:ss'):replace(' ', 'T'):append('.000+00:00')}"}&lt;BR /&gt;used this to store ISO date format in mongo db from Jolt and nifi expression language.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 04:54:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Processor-Save-ISO-format-date-into-mongoDb-using/m-p/369574#M240509</guid>
      <dc:creator>ramMuka</dc:creator>
      <dc:date>2023-04-27T04:54:46Z</dc:date>
    </item>
  </channel>
</rss>

