Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-16990

DataMapper multi spaces delimiter in split transformation behaves as "double spaces" delimiter.

XMLWordPrintable

    • False
    • False
    • % %
    • Todo
    • Undefined
    • Hide

      DataMapper backslash delimiter works only when the message has double backslashes

      Show
      DataMapper backslash delimiter works only when the message has double backslashes

      Multi spaces delimiter in split transformation behaves as "double spaces" delimiter.

      e.g.
      When I have a source message from AMQ

      {"test":"test1  test2  test3"}
      

      the output is correctly split to

      [[[{"test":"test1"}, {"test":"test2"}, {"test":"test3"}]]] 
      

      But when the message contains three spaces

      {"test":"test1   test2   test3"}
      

      the output is split around two spaces, and one space is still left in the output strings

      [[[{"test":"test1"}, {"test":" test2"}, {"test":" test3"}]]] 
      

      When the message contains four spaces

      {"test":"test1    test2    test3"}
      

      the output is split around two spaces, so empty values will be created

      [[[{"test":"test1"}, {"test":""}, {"test":"test2"}, {"test":""}, {"test":"test3"}]]] 
      

            toigaras@redhat.com tomohisa igarashi
            mkralik@redhat.com Matej Kralik
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: