- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to give dynamic query in queryrecord processor in Nifi ?
- Labels:
-
Apache NiFi
Created 12-07-2017 01:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I want to do something like this
SELECT * FROM FLOWFILE WHERE Gender = '${gender}'
Need Help. Thanks
Created 12-07-2017 08:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should be able to do exactly what you showed with ${gender} as long as your incoming flow files have an attribute called gender. You would have to create that attribute before QueryRecord by using UpdateAttribute or by using a processor that extracts something from the content of the flow into an attribute called gender.
Created 12-07-2017 01:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I do -> SELECT * FROM FLOWFILE WHERE Gender = 'Male', It works
Created 12-07-2017 08:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should be able to do exactly what you showed with ${gender} as long as your incoming flow files have an attribute called gender. You would have to create that attribute before QueryRecord by using UpdateAttribute or by using a processor that extracts something from the content of the flow into an attribute called gender.
Created 12-12-2017 08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thnks Bryan
