I don't see a correlationID in your sample data. Is it a root node in JSON or is it in contents as well? I will assume a root JSON. (See my new emulation below.) Importantly, I am speculating that...
See more...
I don't see a correlationID in your sample data. Is it a root node in JSON or is it in contents as well? I will assume a root JSON. (See my new emulation below.) Importantly, I am speculating that you want to group all values of these three fields by correlationID. Is this the requirement? I will assume yes. Normally, data people will want to go the path in my previous comment because you don't want to mix-and-match BatchId, RequestID, and Status. Do you care whether the order are mixed up? The result display you illustrated doesn't answer this question. I will assume that you do care about order of appearance. (But I do want to warn you that three ordered list of > 100 values are not good for users. I, for one, would hate to look at such a table.) If so, you must answer yet more important questions: Do your data contain identical triplets (BatchId, RequestID, Status) with any given correlationID? If they do, do you care to preserve all triplets? If you want to preserve all triplets, do you care about the order of events that carry them? Or do you want to filter out all duplicates? If you want to remove duplicate triplets, do you care about the order of events that carry them? If you care about the order, what are the criteria to order them? See, volunteers in this board have no intimate knowledge about your dataset or your use case. Illustrating a subset of data in text is an excellent start. But you still need to define the problem to the extent another person who don't have your knowledge to sieve through your data and arrive at the same conclusion as you would get - all without SPL. If the other person is to read your mind, 9 times out of 10 the mindreader will be wrong. Below I give an emulation that includes a correlationID as root node: | makeresults
| eval _raw = "{\"content\" : {
\"List of Batches Processed\" : [ {
\"P_REQUEST_ID\" : \"177\",
\"P_BATCH_ID\" : \"1\",
\"P_TEMPLATE\" : \"Template\",
\"P_PERIOD\" : \"24\",
\"P_MORE_BATCHES_EXISTS\" : \"Y\",
\"P_ZUORA_FILE_NAME\" : \"Template20240306102852.csv\",
\"P_MESSAGE\" : \"Data loaded in RevPro Successfully - Success: 10000 Failed: 0\",
\"P_RETURN_STATUS\" : \"SUCCESS\"
}, {
\"P_REQUEST_ID\" : \"1r7\",
\"P_BATCH_ID\" : \"2\",
\"P_TEMPLATE\" : \"Template\",
\"P_PERIOD\" : \"24\",
\"P_MORE_BATCHES_EXISTS\" : \"Y\",
\"P_ZUORA_FILE_NAME\" : \"Template20240306102852.csv\",
\"P_MESSAGE\" : \"Data loaded in RevPro Successfully - Success: 10000 Failed: 0\",
\"P_RETURN_STATUS\" : \"SUCCESS\"
}, {
\"P_REQUEST_ID\" : \"1577\",
\"P_BATCH_ID\" : \"3\",
\"P_TEMPLATE\" : \"Template\",
\"P_PERIOD\" : \"24\",
\"P_MORE_BATCHES_EXISTS\" : \"Y\",
\"P_ZUORA_FILE_NAME\" : \"Template20240306102852.csv\",
\"P_MESSAGE\" : \"Data loaded in RevPro Successfully - Success: 10000 Failed: 0\",
\"P_RETURN_STATUS\" : \"SUCCESS\"
}, {
\"P_REQUEST_ID\" : \"16577\",
\"P_BATCH_ID\" : \"4\",
\"P_TEMPLATE\" : \"Template\",
\"P_PERIOD\" : \"24\",
\"P_MORE_BATCHES_EXISTS\" : \"Y\",
\"P_ZUORA_FILE_NAME\" : \"Template20240306102852.csv\",
\"P_MESSAGE\" : \"Data loaded in RevPro Successfully - Success: 10000 Failed: 0\",
\"P_RETURN_STATUS\" : \"SUCCESS\"
}]
},
\"correlationID\": \"125dfe5\"
}"
| spath
``` data emulation above ```