Member since
06-14-2022
60
Posts
2
Kudos Received
0
Solutions
11-28-2022
07:21 AM
Hi Team, I have an requirement: Input: { "headers": { "comments": "3" }, "data": [ { "Id": "100000", "Date": "2022-09-22" }, { "Id": "100001", "Date": "2022-09-02" } ] } Jolt Spec: [{ "operation": "shift", "spec": { "data": { "*": { "Id": "[&1].Id", "Date": "[&1].Date", "$": "[&1].array_Ind" } } } }, { "operation": "modify-default-beta", "spec": { "*": { "Record": "=concat('Record ',@(1,array_Ind))" } } }] I am getting below output: [ { "array_Ind" : "0", "Id" : "100000", "Date" : "2022-09-22", "Record" : "Record 0" }, { "array_Ind" : "1", "Id" : "100001", "Date" : "2022-09-02", "Record" : "Record 1" } ] Expected output: [ { "array_Ind" : "1", "Id" : "100000", "Date" : "2022-09-22", "Record" : "Record 1" }, { "array_Ind" : "2", "Id" : "100001", "Date" : "2022-09-02", "Record" : "Record 2" } ] Can you please help
... View more
Labels:
- Labels:
-
Apache NiFi
11-28-2022
07:00 AM
@SAMSAL Okay thanks, I am trying to generate the index of the array using jolt but the index always start from 0. How can get it from 1 so that the data will be in sync
... View more
11-27-2022
08:38 PM
Hi @SAMSAL , Okay, will try the solution by you. But the point is original data is travelling first and response will come after then how original response will wait? when i got the response from the api then only both data should merged Can you please help
... View more
11-25-2022
05:27 AM
Orginal data: { "data": [ { "id": "1234569", "Date": "2022-08-22" }, { "id": "1234567", "Date": "2022-08-22" }, { "id": "34567", "Date": "2022-08-22" } ] } API Response: [ { "Record 2" : "Invalid values for emp info" }, { "Record 3" : "Invalid values for emp info" } ] Where Record 1,Record 2,Record 3 is array of json object index. Here we have three records in orginal data, Record 1 passed successfully and remaining two failed and due to that in response we are getting Record 2 and Record 3 i.e. if index of orginal data = value of Record (for example original data's index 1 is passed successfully so it should not merge. In orginal Response Index 2 failed, so it should merge with Record 2 and so on.. ) then final output should look like below: { "data": [ { "id": "1234567", "Date": "2022-08-22", "Record 2" : "Invalid values for emp info" }, { "id": "34567", "Date": "2022-08-22", "Record 3" : "Invalid values for emp info" } ] } How can I do that? Please help.
... View more
Labels:
- Labels:
-
Apache NiFi
11-24-2022
05:56 AM
Hi @gkp_shakeel , Can you please help me with the CURSOR data type object and the INTERFACE_DATA%ROWTYPE; Parameters. How can I call such store procedure
... View more
11-23-2022
02:51 AM
@Faerballert , It's working fine as expected. Thank you so much for the quick response.
... View more
11-22-2022
04:17 AM
Hi, I have the below data: Record 6|Invalid values for Entry Date. Record 7|Processing failed due to error in record: 6 Record 8|Processing failed due to error in record: 6 Record 9|Processing failed due to error in record: 6 Record 10|Processing failed due to error in record: 6 Record 11|Duplicate of record Job id : , data id : , first_name: , last_name: , Date: 2021, Entry Date: 2021. Record 12|Processing failed due to error in record: 11 Record 13|Processing failed due to error in record: 11 Record 14|Processing failed due to error in record: 11 Record 15|Processing failed due to error in record: 11 I want to convert it like: [ { "Record 6":"Invalid values for Entry Date." }, { "Record 7":"Processing failed due to error in record: 6" }, { "Record 8":"Processing failed due to error in record: 6" }, { "Record 9":"Processing failed due to error in record: 6" }, { "Record 10":"Processing failed due to error in record: 6" }, { "Record 11":"Duplicate of record Job id : , data id : , first_name: , last_name: , Date: 2021, Entry Date: 2021." }, { "Record 12":"Processing failed due to error in record: 11"}, { "Record 13":"Processing failed due to error in record: 11"}, { "Record 14":"Processing failed due to error in record: 11"}, { "Record 15":"Processing failed due to error in record: 11"}] How can I do that. Please help
... View more
Labels:
- Labels:
-
Apache NiFi
11-09-2022
09:53 PM
@Faerballert , can you please reply if you have the solution for this or can you share the code to resize the attachment from the mailbox
... View more
11-09-2022
12:28 AM
Hi @Faerballert , I am converting the base64 image content to attribute because i am preparing the payload for the same. I have attached the snapshot of the payload. file_content.0 is nothing but the content of the file that i have converted into the attribute using ExtractText processor and using it into the payload
... View more
11-08-2022
07:51 PM
Hi @Faerballert , I am following the first flow but while converting content of flowfile to an attribute using ExtractText the value of the attribute is getting truncated . Is there any way that we can resize the image in NiFi? I checked for Resize image processor but its not available. Can you please suggest.
... View more