0

I am new to AWS DocumentDB and trying to execute a simple query that would find entries from two collections where 3 fields are the same.

SQL version:

Select * from A a join B b on A.id = B.id where a.ax = b.bx and a.ay = b.by and a.az = b.bz

I found that mongo db can get it using the following command that uses pipeline:

{ "$lookup": { "from": "A", "pipeline": [ { "$match": { "$expr": { "$eq": [ "$ax", "$bx" ] } } } ], "as": "result" }

However, the same query is not supported in document Db. While trying to run a similar command on MongoDB Compass (over document db cluster), I get a feature not supported error and an Uncorrelated query not supported error.

Am I doing something wrong here. What is the correct way of joing 2 collections on multiple column in AWS document db.

Saurabh Tiwari
  • 4,632
  • 9
  • 42
  • 82

0 Answers0