Support Questions

Find answers, ask questions, and share your expertise

How to give dynamic query in queryrecord processor in Nifi ?

Hi,

I want to do something like this

SELECT * FROM FLOWFILE WHERE Gender = '${gender}'

Need Help. Thanks

1 ACCEPTED SOLUTION

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.

View solution in original post

3 REPLIES 3

If I do -> SELECT * FROM FLOWFILE WHERE Gender = 'Male', It works

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.

Thnks Bryan

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.