Hue in Your Project

Some modules of Hue like the SQL parsers or UI Components can be imported independently as dependencies into your own apps. There are two ways to get them:

npm registry

npm install gethue

Will install the latest from https://www.npmjs.com/package/gethue. Then import the module you need with something like below:

import sqlAutocompleteParser from 'gethue/parse/sql/hive/hiveAutocompleteParser';

UI components can be imported in a similar way.

import 'gethue/web/er-diagram';

Local dependency

Checkout Hue and cd to the demo app. Steps are similar if you would like to use your own app instead of the demo app (hue_dep).

cd tools/examples/api/hue_dep

npm install
npm run webpack
npm run app

In hue_dep package.json add a dependency on Hue:

"dependencies": {
  "hue": "file:../../.."
},

Now let's import the Hive parser:

import sqlAutocompleteParser from 'hue/desktop/core/src/desktop/js/parse/sql/hive/hiveAutocompleteParser';