Git Product home page Git Product logo

node-qvx's Introduction

node-qvx

Read and Write Qlik QVX data using Streams

Status

Build Status

Documentation needs to so please have a look at the tests.

Have a look at https://github.com/kmpm/node-qvxserver for a Hapi based webserver that will give you qvx data.

There is a live demo of this library at https://qvx-demo.herokuapp.com that pulls information from http://www.scb.se/api and converts to qvx.

Installation

npm install

There is a dependency on a module called bignum that uses some native SSL libraries for handling 64 bit integers. This dependency might be tricky to install in windows. Go to https://slproweb.com/products/Win32OpenSSL.html and download the latest full version of OpenSLL and install it to it's default location. That might help.

Examples

Outbound

Have a look at https://github.com/kmpm/node-qvxserver for a Hapi based webserver that will give you qvx data that for example QlikView can read. Also look at tests/outbound.tests.js and test/schema.tests.js.

Since the process is quit simple but quite verbos it's not suitable for the readme but you basically do.

  1. Create a field definition with datatypes
  2. Create a resuable schema instance using these field definitions
  3. From a stream of objects that match the field definition, pipe through the schema instance.

Inbound

This shows a use of Inbound, something that you would do if you needed to read qvx data from somewhere. It's used internally for testing and validation.

var concat = require('concat-stream');
var JSONStream = require('JSONStream');
var fs = require('fs');

var qvx = require('qvx');

var inbound = new qvx.Inbound({recordFormat: 'object'});
var fileStream = fs.createReadStream('test_expressor.qvx');
var stringify = JSONStream.stringify(false);

fileStream
.pipe(inbound)
.pipe(stringify)
.pipe(concat(function (body) {
  console.log(body);
}));

There is currently also a cli that is really quick and dirty. It just takes a qvx as input and outputs the records as arrays.

qvxcat test/fixtures/test_expressor.qvx

This will just print the records as JSON arrays.

Resources

node-qvx's People

Contributors

kmpm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.