Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sangland2
Partner - Creator
Partner - Creator

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
Frank_Hartmann
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
qlikviewwizard
Master II
Master II

Can you attach the sample file?

shiveshsingh
Master
Master

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

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

sangland2
Partner - Creator
Partner - Creator
Author

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)

;

sangland2
Partner - Creator
Partner - Creator
Author

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.

Frank_Hartmann
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 ',');

sangland2
Partner - Creator
Partner - Creator
Author

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

Frank_Hartmann
Master II
Master II

I get 37665 lines not including the header!

Unbenannt.png

sangland2
Partner - Creator
Partner - Creator
Author

Strange, I get 33957 this time. Re log file