The shareable lightweight SQL Editor also called “SQL Scratchpad” comes as its own
<sql-scratchpad /> Web component.
The SQL Scratchpad component is in beta and rapidly evolving. Now is a great time to give it a try and send feedback!
The Scratchpad is hosted within this page and points to demo.gethue.com:
First install the NPM package and import the component lib and its HTML element directly into the Web page:
Then make sure api-url points to a running Hue or Compose APIs. The API is the middleware between your Data Warehouse and Web Browser client and will provide the dynamic content like the list of tables and columns and enrich the autocomplete. The autocomplete is static and powered by the parser selected by the value of dialect.
Specify the credentials for the authentication via username="demo” password="demo”.
Options to look-up a local JWT token or go via Login modal and so not requiring the credentials are coming shortly.
It is also possible to skip the whole
npm install and directly grab the module via: