davidzollo commented on issue #7937:
URL: https://github.com/apache/seatunnel/issues/7937#issuecomment-2840934803

   
   My suggestion is that we can extend sql transform, for example,
   ```
   source {
     MySQL-1 {  // Business Table
       url = "jdbc:mysql://localhost:3306/test"
       driver = "com.mysql.cj.jdbc.Driver" 
       user = "root"
       password = "123456"
       table = "orders"
       plugin_output = "order_source"  
     }
   
     MySQL-2 {  // Dimension Table
       url = "jdbc:mysql://localhost:3306/test"
       driver = "com.mysql.cj.jdbc.Driver"
       user = "root" 
       password = "123456"
       table = "customers"
       plugin_output = "customers_source"
     }
   }
   
   transform {
     Sql {
       plugin_input = ["order_source", "customers_source"] 
       query = """
         SELECT 
           o.*,
           c.name as customer_name,
           c.email as customer_email
         FROM order_source o
         LEFT JOIN customers_source c ON o.customer_id = c.customer_id  
       """
       plugin_output = "order_with_customer"
     }
   }
   
   sink {
     jdbc {
           url = "jdbc:postgresql://localhost:5432/test"
           driver = "org.postgresql.Driver"
           user = "admin"
           password = "admin123"
           
           generate_sink_sql = true
           database = "test"
           table = "public.${table_name}"
           schema_save_mode = "CREATE_SCHEMA_WHEN_NOT_EXIST"
           data_save_mode = "APPEND_DATA"
           # enable_upsert = false
       }
   }
   ```
   
   How do you think? @zhdech 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to