Extracting SQL from RequestLogEvent

Hi there! I’m using Druid version 0.12.2 and have been trying to use a custom emitter class to capture events of type RequestLogEvent and the corresponding SQL inside these events.

I am using the following CURL command to send a SQL query to the Druid broker:

curl -XPOST -H’Content-Type: application/json’ http://druid-host.net:8082/druid/v2/sql/ -d @query.json

``

where the contents of query.json are:

{“query”: "select * from wikiticker”}

``

Using IntelliJ’s remote debugger (please find the screenshot below), I analyzed the incoming RequestLogEvent and found the query field does not contain the SQL query (i.e select * from wikiticker).

Could someone please help me understand if there is a way to extract the query SQL from the RequestLogEvent? If not, is there any other way to capture the SQL from the request to the broker?

Apologies, my screenshot doesn’t seem to have been attached properly. Please find the screenshot here: https://drive.google.com/file/d/1C68_inynbFeE0QtXmq4oI3mpw0AYefIh/view?usp=sharing

As per my understanding this is not supported yet, the WIP progress PR - https://github.com/apache/incubator-druid/pull/6302 would enable this.

Arup