Skip to main content
midee
Silver ⭐️⭐️⭐️
August 4, 2021
Solved

Attribute validation against MSSQL database

I have to implement one scenario using Nifi flow.

 

1. There is one attribute from upstream processor like 

   KeyValue : KGPYT

2. I have to find whether KeyValue is unique in the system or not , by validation from Database.

   If it is not found in the database, the flowfile should be proceed to success and 

  if the value is present in database, it should be proceed to failure.

 

Please suggest me how to proceed in this case.

 

thanks!

DennisJaheruddi
Platinum ⭐️
August 4, 2021

I think you are probably looking for the LookupAttribute processor. (Or possibly the LookupRecord processor).

 

It should allow you to look up the value somewhere (e.g. in a database) and afterwards you can route on the outcome. Either directly based on matched/unmatched or if it is more complicated (e.g. the depending on what you actually found) perhaps using something like RouteOnAttribute.

- Dennis Jaheruddin If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

4 replies

DennisJaheruddi
Platinum ⭐️
Platinum ⭐️
August 4, 2021

I think you are probably looking for the LookupAttribute processor. (Or possibly the LookupRecord processor).

 

It should allow you to look up the value somewhere (e.g. in a database) and afterwards you can route on the outcome. Either directly based on matched/unmatched or if it is more complicated (e.g. the depending on what you actually found) perhaps using something like RouteOnAttribute.

Translate
- Dennis Jaheruddin If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.
VidyaSargur
Community Manager
Community Manager
August 9, 2021

@midee, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  I

Translate
Regards, Vidya Sargur, Community Manager Was your question answered? Make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.