I want to execute 5 SQL CREATE TABLE
statements in a specific order with Apache Nifi. Once the first table has been successfully created, I want the second processor to create the next table and so on.
I have been able to execute CREATE
statements with a PutSQL
-processor, but I am having trouble to get it running as a CRON job because PutSQL
requires an upstream connection which I don't have for the first of my 5 PutSQL
-processors. The other 4 run after the previous finished which works great.
Is there a trick so that the first PutSQL
-processor doesn't need an upstream connection, or is there a "dummy"-processor which I can use to send a CRON/timed success-message to my first PutSQL
-processor which then starts working?
You could use ExecuteSQL for which the incoming relationship is optional.
If you want to use PutSQL, you can use GenerateFlowFile on a CRON schedule to kick a single flow file out at the specific time to trigger PutSQL.