Member since
04-27-2020
4
Posts
1
Kudos Received
0
Solutions
05-18-2020
12:27 PM
1 Kudo
Hi, I am running into some serious JSON validation errors, which is not really needed when I am trying to insert records into MongoDB, which expects "Extended JSON". This is when I am trying to use PutMongo Processor! Here is the scenario: I have a input CSV like this: bpno,age,ordered 1234,12,"24.10.2017" Through a series of processors, i got it formatted to the shape that is as expected by MongoDB update statement. {$set: {"createdon": ISODate("2017-03-03"),"bpno": "1234","age":"12","ordered":"xyz"}} PutMongo is failing to update this statement, because ISODate is not complying to Standard JSON! (com.mongodb.util.JSONParseException) I have reached a dead end here, due to this! Is there a way we can relax this insert this record with Date field? Any solution or alternate approach, is really appreciated! Here is the screenshot of PutMongo (PS: PutMongoRecord works fine, when we use appropriate AVRO schema, with date annotation. In my case mentioned above, i need to do an update, hence using PutMongo)
... View more
Labels:
- Labels:
-
Apache NiFi
05-18-2020
03:50 AM
Hi, Actually I am working on MongoDB queries, which supports 'Extended JSON' as opposed to 'Standard JSON'. For which I need to enforce $set. Is there a way we can implement this?
... View more
05-03-2020
11:41 PM
Thank you! This gives me some directions. One thing though is that, i really want it to be "$set" and I am not expecting it to comply to JSON standard after doing this. So I guess i can just use $set in the replacement value and get the job done. (i think we need to escape $ value). Will try it out and get back.
... View more
04-27-2020
10:30 PM
Hi All, I have single JSON object in a flow file. I just want to append and prepend text to it, and pass it over as flowfiles for subsequent processors. Here is what I want to achieve: Input FlowFile Content: { "first_name": "alpha", "age": "30" } Expected output in FlowFile Content: { $set: { "first_name": "alpha", "age": "30" } } So basically i want to prepend "{ $set " and append " } " I found crude way of updating it, in multiple steps. But just wanted to do it in proper and concise manner.
... View more
Labels:
- Labels:
-
Apache NiFi