Duplicate/cloned columns when generating table with mongodb query #6961
-
Whenever I try to query the mongodb database that i connected to redash, using a query like this: { I get a giant table that, instead of having only 3 columns, has 3 columns FOR EACH ROW. e.g. the table has 4 results (4 rows, 4 documents in the db), the table header will look like this: _id So i have clones of the columns which repeat the same data in each row. e.g. the first row has its id shown multiple times (as many as there are rows) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I am a complete idiot.
and of course it works. I completely forgot you have to do that, lol. Reminder for anyone who might come across this: "fields" is like projection in mongodb. |
Beta Was this translation helpful? Give feedback.
I am a complete idiot.
You simply have to add the "fields".
this is how the query looks now:
and of course it works. I completely forgot you have to do that, lol. Reminder for anyone who might come across this: "fields" is like projection in mongodb.