07 Sep 2024 01:33 AM
Hello everyone, I'm new to using pattern language. I'm coming to the community because I'm having trouble getting the fields and values from a json format that comes from log ingestion. The Json format is the following. I've managed to get the value up to this point, but I can't extract the information. I'm interested in getting the "accountNumber" and "transferType" fields. Maybe you can help me with your experience in this.
"valor": "Sending. data: {\"ordererDetails\":{\"accountInfo\":\"YES\",\"customerInfo\":{\"firstName\":\"FISRT\"}},\"beneficiaryDetails\":{\"accountInfo\":{\"accountNumber\":\"111111\",\"accountType\":\"AAA\"},\"customerInfo\":{\"firstName\":\"FABS FABS\",}},\"transferDetails\":{\"transferType\":\"CASH_NOW\",\"amount\":10}}. trackingId: 111"
Solved! Go to Solution.
09 Sep 2024 06:25 AM
Hi Jhon,
I think this could work:
PARSE(content,"JSON:parsedJson")| FIELDS_ADD(accountNumber: parsedJson["accountNumber"],transferType:parsedJson["transferType"])
| FIELDS_REMOVE(parsedJson)
Test the rule before enabling the rule.
Here you have examples.
Hope it helps.
Regards,
Elena.
09 Sep 2024 02:50 PM
thanks so much
10 Dec 2024 11:54 AM
Hello @erh_inetum
I require your help in interpreting an error code for parsing/presentation as a table field.
2024-12-10 09:44:45.255 ERROR [users,CIBW,9f812ead596fb3f1fb1c3c10e0ffafb5,8a17037d4d18df4a,CIBW12100943945135fe9f48ab6b346d56b,http-nio-8080-exec-6] com.abcdefg.ib.commons.advice.ErrorAdvice.handleIntegrationException:92 | Boom! Code: E000000, Message:E000000,
Regards,
Babar
10 Dec 2024 01:01 PM
Hi Babar,
Sorry but I don't understand exactly what you need to.
Do you need to capture what goes behind ERROR and Code?
Could you explain a bit more what you need, please?
Thanks in advance.
Elena.
11 Dec 2024 04:22 AM
Hello @erh_inetum
I aim to extract solely the Code: E000000 from the error logs and present it in a tabular format within the logs.
Regards,
Babar