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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calling data from textfile into qliksense/qlikview

Hi,

I have a .txt file which has data as below:

defect::1234|:defectfrom:Q1111|:defectto::Q9999|:component::billing|:status::completed|:

defect::1235|:defectfrom:Q1111|:defectto::Q1111|:component::billing|:status::pending|:

defect::1236|:defectfrom:Q9999|:defectto::Q1111|:component::payments|:status::open|:


this .txt file has no headers.


My requirement is to pull that data into qliksense and convert it into a .QVD file.


The challenge here is getting the column names/Headers pulled.


can someone guide me on how we can pull such a kind of data


Thanks in Advance.

John

12 Replies
Not applicable
Author

table:

LOAD @1

FROM

(txt, codepage is 1252, explicit labels, delimiter is ',', msq);

table1:

LOAD

subfield(subfield(@1, '|', 1), '::', 2) as Defect,

subfield(subfield(@1, '|', 2), '::', 2) as DefectFrom,

subfield(subfield(@1, '|', 3), '::', 2) as DefectTo,

subfield(subfield(@1, '|', 4), '::', 2) as Component,

subfield(subfield(@1, '|', 5), '::', 2) as Status

Resident table;

drop Table table;

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this, no need of resident load, we can do it using Precedent Load like below

Data:

Load

subfield(subfield(@1, '|', 1), '::', 2) as Defect,

subfield(subfield(@1, '|', 2), '::', 2) as DefectFrom,

subfield(subfield(@1, '|', 3), '::', 2) as DefectTo,

subfield(subfield(@1, '|', 4), '::', 2) as Component,

subfield(subfield(@1, '|', 5), '::', 2) as Status;

LOAD @1

FROM

[data.txt]

(txt, codepage is 1252, no labels, delimiter is '\t', msq);

marcus_sommer

YourField is just a own FieldName for this column - you could call it like you want. If you are following my example above more closely it will work.

- Marcus