yuangjiang commented on issue #965:
URL: 
https://github.com/apache/incubator-seatunnel/issues/965#issuecomment-1023903645


   Debezium's cdc based on spark structured streaming is feasible. Need to 
custom develop a spark structured streaming connector 
   The following is the defined test code
   
       val parameters = new util.HashMap[String,String]()
       parameters.put("database.hostname","localhost")
       parameters.put("database.port","3306")
       parameters.put("database.user","")
       parameters.put("database.password","")
       parameters.put("database.include.list","temp")
       parameters.put("table.include.list","temp.data")
       
parameters.put("connector.class","io.debezium.connector.mysql.MySqlConnector")
       val dataFrame = sparkSession
          .readStream
         .options(parameters)
          .schema(structType)
          
.format("org.apache.spark.sql.execution.streaming.debezium.DefaultSource")
          .load()
   
       dataFrame.createOrReplaceTempView("test")
       sparkSession.sql("select * from test")
         .writeStream
         .format("console")
         .outputMode(OutputMode.Append())
         .start()
         .awaitTermination()
     }
   }


-- 
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