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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

multiple field separators in script

I have the following issue:

My input file has two record separators, fields 1 to n are separated by '&', and n to last are separated by tab. Is there an option to easily load the entire table in one load statement?

regards,

Hellmar

3 Replies
hectorgarcia
Partner - Creator III
Partner - Creator III

hellmar can you post an example please about how looks your original data ?

Hector

Not applicable
Author

like this:

(see attachment)

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You could load it using tab as a delim. All the & delimited fields would wind up in the first field. Parse those in a preceeding load using subfield(F1, '&',n).


LOAD
subfield(F1,1) as netmindsid,
subfield(F1,2) as ext_ref,
etc...
;
LOAD
[netmindsid&ext_ref&aid_seq&atyp_seq&aid1&aid2&aid3&aid4&aid5&atyp1&atyp2&atyp3&atyp4&atyp5&starttime&s_viewtime&s_depth&aid_last&atyp_last] as F1,
Sessions,
Clicks,
StartClicks,
EndClicks,
ViewTime,
AvgViewTimePerClick,
AvgViewTimePerSession,
AvgClicksPerSession,
SessionClicks,
SessionViewTime,
SessionAvgViewTimePerClick,
SessionAvgViewTimePerSession,
SessionAvgClicksPerSession
FROM sample.txt (ansi, txt, delimiter is '\t', embedded labels, msq);


-Rob