Matt
03/19/2021, 1:55 AMlog
and want to extract values based on keys (urlpath
). So tried to use JSONIndex however fails during parsing. So ingested it as normal string and tried JSONEXTRACTSCALAR/*json_extract_scalar* however this also fails during parsing. Finally I ended up using Groovy function like GROOVY('{"returnType": "STRING", "isSingleValue": true}', 'java.util.regex.Pattern p = java.util.regex.Pattern.compile("(\"urlpath\":\")((?:\\\"|[^\\\"]*))"); java.util.regex.Matcher m = p.matcher(arg0); if(m.find()){ return m.group(2); } else { return "";}',log)
and this works in SQL. Now I want to add this Groovy function inside table config to do ingestionTransform to define a new columnName. Is this possible? For ingestion transform can we do multi line , semi colon separated script?Neha Pawar
Matt
03/19/2021, 2:56 AMserver java.lang.IndexOutOfBoundsException: Index: 6279, Size: 1
at java.util.ArrayList.get(ArrayList.java:435) ~[?:1.8.0_282]
shaded.com.fasterxml.jackson.core.JsonParseException: Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)
Kishore G
Matt
03/19/2021, 4:45 AM{
"message": "\"Executing query =: \"",
"messageobj": "{\"statement\":\"select sysdate from dual\",\"binds\":{},\"opts\":{\"outFormat\":4002,\"autoCommit\":true}}",
"executionContext": "{\"system\":\"test\",\"subsystem\":\"operations\",\"capability\":\"checksettings\",\"resource\":\"simplefireconsumer-chs\",\"transactionid\":\"10ba4d0d-0a63-4a40-be70-92c2a7837e3c\",\"username\":\"--REDACTED--\",\"urlpath\":\"/operations/checksettings/v1/simplefireconsumer-chs/healthcheck\",\"requestheaders\":{\"host\":\"145.72.134.21:3000\",\"user-agent\":\"kube-probe/1.16+\",\"accept-encoding\":\"gzip\",\"connection\":\"close\",\"messageauditid\":\"23cf3b61-acc7-42a7-8fac-2f22506f4652\"}}",
"transactionid": "10ba4d0d-0a63-4a40-be70-92c2a7837e3c",
"correlationid": "",
"sessionid": "",
"sender": "",
"system": "test",
"subsystem": "operations",
"capability": "checksettings",
"resource": "simplefireconsumer-chs",
"urlpath": "/operations/checksettings/v1/simplefireconsumer-chs/healthcheck",
"testloggerversion": "2.0",
"level": "info",
"timestamp": "2021-03-19T04:39:43.822Z"
}
Kishore G
Matt
03/19/2021, 2:18 PM