What will the best Way to create a table (mysql/JDBC) on error(table not found) and again process the record?

asked 2018-11-19 00:23:10 -0600

TLDR; How can i create a pipeline which will insert into dynamic tables (mysql) and create them if they are not created?

Environment :

Pipeline 1

Origin :  MQTT Subscriber
Processor: Jython Evaluator
Destination : JDBC Producer ( mysql )
Pipeline Error Handling : SDC RPC Pipeline (i.e Pipeline 2)

The Processor(Jython Evaluator) produces records which are database table are specific (i.e table names are dynamic) on new records entry ( but only one time table creation ).

Using JDBC Producer , I am able to insert into tables (but to only those which are already created in database ). Whenever JDBC_16 or table doesn't exists exception arises , a/c to error handling it gets written to SDC RPC Pipeline 2 which handles table creation again using JDBC producer and everything works but the last packet got lost.

TLDR; How can i create a pipeline which will insert into dynamic tables (mysql) and create them if they are not created?

edit retag flag offensive close merge delete