jamesbondski / qvdlib Goto Github PK
View Code? Open in Web Editor NEWA library for reading QlikView Data files
License: Apache License 2.0
A library for reading QlikView Data files
License: Apache License 2.0
I have QVD file and I have parse the QVD with this helper, But I am not getting the correct data, Data comes in the field are incorrect.
To implement writing qvd files the following steps will be taken:
Testing with a QVD generated using the sample test script, I'm not getting the correct values. In the screen below, Dim2 should have the Values a, b, c, d, e, or f, but it's coming back with numeric values.
Here's my test app:
using System.IO;
using System.Text;
using Bondski.QvdLib;
Console.WriteLine("Hello, World!");
var fileName = "C:\\Transactions.qvd";
QvdReader reader = new QvdReader(fileName);
var data = new List<List<string>>();
var headerRow = new List<string>();
foreach (var fieldName in reader.Header.Fields)
{
headerRow.Add(fieldName.Name);
}
data.Add(headerRow);
var capRows = false;
var maxRowCount = 10000;
var iterator = 0;
while (reader.NextRow() && (iterator < maxRowCount || !capRows))
{
var row = new List<string>();
foreach (var fieldName in reader.Header.Fields)
{
row.Add(reader[fieldName.Name].ToString());
}
data.Add(row);
iterator++;
}
Console.WriteLine("test");
Qlik Test Script to generate the QVD I'm using:
Characters:
Load Chr(RecNo()+Ord('A')-1) as Alpha, RecNo() as Num autogenerate 26;
ASCII:
Load
if(RecNo()>=65 and RecNo()<=90,RecNo()-64) as Num,
Chr(RecNo()) as AsciiAlpha,
RecNo() as AsciiNum
autogenerate 255
Where (RecNo()>=32 and RecNo()<=126) or RecNo()>=160 ;
Transactions:
Load
TransLineID,
TransID,
mod(TransID,26)+1 as Num,
Pick(Ceil(3*Rand1),'A','B','C') as Dim1,
Pick(Ceil(6*Rand1),'a','b','c','d','e','f') as Dim2,
Pick(Ceil(3*Rand()),'X','Y','Z') as Dim3,
Round(1000*Rand()*Rand()*Rand1) as Expression1,
Round( 10*Rand()*Rand()*Rand1) as Expression2,
Round(Rand()*Rand1,0.00001) as Expression3;
Load
Rand() as Rand1,
IterNo() as TransLineID,
RecNo() as TransID
Autogenerate 1000
While Rand()<=0.5 or IterNo()=1;
Comment Field Dim1 With "This is a field comment";
STORE Transactions into "Transactions.qvd" (qvd);
As a first step, make the default implementation asynchronous and have the synchronous one simply wait for it.
Since each row has a fixed byte size, the parsing of the index and corresponding value can be parralelized. Preserving the original order may be a bit tricky, so first implementation should ignore that. Using several threads should be a configurable feature anyway, so if people want the correct order, they can just make it single-threaded.
If I do find a good way to do it, preserving row order would be another configurable option.
As part of this feature, use benchmarks to make sure performance is actually improving.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.