Trace Row Count on dremio

Hi Team,

Is there a way to trace from Dremio logs or from somewhere else to trace how many rows are fetched by each user by executing queries.
for example user1 has fetched 10 rows by executing query “select * from emp”

I want to track these details for all kind requests executed by our users.

@nitil.dwivedi, you can find the number of output (returned) records for each query along with the name of the user that executed the query in the Job’s page of the Dremio UI. This information is also persisted in a JSON log on the Dremio coordinator, called queries.json. For highly detailed information about how many records were scanned for each table selected from in the query, you would have to go to the query profile.

@ben, Can I access job API in Dremio as data source ?
If yes, please guide me on the way to that ?.

@ben, Please update me on above question

Also, I tried to access dremio in postman via get method, using the below URL.Its not working.Please guide


@nitil.dwivedi, are you trying to access the job results or the status of a job?

In either case, you will first login with your credentials and get an authorization token. For example:

POST {DREMIO_ORIGIN}/apiv2/login

with JSON body:

{ "userName": "your-username", "password": "your-password" }

The response body will have a token and you’ll add this token with the prefix _dremio as the value for the Authorization header in all subsequent requests.

To get the job status which, has the row count, you would need the job id and use a GET. With what you provided it would be:

GET localhost:9047/api/v3/job/21f63f1c-c3b4-7530-2042-64e264cba400

And to get, for example, the first 100 rows of the actual results set, the request would be:

GET localhost:9047/api/v3/job/21f63f1c-c3b4-7530-2042-64e264cba400/results?offset=0&limit=100