Skip to main content

With older MongoDB Reader, there was no problem on using regex for the JSON Filter parameter, such as:

{"insee_code": /^06004/}

I can't find how to use regex in the Mongo query with the MongoDB3 Reader, and I have this type of error :

MONGODB3 reader: SetAttributeFilter(): Got parse error at "/", position 61: "SPECIAL_EXPECTED": could not parse JSON document

I also notice that the Mongo keys always require to be between quotes, while with MongoDB Reader version we could use "un quoted" keys for filter.

 

 

Are there any other changes with this new driver? Thanks for the info !

 

 

I use FME Desktop 2019.2.1.0 (20191202 - Build 19813 - WIN64)

Mongo version is 4.0.13

@gvatin, In speaking with a colleague, he was curious if everything worked if you use quotes for both the name and the value in the JSON?

ex. {"insee_code": "/^06004/"}

 


@gvatin, In speaking with a colleague, he was curious if everything worked if you use quotes for both the name and the value in the JSON?

ex. {"insee_code": "/^06004/"}

 

Thanks for the advice @steveatsafe, but no, it still doesn't work as Mongo read that as the string which would be exactly "/^06004", instead of a regex meaning "a string that starts with 06004".

 

 

Both Mongo client (Robo 3T) and FME Workbench return 0 record for this query.

@gvatin, In speaking with a colleague, he was curious if everything worked if you use quotes for both the name and the value in the JSON?

ex. {"insee_code": "/^06004/"}

 

Hi @steveatsafe​, is there any updates about this feature in recent builds of FME?


Reply