Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

looping the website

Hi ,

Consider i have an url http://en.wikipedia.org/wiki/Latitude_and_longitude_of_cities,_A-H which will show the data for the alohabets from A-H and http://en.wikipedia.org/wiki/Latitude_and_longitude_of_cities,_I-P

So is it possible to pass the parameter A-H and I-P to url and load the data from the website in to single table rather than loading in to multiple table and merging in to single table.

1 Solution

Accepted Solutions
antose
Partner - Creator II
Partner - Creator II

Hi!

Try this:

SET vSource = If(i=1, '[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_A-H&printable=yes] (html, utf8, embedded labels, table is @1)',
If(i=2, '[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_I-P&printable=yes] (html, utf8, embedded labels, table is @1)',
If(i=3, '[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_Q-Z&printable=yes] (html, utf8, embedded labels, table is @1)' )));

FOR i = 1 TO 3
LET vHttp = $(vSource);

Latitude:
LOAD *
FROM $(vHttp);
NEXT ;



View solution in original post

4 Replies
antose
Partner - Creator II
Partner - Creator II

Hi!

Try this:

SET vSource = If(i=1, '[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_A-H&printable=yes] (html, utf8, embedded labels, table is @1)',
If(i=2, '[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_I-P&printable=yes] (html, utf8, embedded labels, table is @1)',
If(i=3, '[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_Q-Z&printable=yes] (html, utf8, embedded labels, table is @1)' )));

FOR i = 1 TO 3
LET vHttp = $(vSource);

Latitude:
LOAD *
FROM $(vHttp);
NEXT ;



Not applicable
Author

Anders solution is OK, you can use also Concatenate load and subfield function to parse the field and create 2 new fields Latitude & Longitude


LOAD Country,
City,
[Latitude Longitude],
subfield( subfield( [Latitude Longitude] , '/' , 3) , ';' , 1) as Latitude ,
subfield( subfield( [Latitude Longitude] , '/' , 3) , ';' , 2) as Longitude
FROM
[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_A-H&printable=yes] (html, utf8, embedded labels, table is @1);

CONCATENATE LOAD Country,
City,
[Latitude Longitude],
subfield( subfield( [Latitude Longitude] , '/' , 3) , ';' , 1) as Latitude ,
subfield( subfield( [Latitude Longitude] , '/' , 3) , ';' , 2) as Longitude
FROM
[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_I-P&printable=yes] (html, utf8, embedded labels, table is @1);

CONCATENATE LOAD Country,
City,
[Latitude Longitude],
subfield( subfield( [Latitude Longitude] , '/' , 3) , ';' , 1) as Latitude ,
subfield( subfield( [Latitude Longitude] , '/' , 3) , ';' , 2) as Longitude
FROM
[http://en.wikipedia.org/w/index.php?title=Latitude_and_longitude_of_cities,_Q-Z&printable=yes] (html, utf8, embedded labels, table is @1);

Regards

JJ

qlikviewforum
Creator II
Creator II

Hi All

The particular sharepoint where I am going to fetch the data needs authentication. Could you please let me how that can be done please.

Created the new thread for the same below.

http://community.qlik.com/message/249859#249859

Thanks,

qlikview forum

johnson532
Contributor II
Contributor II

i am also facing this problem. kindly guide me how to solve this issue?
regards
best fillet knife