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
const enigma = require('enigma.js'); | |
const WebSocket = require('ws'); | |
const schema = require('enigma.js/schemas/12.170.2.json'); | |
let qlik = { | |
session: {}, | |
global: {}, | |
doc: {}, | |
details: { | |
host: 'localhost', |
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
// to convert from Julian Date to normal Date (Gregorian) | |
// subtract the offset 2415019 (equivalent to 30.12.1899, which is day 0 in QlikView): | |
Date(JulianDateField - 2415019) | |
//You probaly have to adjust the timezone since Julian Date is in UTC. | |
// to convert from normal Date (Gregorian) to Julian Date | |
// add the offset 2415019 (equivalent to 30.12.1899, which is day 0 in QlikView): |
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
SET NULLINTERPRET=NULL; | |
Orders: | |
LOAD * INLINE [ | |
OrderID, OrderDate | |
112233, 1/2/2008 | |
223344, 2/2/2008 | |
334455, NULL | |
445566, NULL | |
556677, 3/3/2008 |
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
Raw: | |
Load * Inline [ | |
Month | |
2014-01 | |
2014-02 | |
2014-03 | |
2014-04 | |
2014-05 | |
]; |
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
// The idea is to create a master item visualisation from | |
// an existing dashboard object | |
// If the requirement is to create a master item from json (exported from another app) | |
// the first step is to create the source object first and the use it | |
// to create the master item and then drop the source (if needed) | |
// Create empty object with type of masteritem | |
let myMasterItem = await qDoc.createObject({ | |
"qInfo": { | |
"qId": "my-id", |
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
Section Access; | |
LOAD * INLINE [ | |
ACCESS, USERID, PASSWORD, NTNAME | |
ADMIN , admin , admin , * | |
USER , * , * , DOMAIN\USERNAME | |
]; | |
Section Application; |
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
= ((year(vDate2)*12)+month(vDate2)) - (((year(vDate1)*12)+month(vDate1))) |
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
LET t1 = (num(timestamp#('2013-01-11 18:00:00', 'yyyy-mm-dd hh:mm:ss')) - 25569) * 86400; | |
LET t2 = (num(Now(1) - 25569) * 86400; |
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
git clone user@git-server:project_name.git -b branch_name /some/folder |
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
// OrderId = [1,2,3,4,5,6] | |
BulkUpdate(OrderId, function() { | |
console.log('done'); | |
}); | |
function BulkUpdate(OrderId, callback) { | |
Model.update( | |
{ orderid : { $in: OrderId } }, | |
{ $set: { status: 'complete' } }, |
OlderNewer