How to use the MONGO.QUERY function

Hi everyone,

i’m recently trying to save some data in Mongo. I’ve managed to save a lot of data and now I’m about to retrieve a part of it again. My problem is that I don’t understand how the argument “query” in the MONGO.QUERY function works.
I have stored several data of different persons (gender, name, date of birth etc.) and now want to search for one of those person and display his characteristics.


I used the getstep() funktion to create different URL´s and saved all the (important) incoming data with MONGO.STORE. Here I don’t get the data I want because I don’t know what to write into the “query” field.

Thanks for your help,

Tino

Hi Tino,

Excellent question and cool Stream Machine you have there. :dragon:
It always depends on what data you want to retrieve. Basically what you have to do is very close to what you already did while saving data. Again use two cells to clarify your key and your value you are looking for and add this cell range to your query field in the function wizard.

So lets say you are looking for a “Jon Snow”. Type in “name” in one cell and “Jon Snow” in the one next to it. This will get you all data base entries with the name “Jon Snow”.
You could also look for all “Female” entries of your data base. In this case you would type “gender” and “Female” in two contiguous cells.

In the “Jon Snow” example your query would look like this:

If you want to use more detailed queries, the mongo db docs will help a lot to understand what possibilities you have! If you need more help, don´t hesitate to ask.

Cheers,

Tizian