Support Questions

Find answers, ask questions, and share your expertise

QueryDatabaseTable Problem

avatar
Explorer

Hi, Guys. I am new to use NiFi flow. I am kind of confused about Query database table processor. So now, I am try to get all data from Postgres database and convert them into json and then convert them into xml.

But sometimes, the Query database table processor will have a lot of Flow file and then the queue just mess up. I try to set the art_id to be maximum-value column but it doesn't work well because art_id is string.(not sure)

This is a screenshot from a sample table called title and it has about 500 rows. How to query them just one time and split them into 500 flowfile and each of flowfile has only one row from table title without any duplicates. Can someone help me?

Thank you so much. Following screenshots are my progress so far.

 

 

Screenshot 2023-12-12 at 2.27.23 PM.png

Screenshot 2023-12-12 at 2.27.40 PM.png

Screenshot 2023-12-12 at 2.27.55 PM.png

Screenshot 2023-12-12 at 2.28.09 PM.png

Screenshot 2023-12-12 at 2.25.10 PM.png

1 ACCEPTED SOLUTION

avatar
Super Guru

It seems that you need to process the 500 records once. In this case you dont need to start the ExecuteSQL processor nor worry about scheduling it unless you want to run it again in the future. Keep the processor stopped then  right click on it and select Run Once. This should load the total number of records one time.

View solution in original post

10 REPLIES 10

avatar
Super Guru

It seems that you need to process the 500 records once. In this case you dont need to start the ExecuteSQL processor nor worry about scheduling it unless you want to run it again in the future. Keep the processor stopped then  right click on it and select Run Once. This should load the total number of records one time.