Skip to content

Instantly share code, notes, and snippets.

@skokenes
skokenes / docker-compose.yml
Created April 7, 2020 15:36
Qlik Core Bug Example: crashing when empty dimension added to hypercube
version: "3.5"
services:
qix-test:
container_name: "qix-test"
image: qlikcore/engine:12.612.0
command: -S AcceptEULA=yes -S SystemLogVerbosity=3 -S DocumentDirectory=/data
volumes:
- ./data:/data
ports:
- 9077:9076
@skokenes
skokenes / index.js
Created September 26, 2019 14:25
SVG Path Generator for Rounded Rectangles
function createRoundedRectPath(x, y, width, height, radius) {
return (
// Move to position, offset by radius in x direction
"M" +(x + radius) + "," + y
// Draw a horizontal line to the top right curve start
+ "h" + (width - 2 * radius)
// Draw the top right corner curve
+ "a" + radius + "," + radius + " 0 0 1 " + radius + "," + radius
// Draw a vertical line to the bottom right corner
+ "v" + (height - 2 * radius)
@skokenes
skokenes / d3formatting.css
Created March 29, 2019 22:51 — forked from zanarmstrong/d3formatting.css
formatting numbers example
body {
margin: 20px 0px 0px 50px;
}
.formattext {
text-align: right;
}
.formatresult {
text-align: left;
@skokenes
skokenes / App.js
Created November 1, 2018 14:58
Using context and hooks to serve RxQ Handles
import React from "react";
import QaeProvider from "./qae/qae-provider";
export default () => {
<div className="App">
<QaeProvider>
{/* any children in here can read from the context */}
</QaeProvider>
</div>
}
@skokenes
skokenes / load.js
Created August 21, 2018 20:24
Loading a CSV with Qlik Core
const { connectSession } = require("rxq");
const { concat } = require("rxjs");
const { switchMap, shareReplay, take, tap } = require("rxjs/operators");
const config = {
host: "localhost",
port: 19076
};
// Engine Session
@skokenes
skokenes / sorted-dimension-hypercube.json
Created August 16, 2018 14:53
Sort a Dimension in a HyperCube
{
"qDimensions": [
{
"qDef": {
"qFieldDefs": ["AR Date Group Description"],
"qSortCriterias": [
{
"qSortByAscii": 1
}
]
@skokenes
skokenes / null-suppression-hypercube.json
Created August 16, 2018 14:48
HyperCube with Null Suppression
{
"qDimensions": [
{
"qDef": { "qFieldDefs": ["AR Date Group Description"]},
"qNullSuppression": true
}
],
"qMeasures": [
{
"qDef": { "qDef": "sum({<[MonthIndex]={[$(=Max(MonthIndex))]}>} [AR Net Balance])" }
@skokenes
skokenes / basic-hypercube.json
Created August 16, 2018 14:48
Basic Hypercube Def
{
"qDimensions": [
{
"qDef": { "qFieldDefs": ["AR Date Group Description"]}
}
],
"qMeasures": [
{
"qDef": { "qDef": "sum({<[MonthIndex]={[$(=Max(MonthIndex))]}>} [AR Net Balance])" }
}
@skokenes
skokenes / index.js
Last active August 10, 2018 21:01
model$ for recompose + rxjs
function createModel(propsConfig = {}, sideEffects = []) {
const entries = Object.entries(propsConfig);
const props$ = combineLatest(...entries.map(entry => entry[1])).pipe(
map(values =>
values.reduce((props, currValue, currIndex) => {
const propName = entries[currIndex][0];
return {
...props,
[propName]: currValue
};
@skokenes
skokenes / Qlik Core Command Line Interface Proposal.md
Last active May 8, 2018 22:38
A proposal for a Qlik Core CLI tool for quickly working with QVFs

Proposal

A CLI tool that leverages Qlik Core to report on basic metadata about a QVF.

Motivation

Qlik Core leverages QVF files to store data models that you can interact with via the Qlik Associative Engine. These QVF files, like any file, are black boxes until you open them up and look inside. While developing solutions on top of Qlik Core, it can be difficult to understand what is going on with your QVF - what data is in there, what objects, etc. Writing scripts via enigma.js or RxQ to simply get a list of fields from a QVF that you are building on top of is cumbersome.

Eventually, I expect that Qlik, partners, and customers will build an ecosystem of nice dev tools for working with Core. In the meantime, I propose a CLI tool as a first step that can provide key metadata about QVFs in a quick and easy way.

Existing Solutions

There are no published solutions (that I'm aware of) today for easily working with Core across platforms. [Alex Karlsson](https://twitter.com/mindspank/status/99111532994953216