Skip to Content
avatar image
Former Member

UDF split not working

Hi experts,

I am having an UDF which splits the input to many and this doesn't seems to be working. can you please help me here. thanks

you

jqi1q.png (32.5 kB)
rawxs.png (92.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 16, 2016 at 06:47 AM

    Hi Tom!

    I may be wrong, but first value in your queue seems to be equal to "__cC_" (ResultList.CC constant). When it's splitted, you have only one element in "tokens" array - tokens[0]. Thus, you get "ArrayIndexOutOfBoundsException" exception as you try to use other array elements, that not exist.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2016 at 07:06 AM

    Hi Tom,

    use "mapwithDefault" before UDF.

    Regards,

    Sateesh.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      We can put the "mapWithDefault" before "splitByValue".we have created one UDF after the main UDF as below which will supress the default values which we set earlier.

      Regards,

      Sateesh.

  • Nov 18, 2016 at 08:44 AM

    Hi Tom,

    Error correctly specify ArrayIndexOutofBoundsException : 1, that means, it not able to get second value in tokken[] array after split.

    tokken[1] doesn't exist while running this UDF. I means there is no "/" in your source string, and it only generate tokken[0] and unable to generate rest.

    Why you are using SplitbyValue before UDF, if you are spluiting this String in UDF also? I don't get that logic.

    Can you share your GLAccount Source message example, that you are forwarding to target and getting this error.

    Thanks and regards,

    Anoop Rai

    Add comment
    10|10000 characters needed characters exceeded