Mysql CDC 乱码问题 #5409
Unanswered
winnershili
asked this question in
Q&A
Mysql CDC 乱码问题
#5409
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I deployed a seatunnel cluster using a container and attempted to invoke java application by seatunnelclient;when test the mysql cdc ,the chinese field were garbled ;
my config file like this:
env {
execution.parallelism = 1
checkpoint.interval = 100
job.mode = "STREAMING"
}
在source所属的块中配置数据源
source {
MySQL-CDC {
result_table_name = "source_test"
parallelism = 1
server-id = 5656
}
}
在transform的块中声明转换插件
transform {
}
在sink块中声明要输出到哪
sink {
Jdbc {
source_table_name ="source_test"
driver = "com.mysql.cj.jdbc.Driver"
url = "jdbc:mysql://xxxxxxx:18002/xxxx"
# url = "jdbc:mysql://xxxxxxxxxxx:18002/xxxxx?useUnicode=true&characterEncoding=utf-8"
user = "xxxxx"
password = "xxxxxx"
query = "insert into target_test(id,name,age) values(?, ?,?) on duplicate key update name=name,age=ifnull(VALUES (age), age)"
}
}
/
Beta Was this translation helpful? Give feedback.
All reactions