How to popup a warning/error message

For our custom plugin, I want to show the data result, but also popup a warning message like “Data size is 1m, please wait…”.

Currently, I am using “throw UserException()”. The error message could display,but the data cannot be shown.

I hope the message could be shown like below.

Hi @ben, @balaji.ramaswamy, could you advise any dialog or message box is provided by dremio instead of using Exception to interrupt he data display?

Thanks in advance.

@popejune, the actual count of records in the result set is not really available until the query is finished so you can only really report an estimate. I’m not sure what RESTful endpoint you can call to get such an estimate. I suggest looking at what requests Dremio makes when you are viewing the Job summary or job profile entry in the Jobs page and see if any of those supply the appropriate information.

Thanks @ben for your response. I could get the total count at the first page query. So it’s not an issue.

Currently, the issue is how to popup a dialog, which could let user notice it, and not interrupt the data continuous query and display either. Could you please advise?

@popejune Plugins have no direct interaction with the UI layer outside of the plugin configuration screen, and if you consider the client connections like JDBC/ODBC, this makes sense. You would need to put the message someplace where the UI could access it, but wouldn’t interrupt other normal client access like JDBC/ODBC/REST. I don’t see an easy path forward, even if you are willing to extensively customize the UI code.

Thanks @patricker

How to do this? Is there any existing plugin do like this? I could refer to the code.

@popejune I don’t think any existing plugin is doing this. If you wanted to try customizing this yourself, you might look into the Job definition, and see if there is a way to access this from inside a custom plugin.

But, I don’t think the job object is exposed to the plugin’s, just the plan that the plugin needs to execute.