【发布时间】:2021-01-30 08:05:52
【问题描述】:
UDF 的整个 scala 项目在这里:
Flink_SQL_Client_UDF/Scala_fixed/
我注册udf的操作是这样的:
①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;
然后我得到了
java.lang.ClassNotFoundException: ScalaUpper
需要您的帮助,谢谢!
【问题讨论】:
标签: apache-flink