env {
  execution.parallelism = 1
  job.mode = "BATCH"
  #checkpoint.interval = 2000
  #execution.checkpoint.interval = 10000
  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
}

source {
  Jdbc{
    result_table_name = "mysql01"
    driver = "com.mysql.cj.jdbc.Driver"
    user = "root"
    password = "root"
    table-names = ["test_db.user_01"]
    query = "select * from test_db.user_01"
    url = "jdbc:mysql://localhost:3306/test_db"
  }
  Jdbc{
      result_table_name = "mysql02"
      driver = "com.mysql.cj.jdbc.Driver"
      user = "root"
      password = "root"
      table-names = ["test_db.user_02"]
      query = "select * from test_db.user_02"
      url = "jdbc:mysql://localhost:3306/test_db"
  }
}

sink {
  Jdbc {
    source_table_name=["mysql01", "mysql02"]
    url = "jdbc:mysql://localhost:3306/test_db"
    user = "root"
    password = "root"
    driver = "com.mysql.cj.jdbc.Driver"
    primary_keys = ["id"]
    database = "test_db"
    table = "user"
    support_upsert_by_query_primary_key_exist = true
    generate_sink_sql = true
  }
}
