Forum Discussion

darshthakkar's avatar
darshthakkar
Valued Contributor
3 years ago
Solved

Basic string transformations not working

Hi Team,

I observed that basic string transformations are not working, few of the scenarios have been listed below:

  1. Trimming spaces from the text
  2. Changing the text from uppercase to lowercase and vice-versa

I have used both the mapper and conditional snap however haven’t found any luck to it.

Examples for the above-listed scenario:
(1) Text is Darsh and if I put the transformation to change this to uppercase, it should return DARSH however the end result remains as is

(2) Text is " Darsh", after using trim(), trimLeft(), trimRight(), the expected result should be “Darsh” however the end result doesn’t change.

Any help on this would be highly appreciated.

Regards,
Darsh

  • Some of the observations here:

    1. Data coming from upstream systems was messed up

    2. There were added spaces in the data from the upstream systems itself 

    3. Ideally, with snapLogic, it should have been able to trim the spaces and help with the transformations however it wasn't able to do so

    4. Having said that, the mapper and conditional snap works just right for other set of data so giving the benefit of doubt to the messy data coming from upstream systems.

    Some recommendations/suggestions:

    1. If you're using a csv file, please ensure the encoding is supported in snapLogic and select the encoding accordingly

    2. For excel files, it should work just right

    3. For data coming from upstream systems like Oracle, Salesforce or Snowflake, try to export the data and see if there are any discrepancies, if there are, align with your team internally to fix it before connecting it with snapLogic.

    Closing this thread now.

4 Replies

  • Hello @darshthakkar,

    Just tested quickly on my side, and the stated functions are working as expected.

    I’m not sure what can cause this type of behavior.

    If you resolve this please let us know about the cause.

    Thanks! 🙂
    Aleksandar.

    • darshthakkar's avatar
      darshthakkar
      Valued Contributor

      Thank you @AleksandarAngelevski for your quick response and testing it out.
      I’m unsure why this is happening for me.

      It doesn’t work on mapper and conditional snap both. I was on a call with snapLogic support and we tested it out (while on a screenshare) and we observed the failure.

      Will keep this thread posted as soon as we are able to resolve the issue and have a RCA.

      Regards,
      Darsh

  • darshthakkar's avatar
    darshthakkar
    Valued Contributor

    Seems like there is an issue with the data coming from upstream systems. I tried with a sample excel file and below is my output:


    Both the mapper and conditional snap are working as expected.

  • darshthakkar's avatar
    darshthakkar
    Valued Contributor

    Some of the observations here:

    1. Data coming from upstream systems was messed up

    2. There were added spaces in the data from the upstream systems itself 

    3. Ideally, with snapLogic, it should have been able to trim the spaces and help with the transformations however it wasn't able to do so

    4. Having said that, the mapper and conditional snap works just right for other set of data so giving the benefit of doubt to the messy data coming from upstream systems.

    Some recommendations/suggestions:

    1. If you're using a csv file, please ensure the encoding is supported in snapLogic and select the encoding accordingly

    2. For excel files, it should work just right

    3. For data coming from upstream systems like Oracle, Salesforce or Snowflake, try to export the data and see if there are any discrepancies, if there are, align with your team internally to fix it before connecting it with snapLogic.

    Closing this thread now.