This repository has been archived by the owner on Jul 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add new tests Move test with option to option section * Add section functionality Update table.md with new option properties * Add test for script prefix * Fix test table prefix script * Add prefix script functionality * Fix line endings and linting * Proof of concept * Fix unique values dual map table Fix timestamp, date, time field types with format Fix validation of hyper cube layout * Add interval field type Refactor HyperCube Add hyper-cube-utils * Update documentation Fix bug duals after refactoring Add new test getItems() * Refactor hyper-cube.js Add more tests (hyper-cube) * Fix #9 Refactor hyper-cube-utils and hyper-cube Add tests for hyper cube Add tests for halyard addHyperCube * Update with changes suggested by StefanEnberg * Improve validate HyperCubeLayout
- Loading branch information
1 parent
041a109
commit 48704f1
Showing
17 changed files
with
2,333 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### `Halyard.HyperCube` | ||
|
||
### `new Halyard.HyperCube( hyperCubeLayout[, options] )` | ||
A hyper cube is the representation of a hyper cube layout made up by a table/tables. If the hyper cube layout contains dual fields each dual field will have a map table associated. | ||
|
||
```javascript | ||
let hyperCube = new Halyard.HyperCube(qHyperCube, "Car Makers"); | ||
``` | ||
|
||
The first parameter is the hyper cube layout, and the second parameter is the options JSON or the hyper cube name. | ||
|
||
#### hyper cube layout | ||
The hyper cube layout needs to have data in qDataPages. Only hyper cubes with qMode equals S for DATA_MODE_STRAIGHT is supported. Example [qHyperCube](../examples/data/hyper-cube.json) | ||
|
||
|
||
### options | ||
Optional parameter. Can be either the hyper cube name as a String, or the following structure: | ||
|
||
| Property | Type | Description | | ||
|----------|--------|-------------| | ||
| `name` | String | The name of the table | | ||
| `section` | String | The name of the script section. If left empty the script is appended to the previous script section | | ||
|
||
An example of using options: | ||
|
||
```javascript | ||
let hyperCube = new Halyard.HyperCube(qHyperCube, { name: 'Data', section: 'Data (HyperCube)' }); | ||
``` | ||
|
||
### `getItems()` | ||
|
||
Returns the items (Halyard.Table) needed to load the hyper cube layout and the options provided. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
# Prerequisites | ||
|
||
Needs a QIX Engine installed. The configurations in this example is for a Qlik Sense Desktop installation but can be changed in the [enigma-config.js](enigma-config.js) file to work with other setups. | ||
Requires NodeJS to be installed. | ||
|
||
# Installation | ||
|
||
In the root folder, type the following: | ||
|
||
- npm install | ||
- npm run build | ||
|
||
Go into the examples folder and type the following in the console: | ||
|
||
- npm install | ||
|
||
# Run | ||
|
||
Make sure that a QIX engine is started (the examples are pre-configured for a Qlik Sense Desktop to be started) | ||
|
||
- node inline-data.js | ||
|
||
| Example | | | ||
| ------- | ---| | ||
| [inline-data.js](inline-data.js) | Loads a local JSON file into QIX engine in a new doc using inline table | | ||
| [local-data.js](local-data.js) | Load a local CSV file into QIX engine in a new doc using folder connection | | ||
| [web-data.js](web-data.js) | Load a table from a web site into QIX engine in a new doc using a webfile connection | | ||
| [session-app.js](session-app.js) | Load a table from a web site into QIX engine in a new doc using a webfile connection | | ||
| [field-list-with-formatting.js](field-list-with-formatting.js) | Load a local CSV file with a defined field list using `type`, `inputFormat`, `displayFormat` and `expr` into QIX engine in a new doc using a folder connection | | ||
| [extending-functionality.js](extending-functionality.js) | How to extend the functionality using a custom item that generates script into QIX engine | | ||
# Prerequisites | ||
|
||
Needs a QIX Engine installed. The configurations in this example is for a Qlik Sense Desktop installation but can be changed in the [enigma-config.js](enigma-config.js) file to work with other setups. | ||
Requires NodeJS to be installed. | ||
|
||
# Installation | ||
|
||
In the root folder, type the following: | ||
|
||
- npm install | ||
- npm run build | ||
|
||
Go into the examples folder and type the following in the console: | ||
|
||
- npm install | ||
|
||
# Run | ||
|
||
Make sure that a QIX engine is started (the examples are pre-configured for a Qlik Sense Desktop to be started) | ||
|
||
- node inline-data.js | ||
|
||
| Example | | | ||
| ------- | ---| | ||
| [inline-data.js](inline-data.js) | Loads a local JSON file into QIX engine in a new doc using inline table | | ||
| [local-data.js](local-data.js) | Load a local CSV file into QIX engine in a new doc using folder connection | | ||
| [web-data.js](web-data.js) | Load a table from a web site into QIX engine in a new doc using a webfile connection | | ||
| [hyper-cube.js](hyper-cube.js) | Load a hyper cube layout from a json file into QIX engine in a new doc | | ||
| [session-app.js](session-app.js) | Load a table from a web site into QIX engine in a new doc using a webfile connection | | ||
| [field-list-with-formatting.js](field-list-with-formatting.js) | Load a local CSV file with a defined field list using `type`, `inputFormat`, `displayFormat` and `expr` into QIX engine in a new doc using a folder connection | | ||
| [extending-functionality.js](extending-functionality.js) | How to extend the functionality using a custom item that generates script into QIX engine | |
Oops, something went wrong.