Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

NIFI GetMongo Dynamic Query Creation

avatar
Visitor

Hi,

 

I am trying to create query with attribute value in getMongo.

 

My attribute is itemType, i want to create query using this.

 

{

"itemType": ${itemType}

}

 

if i put hard code value there instead of ${itemType} it works

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Amn 

Where did you define the NiFi Attribute "${itemType}" (FlowFile Attribute on a source FlowFile driving execution of GetMongo processor or NiFi variable registry)?

MattWho_0-1622218915953.png

NiFi is also case sensitive, so for example "ItemType" and "itemType" would be considered different variables.

If you found this helpful to yoru query, please take a moment to login and click "Accept" on this solution.
Thank you,

Matt

View solution in original post

1 REPLY 1

avatar
Master Mentor

@Amn 

Where did you define the NiFi Attribute "${itemType}" (FlowFile Attribute on a source FlowFile driving execution of GetMongo processor or NiFi variable registry)?

MattWho_0-1622218915953.png

NiFi is also case sensitive, so for example "ItemType" and "itemType" would be considered different variables.

If you found this helpful to yoru query, please take a moment to login and click "Accept" on this solution.
Thank you,

Matt