Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

QV loads only 20% of data from a txt

Dear all,

I really don' t know where to look at anymore.

I have a series of txt files (monthly orders line) that are loading fine.

This one instead, is loading only ~30k lines out of a total of ~147k lines.

Excel loads all the line, Access loads all the lines, QV not.

I really don't know what is wrong. I also checked in Excel if there were duplicated rows, but I could find only 200, so a negligible amount.

I know it is a long shot, but do you have any idea why this could possibly happen??

thank you so much!

stupid oracle.JPG.jpg

Tags (2)
1 Solution

Accepted Solutions
rajeshvaswani77
Valued Contributor III

Re: QV loads only 20% of data from a txt

Hi Eric,

I have also faced this.

At that point the txt file would not have the file structure in the expected format.

Depends on the delimiter. you would have to find that line and provably cleanse.

Alternately if you use a splitter tool and split file in some 10 parts, you will find it easy to narrow down to the problem area.

Hope this helps.

thanks,

Rajesh Vaswani

12 Replies
rajeshvaswani77
Valued Contributor III

Re: QV loads only 20% of data from a txt

Hi Eric,

I have also faced this.

At that point the txt file would not have the file structure in the expected format.

Depends on the delimiter. you would have to find that line and provably cleanse.

Alternately if you use a splitter tool and split file in some 10 parts, you will find it easy to narrow down to the problem area.

Hope this helps.

thanks,

Rajesh Vaswani

Not applicable

Re: QV loads only 20% of data from a txt

I ran into a similar issue.  I found special escape characters in my file that was killing it. The good news is that you know exactly where it failed in the file.  So look at lines 30645 and 30646 with a good text editor that can view escape characters (Notepad++ or SciTE), and see if there is anything odd.

mov
Esteemed Contributor III

Re: QV loads only 20% of data from a txt

Try to add option No EOF.  From help:

no eof

If this option is used, ASCII character 26 which otherwise denotes
end-of-file is disregarded. If this specifier is used, character 26 can be part
of a field value.

Regards,

Michael

Re: QV loads only 20% of data from a txt

This is frequently caused by an improperly escaped delimiter. For example, the input file using quoting but double quote appears in the data, like 17" Screen. Look at the data around where it's failing as others have suggested.

-Rob

Not applicable

Re: QV loads only 20% of data from a txt

thanks for the suggestions.

I had a peek in Excel at that row .

Indeed there is a cell with this text

F├£R FORSCHUNG  "

If I understood your comments right, it is the " causing problems; the character ├ , looking pretty odd, should be digested by QV?

EDIT: setup delimiter n the script is actually

delimiter is '\t'

so why is the " causing troubles? Shouldn't it be seen as a normal character?

A point which is more important.

Don't you think this is a huge pitfall of QV? Now I could spot this error because the delimiter character was luckily placed at the beginning of the source.

How about it happens close to the end, when 90% of records are loaded?
I would never notice that and QV would not warn me.

I see this as a severe pitfall.

Re: QV loads only 20% of data from a txt

I'm guessing you also have the "msq" spec in your load? That would tell QV that that quotes are properly escaped, and if they are not the results are unpredictable.

-Rob

Not applicable

Re: Re: QV loads only 20% of data from a txt

Dear Rob,

actually, this appears to be the end of my load script

FROM

(txt, utf8, embedded labels, delimiter is '\t', msq);

So, if I understood you rightly, that should have avoided for QV to get into troubles with the ".

But it did not!

Re: Re: QV loads only 20% of data from a txt

No, the MSQ will not avoid the problem. It specifies that quotes are properly escaped and balanced. If not, you will have problems. So perhaps you should remove the msg for your case.

-Rob

Not applicable

Re: Re: QV loads only 20% of data from a txt

Dear Rob,

thanks for the tip.

I actually removed the MSQ parameter from the string and the load works smoothly.

Can you please make me understand what is the added value of having the MSQ parameter?

thanks!

Community Browser