Vendor 3rd party lib in React based plugin (Druid SQL)


We have a community driven Druid plugin (signed by Grafana) available here ( I have been meaning to work on a feature for sometime but have hit wall with everything I have tried.

Specifically, I have been trying to improve the usability of Druid SQL in the plugin. The results we get back from Druid are just rows and rows of data and to make sense of these results and form them into DataFrames we need to parse user’s SQL query. This is very similar to what the internal postgres plugin does. For this purpose, I am trying to use a Druid SQL parser (available here Since there’s no way to include external packages in a plugin, I thought maybe vendoring them in a third party folder may make it work. This is where I am not sure how to work with this.

  • Should the above library be transpiled from Typescript to JS and then to a single file and then vendored in or is there some better easier way?
  • How do I call (is it OK) javascript functions in the parser library from the plugin.
  • Is it possible to use, will that be a better approach?

Looking for some help here, any pointers will be much appreciated!