Uploaded image for project: 'StreamSets Data Collector'
  1. StreamSets Data Collector
  2. SDC-4743

MongoDB Destination does not allow upserts with non-string unique keys

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3 (Limited Impact)
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Doc Impact:
      No

      Description

      Reported at https://groups.google.com/a/streamsets.com/forum/#!topic/sdc-user/Vu9hqn3vgSM

      User is trying to use an INT32 as unique key.

      Problem appears to be getValueAsString() in MongoDBTarget.write():

                  documentList.add(
                      new ReplaceOneModel<>(
                          new Document(
                              removeLeadingSlash(mongoTargetConfigBean.uniqueKeyField),
                              record.get(mongoTargetConfigBean.uniqueKeyField).getValueAsString()
                          ),
                          document,
                          new UpdateOptions().upsert(true)
                      )
                  );
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pat Pat Patterson
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: