Skip to content

Instantly share code, notes, and snippets.

domain: "A00_Raw_Rand"
name: "FakeDataProvider"
load: true
live_data: false
parameters: {}
url: "fakir"
method: "POST"
headers:
"Content-Type": "application/json"
data: "[{\"values\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],\"chartParam\":\"label\",\"type\":\"label\",\"name\":\"label\"},{\"min\":80,\"chartParam\":\"value\",\"type\":\"number\",\"digits\":4,\"name\":\"value\",\"max\":120}]"
def replace_empty_string_by_null($input):
if $input == "" then null else $input end
;
def get_content($input):
if $input.type == "title" then $input.title[0].plain_text
elif $input.type == "select" then try $input.select.name catch null
elif $input.type == "multi_select" then replace_empty_string_by_null([ $input.multi_select[].name ] | join("|"))
elif $input.type == "files" then replace_empty_string_by_null([ $input.files[].external.url ] | join("|"))
else $input
round(a) = floor(a) + floor((a - floor(a)) * 2)
cast_dates_to_string_at_insertion: false
In prepared dataset vqb : (Date - 25569) * 24 * 60 * 60 * 1000 * 1000 * 1000
In mongo vqb : (Date - 25569) * 24 * 60 * 60 * 1000 * 1000
@pouc
pouc / date-requester-hierarchy.json
Created February 28, 2021 20:54
tc2 date requester hierarchy
hierarchy:
id: [
"label"
]
parent: [
"parent"
]
@pouc
pouc / custom-step-mongo-replace.json
Created February 28, 2021 09:51
Replace in string in custom mongo step
[
{
"$project": {
"KPI": 1,
"KPI2": {
"$reduce": {
"input": {
"$split": [
"$KPI",
"_"
@pouc
pouc / Reuse session.js
Created March 12, 2020 16:10
Enigma tips & tricks
import winston from 'winston';
import enigma from 'enigma.js';
import ws from 'ws';
import path from 'path';
import fs from 'fs'
import jwt from '../jwt.js';
const qixSchema = JSON.parse(fs.readFileSync(path.resolve('node_modules/enigma.js/schemas/12.170.2.json'), 'utf8'));
# Create drive in /mnt/data
sudo apt-get update
sudo apt-get install xfsprogs
sudo lsblk
# Check device name
sudo mkfs -t xfs /dev/xvdf
sudo mkdir /mnt/data
{
"agent": {
"metrics_collection_interval": 60
},
"metrics":{
"namespace":"QlikFrancePlatform",
"append_dimensions": {
"InstanceId": "${aws:InstanceId}",
"InstanceType": "${aws:InstanceType}"
},