MongoDB relationship

Hello,

I am using the "MongoDB Writer node" and Knime generate special value.

MongoDB browse this type of JSON value :


{ 
	"_id" : ObjectId("583d1a71fed417940b00002c"), 
	"link" : "http://www.google.ch", 
	"country" : "Suisse", 
	"category" : DBRef("category", ObjectId("583d1a1ffed417c00a00002a"), "dbname") }

And Knime browse this type of JSON value :

{
  "_id" : {
    "$oid" : "583d1a71fed417940b00002c"
  },
  "link" : "http://www.google.ch",
  "country" : "Suisse",
  "category" : {
    "$ref" : "category",
    "$id" : {
      "$oid" : "583d1a1ffed417c00a00002a"
    },
    "$db" : "dbname"
  }
}

So, $oid matches ObjectId, $db matches DBRef, ...

Why is it not similar json format ?


Where can I find translation between mongodb and Knime ?


Witch query do I have to give to Knime to make relationship for category ? What kind of json file do I have to give to Knime for relationship (category for a link) ?

Do you have documentation ?

Thanks for helping,

Thierry

 


 

https://docs.mongodb.com/manual/reference/mongodb-extended-json/

 

The extended JSON from MongoDB is not valid JSON and therefore cannot be represented in KNIME. KNIME shows the expanded version. The relationships are described in the page you have already posted.