Join operation on clusterd data

Does mongo db support join operations in clustered data using lookup operator

Hi @Aya_Gamal,

Per Sharded Collection Restrictions in the $lookup documentation:

In the $lookup stage, the from collection cannot be sharded. However, the collection on which you run the aggregate() method can be sharded

The same page also includes some suggestions if you need to join multiple sharded collections including:

  • Modifying client applications to perform manual lookups instead of using the $lookup aggregation stage.
  • If possible, using an embedded data model that removes the need to join collections.
  • If possible, using an Atlas Data Lake $lookup pipeline stage to lookup a sharded collection