Index_seq example is not working

Hi Team,

I am testing the udtf example named index_seq and it is not working.

I have the following error.

Function ‘index_seq’ does not accept parameters (ARRAY).
Valid alternatives are:

For detailed information on a function run: DESCRIBE FUNCTION ;

Is there any error in this example?
Thanks

What do you see if you run describe function index_seq;?

You might check your ksqlDB server log for any errors. Perhaps the UDTF jar was not packaged/deployed correctly.

This is the info that I can see in the logs.

ksqldb-server | [2021-03-18 17:09:03,072] WARN Failed to add UDTF to the MetaStore. name=index_seq method=public java.util.List io.confluent.developer.IndexSequenceUdtf.indexSequence(java.util.List) (io.confluent.ksql.function.UdtfLoader)
ksqldb-server | io.confluent.ksql.function.KsqlFunctionException: Cannot resolve parameter name for param at index 0 for UDF index_seq:indexSequence. Please specify a name in @UdfParameter or compile your JAR with -parameters to infer the name from the parameter name.

Thanks,
Juan

You need to either specify a parameter name using the value attribute for @UdfParameter (for example: @UdfParameter("x")), or enable the -parameters compiler flag to derive the name via reflection. See here for more details.

This topic was automatically closed after 30 days. New replies are no longer allowed.