This message was deleted.
# general
s
This message was deleted.
j
Within Imply our professional services org built a Broker log parsing tool that pulls out the query info, parses it and dumps it in structured form into a datasource for analytical analysis in Pivot. This is an internal use tool only and is not productized ... but it does seem like it could be pretty useful as a new product feature (e.g. a Query/Performance Analyzer) ... so I think you are definitely on to a good idea 🙂
u
Thanks John! Good to see I'm atleast on some right track. Will keep this thread updated with any further update I make on this
Hey @John Kowtko, I wanted to ask whether you'd know what was the logic for distinguishing system generated SQL queries vs those submitted by the users? System generated query : {"sqlQuery/time":48,"sqlQuery/planningTimeMs":20,"sqlQuery/bytes":3,"success":true,"identity":"allowAll","context":{"sqlQueryId":"5a96b1e8-4d09-48ea-82b6-929670b0067a","queryId":"5a96b1e8-4d09-48ea-82b6-929670b0067a","nativeQueryIds":"[]"}} {"query":"SELECT\n \"datasource\", \"type\", COUNT(*) AS \"num_running_tasks\"\nFROM sys.tasks WHERE \"status\" = 'RUNNING' AND \"runner_status\" = 'RUNNING'\nGROUP BY 1, 2","context":{"sqlQueryId":"5a96b1e8-4d09-48ea-82b6-929670b0067a","queryId":"5a96b1e8-4d09-48ea-82b6-929670b0067a","nativeQueryIds":"[]"}} User generated query {"sqlQuery/time":60,"sqlQuery/planningTimeMs":6,"sqlQuery/bytes":167773,"success":true,"identity":"allowAll","context":{"sqlQueryId":"bf713cee-f776-459e-86dd-ba00f331edbd","sqlOuterLimit":1001,"queryId":"bf713cee-f776-459e-86dd-ba00f331edbd","nativeQueryIds":"[bf713cee-f776-459e-86dd-ba00f331edbd]"}} {"query":"SELECT *\nFROM \"chart_1068-v3\"","context":{"sqlQueryId":"bf713cee-f776-459e-86dd-ba00f331edbd","sqlOuterLimit":1001,"queryId":"bf713cee-f776-459e-86dd-ba00f331edbd","nativeQueryIds":"[bf713cee-f776-459e-86dd-ba00f331edbd]"}}
j
Hi Utkarsh ... if those are the actual LoggingRequestLogger entries from the Broker file ... then the only "best practice" I know of is to add queryId or sqlQueryId context to either one of the queries to tag them for categorization.