Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Incomplete load of CSV files

When loading a CSV file using:(txt, codepage is 1252, embedded labels, delimiter is ',', msq)  the load stops before it reaches the end of the file. There is no error but not all the data is loaded. This is because text fields in the file have not been quoted, as they should, so the number of fields being loaded is different when it hits this line. An error should be thrown, surely? 

1 Solution

Accepted Solutions
Highlighted
Master II
Master II

I guess its because some of your fields contains values like "".

If you omit the msq then it works fine!

try like this:

LOAD

     Rowno() as Row,

     oid,

     cost,

     createDate,

     createdBy,

     customerOrderNumber,

     discount,

     expiryDate,

     margin,

     myAddress,

     myAssignedUser,

     myCRMOrganisation,

     myCRMSOSalesOrder,

     myGTSalesPerson,

     myQuoteStage,

     type,

     quoteNumber,

     summary,

     total,

     mySAModule,

     myCRMContact

FROM

(txt, codepage is 1252, embedded labels, delimiter is ',');

View solution in original post

11 Replies
Highlighted
Master II
Master II

Can you attach the sample file?

Highlighted
Master
Master

This needs to be checked, can you share the sample file?

Highlighted
Contributor III
Contributor III

Most likely cause is an unexpected character. This can happen when the file was created with utf-8 and in qlikview the character set Western European is choosen. Or vice versa. Try changing the character set used to read the data.

(txt, codepage is 1252, embedded label, delimiter is ',', msq);

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

Highlighted
Partner
Partner

Hi Guys sorry for the delay, it is a large file that contains client data. I have scrambled the data without affecting the problem. The issue occurs after loading 34295 rows, but there are 37666 rows. It doesn't matter which field(s) you load. If you open the csv file in Excel and save it back to csv it will load fine. Probably a hidden character in the data?

CRMQuote:

Load

summary

FROM

[CRMQuote3.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq)

;

Highlighted
Partner
Partner

Both methods have the same problem. But my issue is that QV fails to load all the data and does not warn you. I found this in testing but it could easily have gone unnoticed.

Highlighted
Master II
Master II

I guess its because some of your fields contains values like "".

If you omit the msq then it works fine!

try like this:

LOAD

     Rowno() as Row,

     oid,

     cost,

     createDate,

     createdBy,

     customerOrderNumber,

     discount,

     expiryDate,

     margin,

     myAddress,

     myAssignedUser,

     myCRMOrganisation,

     myCRMSOSalesOrder,

     myGTSalesPerson,

     myQuoteStage,

     type,

     quoteNumber,

     summary,

     total,

     mySAModule,

     myCRMContact

FROM

(txt, codepage is 1252, embedded labels, delimiter is ',');

View solution in original post

Highlighted
Partner
Partner

Hi Frank how many rows do you get compared to rows on the file.?

Highlighted
Master II
Master II

I get 37665 lines not including the header!

Unbenannt.png

Highlighted
Partner
Partner

Strange, I get 33957 this time. Re log file