cancel
Showing results for 
Search instead for 
Did you mean: 

UDF error in single stack PO

Former Member
0 Kudos

I got this error in single stack PI

the length 0 of the array 'sortedFunctionKeys' is not equal to the number 1 of functions. See error logs for detail


I

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Please provide necessary details such as your UDF code and the input queue to your UDF.

Former Member
0 Kudos
Former Member
0 Kudos

I added the pic in firt question only but it not uploaded.

String b=var1;

b = var1.replaceAll(",","");

return b;

Argument  var1 String

Execution type Single Values

former_member182412
Active Contributor
0 Kudos

Hi Midhun,

If you create the UDF directly in Definition tab if this UDF is not reflected under functions tab you will get this error.

Try to create the UDF directly under functions tab.

Regards,

Praveen.

former_member184720
Active Contributor
0 Kudos

You can simply use standard replacestring text function for that right?

However it's not a problem with UDF code, check below thread (Anoop Garg) to fix

Former Member
0 Kudos

Hi Praveen

It's working fine, now. I created under Functions tab. I am getting output as expected..

However,

public void RemoveCommas(String[] var1, Container container) throws StreamTransformationException{

I am not able to edit the var1 there. I think i have to use the same var1 whenever i create udfs

wonder whether it will throw error if i create more than two udfs in same mapping. Each udf will have same var1 for string entered

Hareesh

We have lots of udf requirements. I was trying something simple to get the feel of single stack

former_member184720
Active Contributor
0 Kudos

>>>wonder whether it will throw error if i create more than two udfs in same mapping. Each udf will have same var1 for string entere

var1 i local to that udf. You can use the var1 as many times as you want in a mapping

but this can be anything. you should be able to change this under arguments section.

>>>We have lots of udf requirements. I was trying something simple to get the feel of single stack

UDF's remains same in single/dual stack

former_member182412
Active Contributor
0 Kudos

Hi Midhun,

You can change variable name under Signature Variables section.

Regards,

Praveen.

Answers (0)