-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Search before asking
- I had searched in the issues and found no similar issues.
What happened
According to https://seatunnel.apache.org/zh-CN/docs/2.3.10/transform-v2/sql-udf/, I wrote a UDF and placed it in the lib directory. When running, it prompts that the class java.lang.ClassNotFoundException: org.apache.seatunnel.api.common.CommonOptions cannot be found. Moreover, I checked that the documentation requires the seatunnel-api version introduced in the UDF project to be 2.3.2, but in this version, CommonOptions still uses result_table_name and source_table_name, which conflicts with plugin_output/plugin_input in subsequent versions.
SeaTunnel Version
2.3.10
SeaTunnel Config
env{
job.name="future_pos"
parallelism = 1
job.mode = "BATCH"
}
source {
Jdbc {
url = "jdbc:oracle:thin:@192.168.98.xx:1521:xxx"
driver = "oracle.jdbc.OracleDriver"
connection_check_timeout_sec = 100
user = "dbusrposnew"
password = "futureposnew"
split.size = 10000
table_list = [
{
table_path = "DBUSRPOSNEW.SALEHEAD"
# Use query filetr rows & columns
query = "select * from DBUSRPOSNEW.SALEHEAD where RQSJ>=TO_DATE('${this_day}', 'YYYY/MM/DD HH24:MI:SS')"
}
]
}
}
transform {
Sql {
plugin_output="t"
plugin_input="t1"
query = """
select BILLNO, MKT, SYJH, FPHM, DJLB, BC, RQSJ,
TransformsGBK(SYYH) SYYH , HYKH, JFKH, THSQ, GHSQ, HYSQ, SQKH, SQKTYPE, SQKZKFD, YSJE, SJFK, ZL, SSWR_SYSY, FK_SYSY, HJZJE, HJZSL, HJZKE, HYZKE, YHZKE, LSZKE, BUYERINFO, JDFHDD, SALEFPHM, LJJF, BCJF, MEMO, STR1, TransformsGBK(STR2) STR2, STR3, STR4, STR5, NUM1, NUM2, NUM3, NUM4, NUM5, SENDRQSJ, STATUS, CUSTTYPE, HHFLAG, MANAUNIT, FQFLAG, JFFLAG, SAFLAG, FQJE, YHZSZK, YBILLNO, YSYJH, YFPHM, CRMBILLNO, STR8, CHANNEL, HYCID, HYTYPE FROM t
"""
}
}
sink {
Doris {
fenodes = "192.168.0.123:8030,192.168.0.456:8030,192.168.0.789:8030"
username = root
password = "root"
database = "ods_future_pos"
table = "ods_${table_name}"
sink.label-prefix = "future-pos_${table_name}-jdbc"
sink.enable-2pc = "true"
sink.enable-delete = "true"
save_mode_create_template="CREATE TABLE IF NOT EXISTS `${database}`.`${table_name}` (${rowtype_primary_key},${rowtype_fields},dt datetime(0) default current_timestamp(0) on update current_timestamp(0)) ENGINE=OLAP UNIQUE KEY (${rowtype_primary_key}) DISTRIBUTED BY HASH (${rowtype_primary_key}) BUCKETS 3 PROPERTIES ( \"replication_allocation\" = \"tag.location.default: 3\",\"in_memory\" = \"false\",\"storage_format\" = \"V2\", \"disable_auto_compaction\" = \"false\")"
doris.config {
format = "json"
read_json_by_line = "true"
}
}
}
Running Command
Error Exception
java.lang.ClassNotFoundException: org.apache.seatunnel.api.common.CommonOptions
Zeta or Flink or Spark Version
zeta
Java or Scala Version
1.8
Screenshots
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable