The MongoDB interpreter for Zeppelin uses the same syntax as the mongo
shell: db.collection.find(query, projection)
.
Your first parameter of {}
matches all documents. The second parameter will be interpreted as a projection (although your syntax is unnecessarily complex).
Since $eq
is equivalent to and you only have a single value, your query can be more clearly expressed as:
db.$.find({ $: "$" }).table()
If your intent is to provide a more generic input form (rather than prompting for a single key/value pair) you might want to placeholder the query and projection instead, eg:
empty = {} // Placeholder for empty documents db.$.find($,$).table()
In this second example your query would be expressed as { field: "value" }
in the Zeppelin input form. You could also specify additional query criteria and a projection for fields to include in the results.