Repository navigation
Replies: 1 comment
|
You can use For a single exact database such as env {
job.mode = "STREAMING"
checkpoint.interval = 5000
}
source {
MySQL-CDC {
url = "jdbc:mysql://mysql:3306"
username = "your_mysql_user"
password = "your_mysql_password"
database-names = ["my_database"]
table-pattern = "my_database\\..*"
server-id = "5400-5408"
startup.mode = "initial"
}
}
sink {
Doris {
fenodes = "doris-fe:8030"
username = "root"
password = "your_doris_password"
# Option 1: keep the upstream database and table names.
database = "${database_name}"
table = "${table_name}"
# Option 2: write all MySQL tables into one fixed Doris database.
# database = "my_doris_database"
# table = "${table_name}"
sink.label-prefix = "mysql-doris-cdc"
sink.enable-2pc = "true"
sink.enable-delete = "true"
schema_save_mode = "CREATE_SCHEMA_WHEN_NOT_EXIST"
doris.config {
format = "json"
read_json_by_line = "true"
}
}
}Notes:
database-pattern = "source.*"
table-pattern = "source.*\\..*"
References:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I want to synchronize all tables in a database (my_database) to Doris in real time. How can this be done?
All reactions