Member since
09-29-2023
4
Posts
2
Kudos Received
0
Solutions
03-04-2024
02:10 PM
1 Kudo
Hello, I am getting the multiple future date and time with one unique id at one processor group from GetMongo in json . Can I do something like once i receive the date and time i schedule another processor group which will get me the information of that particular id for 4 hours and then automatically end it. How can i achieve this type of architecture ?
... View more
Labels:
- Labels:
-
Apache NiFi
03-04-2024
01:18 AM
1 Kudo
Hi @piyush7829 , Why dont you do that using JoltTransformation as well. I think you can do it before split or after depending what is the json is and what is the expected new output. JsonJoltTransformation processor is very powerful and it allows you to use Expression Language which mean you can reference attributes in the jolt spec and assign them to new key. For example if you want to assign the value of the attribute ${series_id} to new key called series_id , then in jolt spec you can do that as follows: [
{
"operation": "shift",
"spec": {
.....
"#${series_id}":"series_id"
......
}
}
] If you need help with the jolt spec please post sample input and expected output and I will he happy to help you. If you find this is helpful please accept solution. Thanks
... View more
03-01-2024
05:35 AM
1 Kudo
Hi @piyush7829 , Glad it worked and you were able to do the post. If I understood your question correctly then you need to pass the series_id to the post:form:series_id multipart form property dynamically, right? If that is the case then its easy since the InvokeHttp multipart dynamic properties allows for expression language you can reference the series_id attribute you have extracted using the EvaluateJsonPath and assign it as follows: post:form:series_id: ${series_id} Every time the invokeHttp is triggered it would evaluate the series_id expression from the incoming flowfile and assign its value before making the api invokation. Hope that helps.
... View more
10-01-2023
01:03 PM
@piyush7829, Change the setting of the EvaluateJsonPath "Destination" Property to flowfile-attribute instead of flowfile-content. Setting this property with the later value will change the whole flowfile content and wont create the attribute you are looking for in the replacetext processor. if that still doesnt work, make sure to check after the EvaluateJsonPath to see if the "match_id" attribute was created and populated with the correct value, if not then I need to see the response from the GetMongo processor to make sure the correct path is being set in the EvaluateJsonPath.
... View more