I have two apache-nifi flows. One taken from database and other coming from flowfile.
Taken from QueryDatabaseTableRecord
processor. :
lat,long,location
232,3454,colombo
454,8834,kandy
438,94,galle
In my flowfile I have lat
and long
columns. What I want is compare lat
, and long
coming from two flows and if its match, add a new column to flowfile as location
The problem I am having is that(to use ExecuteScript
), how to get values from both flows as they have identical names?
Or is there a way to use another processor to do this?
Try LookupRecord with a DatabaseRecordLookupService instead of QueryDatabaseTableRecord. You should specify user-defined properties lat
to /lat
and long
to /long
and a Result RecordPath
of /location
. If the lat/long of the flow file match the lat/long of a database row, it should return the value of location
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.