MongoDB Reader Feature Type Parameters
To access feature type parameters, click the gear icon Tip To always display the editor in FME Workbench, you can select View > Windows > Parameter Editor.
General All feature types share similar General parameters, which may include Feature Type Name, Reader or Writer information, and Geometry. In most Writer Feature Type parameter dialogs, you can also control Dynamic Schema Definitions. Some database formats accept Table or Index Qualifier prefixes on the output table feature type. |
Collection
JSON Query
This parameter specifies a JSON document that will be used to filter input features. The JSON document should be formatted as if calling the method db.collection.find() in the MongoDB shell. See the MongoDB documentation.
Examples
To filter features where the attribute foo has the value bar, the JSON Query should be:
{ “foo”: “bar” }
String Match
Find all the cities that are in the province of British Columbia:
{"Province_Name": "British Columbia" }
AND Example
The following query will find cities that are capitals and have a population of 100K and above:
{"Capital" : "YES", "Population":{ "$gt": 100000}}}
ISO Date
To work with “DATE” queries in FME, the syntax has to be in the following format. The following query will read data that has “PublishDate” greater than or equal to the date mentioned in the query:
{"PublishDate" : { "$gte" :{"$date": "2016-03-10T00:00:00.000Z"}}}