The whole scala project for UDF is here:
Flink_SQL_Client_UDF/Scala_fixed/
My operation to register the udf is like this:
①mvn scala:compile package
②cp table_api-1.0-SNAPSHOT.jar $FLINK_HOME/lib
③add the following sentence into $FLINK_HOME/conf/flink-conf.yaml
flink.execution.jars: $FLINK_HOME/lib/table_api-1.0-SNAPSHOT.jar
④create temporary function scalaupper as 'ScalaUpper';
⑤CREATE TABLE orders (
order_uid BIGINT,
product_name String,
price DECIMAL(32, 2),
order_time TIMESTAMP(3)
) WITH (
'connector' = 'datagen'
);
⑥select scalaupper(product_name) from orders;
Then I got
java.lang.ClassNotFoundException: ScalaUpper
Need your help, thanks!
