Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-94843

Support collectionless lookup syntax

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Atlas Streams
    • Fully Compatible
    • Sprint 56, Sprint 58

      Confirm syntax for collectionless lookups are supported in streams. The support for this functionality/syntax will be added in SERVER-85477. As part of this ticket we need to confirm that the agent also supports the syntax.

      e.g. https://mongoplayground.net/p/HmZsfv-m4uK

      If syntax isn't supported this ticket should cover adding support.

      Either way, we will need to request documentation to be updated. As of right now, we specify that in the $lookup stage that the from field is required. After this change, we will align with aggregation in that the from field is optional (source)

       

      Edit: I confirmed that this syntax is not supported.

      AtlasStreamProcessing> sp.process([{ "$source": { "connectionName": "sample_stream_solar" } }, { "$lookup": { localField: "group_id", foreignField: "foreign_group_id", as: "test_group_id_mapping", pipeline: [{ "$documents": [{ foreign_group_id: 3, foo: "bar", a: 1, b: 2, c: 3 }] }] } }])
      
      MongoServerError[CommandFailed]: Failed to create stream processor: no connectionName key located in $lookup from clause: no connectionName key located in $lookup from clause: no connectionName key located in $lookup from clause: no connectionName key located in $lookup from clause, correlationID = 17f4d28dccb3f4ba6bf99add 

       

      Edit: Instead of modifying the agent code we will amend the engine parseConnectionInfo logic so it works with collectionless $lookup i.e. when no from field is specified. This will make it to where MHOUSE-12596 will unblock this syntax for us. A key thing to note is that we will want documentation updated as part of MHOUSE-12596 wrapping up since that is when the from field for lookup operators will no longer be required. I'll add a comment to MHOUSE-12596 to capture this.

       

            Assignee:
            calvin.nix@mongodb.com Calvin Nix
            Reporter:
            calvin.nix@mongodb.com Calvin Nix
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: