Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load a CSV file

Hi

I have this troublesome table which is exported to a .csv file from a very old system.

To make sense out of the data I need to use this "fixed record" option in the wizard. So I make a lot of fixed fields, which the system auto name wiht a "@xx..." syntax. Afterwards I press finish in the wizard, and it the loads the script where I get all these Load "@xx, @xy, ...", if I do a reload or try to do something else, making a table from the fields, it does not work, and there is no table in the table viewer.

Any ideas?

Some of data is just vertical lines, which I of course intent to delete!           

Labels (1)
14 Replies
Not applicable
Author

Thx for the enthusiasm, I did create a simple dummy .csv (code dos 850) from OO. It is not the exact same issue, where the original file is from an old ERP system. Though I got the same problem, so perhaps it is an issue that QV dont like OO.

rbecher
Partner - Master III
Partner - Master III

It's easy if it's only an empty row before the header. You can use "header is 1 lines":

LOAD ID,

     number,

     A,

     B,

     C,

     sum

FROM

[Test dummydata.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 1 lines);

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
vadimtsushko
Partner - Creator III
Partner - Creator III


-Mikael- написал(а):

Thx, I did try that:

1. how can I change/define the field names from there?

Answer to your first question: Change your load statement to something like

LOAD @1:1 as Field1,

     @2:11 as Field2,

......

     @131:n as AnotherFeldName

FROM

Not applicable
Author

Thx, but I was looking for a way to name the fields within the wizard, so I dont need to rename them in the script.  

Not applicable
Author

well, thx in this case it works well, from the real table I need to do fixed separator in OO, so the first line get mixed up anyway.

But that is a minor problem, can you load and reload my CSV file without any issues? Do you have Excel?