Open vinlee19 opened 1 month ago
set the option --merge-same-schema false. The Doris tables will then be named db1_customer_1 and db2_customer_1, is better?
when set the option
database test_db
in following shell, all tables in mysql will sink one database in Doris. the records from the customer_1 and customer_2 in mysql will be synchronized in one Doris tablecustomer_1
. It is exactly like this.
Proposed changes
If some tables in different databases have the same name, their schemas will be merged and their records will be synchronized into one Doris table. Otherwise, each table's records will be synchronized to a corresponding Doris table, and the Doris table will be named to 'databaseName_tableName' to avoid potential name conflict. For example , if you have a customer_1 in db1, and another same table in db2 in mysql , if you don not set the option
--database
, db1 and db2 will be created in Doris. when set the optiondatabase test_db
in following shell, all tables in mysql will sink one database in Doris. the records from the customer_1 and customer_2 in mysql will be synchronized in one Doris tablecustomer_1
. If you want tables with the same schema but in different databases to synchronize to the same Doris database with different table names, you can set the option--merge-same-schema false
. The Doris tables will then be namedtest_db_customer_1
andtest_db_customer_2
, and the records will be loaded separately.Issue Number: close #xxx
Problem Summary:
Describe the overview of changes.
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...