13 Apr 2024 04:53 PM - last edited on 15 Apr 2024 09:51 AM by MaciejNeumann
I am looking for parse command to seperate below content from the logs, those are comma seperated
INSERT,STATISTIC,,"205456",679,"","SmSyServerPlugin","",59998,"DBP_Total_Request_Sent_Count","oioujio|ALL",0,0,0,0,0,"",1713015899987,0,"sgy",0,0,0,PC,0,0,0,0,0
Solved! Go to Solution.
15 Apr 2024 07:49 AM
Hi,
You have here a Dynatrace Pattern Language example.
If you are in Grail, I recommend you DPL Architect.
Best regards
15 Apr 2024 10:35 AM
Example:
data record(line = "INSERT,STATISTIC,,\"205456\",679,\"\",\"SmSyServerPlugin\",\"\",59998,\"DBP_Total_Request_Sent_Count\",\"oioujio|ALL\",0,0,0,0,0,\"\",1713015899987,0,\"sgy\",0,0,0,PC,0,0,0,0,0")
| fieldsAdd splitLine = splitString(line, ",")
| fieldsAdd field1 = splitLine[0], field2 = splitLine[1], field3 = splitLine[2]