Support Questions

Find answers, ask questions, and share your expertise

DB Trigger to NiFi

avatar
Expert Contributor

We have an Oracle DB and we run nightly batch job but when that job would end varies. Now we have a NiFi workflow getting data from this Oracle DB but should not be during the batch job run. How do we turn off/on the entry point processor (say ExecuteSQL) whenever the Oracle Batch job is running/has stopped?

We thought of using Oracle DB trigger and then invoke a HTTP request within that trigger when the job would end, but is there a processor in NiFi where you can put up a simple web service / REST endpoint and then use that to trigger or turn on the ExecuteSQL processor?

1 ACCEPTED SOLUTION

avatar
Master Mentor
@J. D. Bacolod

Anything you can do within the NiFi UI, you can also do via NiFi Rest-api calls. So you could issue a rest-api call to stop specific processors before the batch job is started and then issue another rest-api call to start the processor again after the batch job completes.

https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

Thanks,

Matt

View solution in original post

1 REPLY 1

avatar
Master Mentor
@J. D. Bacolod

Anything you can do within the NiFi UI, you can also do via NiFi Rest-api calls. So you could issue a rest-api call to stop specific processors before the batch job is started and then issue another rest-api call to start the processor again after the batch job completes.

https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

Thanks,

Matt