Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NIFI GetMongo Dynamic Query Creation

avatar
New Contributor

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
Super 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
Super 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