misi1987107 commented on issue #8548:
URL: https://github.com/apache/seatunnel/issues/8548#issuecomment-2729386384

   I have submitted a PR to fix the geometry field type issue.But if you want 
to sink to an external database, you need to use a function to convert wkb 
binary data. You can refer to this configuration
   
   
   `env {
     parallelism = 1
     job.mode = "STREAMING"
     checkpoint.interval = 20000
     job.retry.times = 0
   }
   
   source {
       MySQL-CDC {
           base-url = "jdbc:mysql://x.x.x.x:xxxx/data_src"
           username = "xxx"
           password = "xxx"
           table-names = ["data_src.test_blob"]
           startup.mode = "initial"
           schema-changes.enabled = true
      }
   }
   
   sink {
       Jdbc {
           source_table_name = "dbtest"
           url = "jdbc:mysql://x.x.x.x:xxxx/data_src"
           driver = "com.mysql.cj.jdbc.Driver"
           user = "root"
           password = "123456"
           batch_size = 500
           data_save_mode = DROP_DATA
           database = "data_src"
           generate_sink_sql = false
           query = "INSERT INTO `data_src`.`test_blob_copy1` (`id`, `gis`) 
VALUES (?, ST_GeomFromWKB(?)) ON DUPLICATE KEY UPDATE `id`=VALUES(`id`), 
`gis`=VALUES(`gis`)"
           table = "test_blob_copy1"
       }
   }
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to