Created 01-19-2022 08:38 AM
Hi,
I'm trying to pass an output value of a processor dynamically into another and use it as a new property , here is my flow:
ReplaceText (gives the output)-> UpdateAttribute (i created a property which value is referencing output) -> EvaluateXpath ( i want to pass this value in a new property here) . I tried passing it by ${property_name} and $property_name but nothing works. Is it impossible to have a property referencing another in the EvaluateXpath processor ?
Thanks.
Created on 01-19-2022 09:01 AM - edited 01-19-2022 09:02 AM
Can I clarify that what you want to do is dealing with XML and XPath?
Or based on this "I'm trying to pass an output value of a processor dynamically into another and use it as a new property"
Output values in to flowfile attributes depend on the previous processor.
If you are not dealing with XML then the processor you most likely need is ExtractText followed by an RouteOnAttribute
Created 01-20-2022 02:41 AM
Hi @DigitalPlumber thanks for your response, im actually dealing with an XML file so i need to use EvaluateXpath to extract values from my file ( i have Getfile -> SplitXml -> EvaluateXpath in my flow). On the other hand i have a CSV file that im extracting a value from ( i have another flow Getfile -> UpdateAttribute -> QueryRecord -> ReplaceText-> UpdateAttribute) My goal is to pass the value of the UpdateAttribute into the EvaluateXpath so i can extract a value from my XML file based on the ouput value extracted from my CSV.
Created 01-20-2022 12:05 PM
I understand the issue EvaluateXPath does not take in an attribute syntax and fails at validation since it is validating for a valid Xpath path.
I wonder if there is a way to use QueryRecord instead.
Created 01-21-2022 05:44 AM
Indeed @DigitalPlumber , EvaluateXpath can't handle variables, only an Xpath. Queryrecord might be an alternative if i was using another type of file but since im using an XML file and this processor performs an SQL Query what can be my parameters in the query ?