Code Monkey home page Code Monkey logo

qvdlib's People

Contributors

jamesbondski avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

peschu123 max4000

qvdlib's Issues

Incorrect Data

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.

Writing qvd files

To implement writing qvd files the following steps will be taken:

  • Class for storing values instead of just using arrays (make it abstract so it can be switched later)
  • Add light-weight solution for storing the actual data
  • Add actual writing functionality for that

Not Getting Correct Values

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.

image

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);

Multi-threaded reading

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.

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.