Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MSQ format truncates data while loading from delimited text file

Hi,

I am reading data from Semicolon delimited Text file in Qlikview.

For first time seen an issue where text file has 1000 records but qlikview read only 300 records.

By default MSQ quoting is been used.

Semicolon delimiter is used.

Could see there are few columns specifically in this text file alone that has semicolon in its value as well.

Just tried reading same file using Standard format with again semicolon delimiter and could see all 1000 records have been read successfully.

Any reason why MSQ quoting dint work here. I got a requirement to read around 15 different text files. In this case which one is better to use whether MSQ quoting or standard one.

Thanks in advance.

Thanks,

Avin

1 Solution

Accepted Solutions
marcus_sommer

MSQ is only an extended option to handle data-structures from txt/csv-files whose field-values are wrapped with some kind of delimiter which should avoid that other chars within them will be interpreted as row-delimieter. If you applied msq the data-structure and your file-format settings needs to fit excactly - if they don't fit it could lead to unpredictable results (read in help).

If you don't have such field-wrapping use no quotes instead of msq and my suggestions from above with recono/rowno to find the reasons. Further if the data-structure from your files is bad then you might need several loadings to get your data maybe at first something like:

LOAD repalce(@1:n, 'x', 'y') FROM temp.txt (fix, codepage is 1252);

which is then the source for your main-load.

Helpful could be if you tried to load your data with the table-wizard. There are many options available to handle unstructured data and it have a pre-view function. Unfortunately is the wizard not well documented but in this book (is generally recommended) you could find examples:

QlikView 11 for Developers

Barry Harmsen und Miguel Garcia

ISBN-13: 978-1849686068

- Marcus

View solution in original post

4 Replies
marcus_sommer

It will be depend from the datastructure in those files if it's adviseable to use msq or not. In most cases it's not necessary to use it - I personal load each txt-file without msq.

I think you should simply try it with the different options and add a recno() and rowno() to your loads to make sure that all records are loaded and if not you could see which one is (why) missing.

- Marcus

Not applicable
Author

Thanks Marcus. However trying to understand any use case or specific example why we would go for msq format and why data is truncated while using msq.

Thanks,

Avin

marcus_sommer

MSQ is only an extended option to handle data-structures from txt/csv-files whose field-values are wrapped with some kind of delimiter which should avoid that other chars within them will be interpreted as row-delimieter. If you applied msq the data-structure and your file-format settings needs to fit excactly - if they don't fit it could lead to unpredictable results (read in help).

If you don't have such field-wrapping use no quotes instead of msq and my suggestions from above with recono/rowno to find the reasons. Further if the data-structure from your files is bad then you might need several loadings to get your data maybe at first something like:

LOAD repalce(@1:n, 'x', 'y') FROM temp.txt (fix, codepage is 1252);

which is then the source for your main-load.

Helpful could be if you tried to load your data with the table-wizard. There are many options available to handle unstructured data and it have a pre-view function. Unfortunately is the wizard not well documented but in this book (is generally recommended) you could find examples:

QlikView 11 for Developers

Barry Harmsen und Miguel Garcia

ISBN-13: 978-1849686068

- Marcus

Not applicable
Author

Thanks Marcus for the detailed explanation.