Created 10-09-2018 02:38 PM
Hi
I am trying to prepend constant to the attribute in flow file . I was used below flow
Details :
Input : Flow file contains only below value
{"project" :"ABC-11"}
Output : Flow file should has mentioned value
{"_id.project":"ABC-11"}
here prepending _id to the project attribute and followed below flow
source--> updateattribute->replacetext->put file
in updateattribute attribute defined the project filed as below
project ==> ${prepend(_id)projectid}
The Processor is giving error and refereed the nifi expression language guide , There is no function for prepending constant to attribute
Please suggest some idea/thoughts for resolving the issue. Thanks for time and support
Created on 10-09-2018 10:14 PM - edited 08-17-2019 08:07 PM
If your flowfile having only one key,value then use ReplaceText processor and configure the processor as shown below
We are searching for project literal value and replacing that with _id.project by using ReplacementStrategy as LiteralReplace.
Input:
{"project" :"ABC-11"}
Output:
{"_id.project":"ABC-11"}
Created on 10-09-2018 10:14 PM - edited 08-17-2019 08:07 PM
If your flowfile having only one key,value then use ReplaceText processor and configure the processor as shown below
We are searching for project literal value and replacing that with _id.project by using ReplacementStrategy as LiteralReplace.
Input:
{"project" :"ABC-11"}
Output:
{"_id.project":"ABC-11"}
Created 10-10-2018 12:30 PM
Thanks for your time and help