Back to Databases FAQs
HELP CENTER · FAQDatabases2 min read

Why does a database lookup return no records even though data exists?

Check that the query targets the intended database and collection, then verify the filter against an example record. A connection can be valid while the selected namespace or condition is wrong.

Databases

Confirm the database and collection first

A query may successfully reach a database but search a different database name or collection than the one containing the expected documents. For MongoDB connections, the database name is read from the URI path; if it is absent, the service may use a default database. Compare the connection's intended name with the URI and the collection passed to the query.

Check spelling, capitalization, and whether the collection name is singular or plural. These details can vary across systems and applications. Use a safe metadata listing or a known record in the intended collection to verify the target before changing the filter.

Validate the filter using a known record

Start with a minimal filter or an empty filter only when that is appropriate and authorized. Compare each field name and value type with an actual document; a string that looks numeric is not necessarily equal to a number, and nested fields may require a different path.

If the query still returns no results, record the selected database, collection, sanitized filter, and operation name. Do not share customer documents or the full connection URI while debugging. A small redacted example can show the field structure without exposing private values.

Back to Databases FAQs