Support Questions

Find answers, ask questions, and share your expertise

Pull daily record from Database using date.

avatar
Contributor

Hi,

I am still a beginner in using NIFI.

I would like to query a database & pull record on a daily basis. And each day record would be converted to CSV and write to a directory.

I have checked this method:

https://community.cloudera.com/t5/Support-Questions/Fetch-records-from-a-database-incrementally-base...

But i would like to know if there is any other simpler way of doing it.

Thank you so much.

1 REPLY 1

avatar
Expert Contributor

You can set the run schedule of the processor to cron driven [1] and give it your cron expression from there.

Note that this cron is not the typical OS cron syntax and its based off quartz cron scheduler [2]

To build a cron expression this is a good online tool to do so [3]

 

[1] https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#scheduling-strategy

[2] http://www.quartz-scheduler.org/

[3] https://www.freeformatter.com/cron-expression-generator-quartz.html