Support Questions
Find answers, ask questions, and share your expertise

NIFI GetMongo Dynamic Query Creation

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

Master Guru

@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

Master Guru

@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

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