Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I have one text file and i am trying to load data from that file to qlikview.
The text file have data in multiple tables with the same signature,in between tables some text is there but i want skip that text and i want to load only tables.
I have around 200 tables everything is same except that page number.
please find attached text file for reference.
please help me out on this.
Thanks in advance.
regards
venkey.
You can put a conditional delete clause in enable transformation during loading.
Thanks for your response.
Could you please explain bit more??
Regards
Venkey.
One way of doing is as below and hope this helps:
Data:
Load SubField(oneline,',',1) as F1,
SubField(oneline,',',2) as F2,
SubField(oneline,',',3) as F3
;
Load *
where not WildMatch(oneline,'*india*','*Dummy*','*Input*','*F1*','*F2*','*F3*')
And Len(Trim(oneline)) > 0
;
LOAD @1:n as oneline
FROM
[COMMUNITY TXT.txt]
(fix, codepage is 1252, no labels);
Or maybe like this with only using the File Wizard:
LOAD F1,
F2,
F3
FROM
(txt, codepage is 1252, embedded labels, delimiter is ',', no quotes, header is 6 lines, no eof, filters(
Remove(Row, RowCnd(CellValue, 2, StrCnd(null)))
))
where F1<>'F1' and F2<>'F2' and F3<>'F3';
Hi Venkey,
Please find the attached Qlikview document and also find the below Script. I have used the Enable transformation step feature in Qlikview to load this file. You can watch the below video for the explanation of this feature (Link attached). Please let me know if you need an explanation on the below script.
Hands-on Example "DataTransformation in Qlikview" - YouTube
Directory;
LOAD F1,
F2,
F3
FROM
COMMUNITY TXT.txt
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 6 lines, filters(
Remove(Row, RowCnd(CellValue, 1, StrCnd(contain, 'india'))),
Remove(Row, RowCnd(CellValue, 1, StrCnd(contain, 'dummy'))),
Remove(Row, RowCnd(CellValue, 1, StrCnd(contain, 'input'))),
Remove(Row, RowCnd(Compound,
RowCnd(CellValue, 1, StrCnd(contain, 'F1')),
RowCnd(Interval, Pos(Top, 2), Pos(Bottom, 1), Select(1, 0))
)),
Remove(Row, RowCnd(CellValue, 2, StrCnd(null)))
));
Thanks,
Sarat.K
One more way of doing it without file wizard . Assuming the field F1 will be in number format
LOAD F1,
F2,
F3
FROM
[Qlik Community development\qlikcommunitypassword.txt]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 6 lines)
where IsNum(F1);