Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

find (optional)
A string representing a MongoDB query (in JSON format) that is applied to the results of the custom table. WARNING: for large custom tables, will be really slow unless the field (/fields) is (/are) indexed via "$output.indexes" or "$output.sortField" (see Schedule Job API call)

Warning

Note that MongoDB uses some JSON extensions that must be used in queries from the command line:

  • When querying the ObjectId type (eg "_id"), it should be queried as the object '{ "$oid": "<object id string>"' }'
  • When querying a Date type, it should be queried as the object '{ "$date": "<date in Java time, ie milliseconds since 01 Jan 1970" }'

The full list is here: http://docs.mongodb.org/manual/reference/mongodb-extended-json/

 

sort (optional)
A string representing a MongoDB sort operator (in JSON format). WARNING: for large custom tables, will be really slow or fail unless the field (/fields) is (/are) indexed via "$output.indexes" or "$output.sortField" (see Schedule Job API call)

Info

You can always use sort={_id:1} or sort={_id:-1} to view the first or last records.

limit (optional)
An integer of how many results you want retrieved from the database, results will be grabbed in whatever order they have been stored in the db.

...