Twitter/Facebook

Pinterest
Monday, September 29, 2014

In this post we are going to load data from an internet location. Location from where we are going to pull data. This is a wiki page with the population of different countries listed as a table. We are going to load it in our application. 


 Create a new application. Refer Creating new application if you are not sure how to do that. Now in the script page click on web files. How to do this is in the create new app link. 


http://en.wikipedia.org/wiki/List_of_countries_by_population copy paste this URL in the internet file text box. click next .

If you observe, the left tab has file types. Those are the file types we can load using qlikview. HTML is automatically selected. Delimited, fixed record can be used to load flat files (txt, csv and all) you can try loading it. 

In the right pane, we have tables available listed. Just click on all the tables and see for better understanding. So, we understand that @1 has the table that we want. So we select that. It is seen that the table's first row has the labels so we select embedded labels. character set is also chosen by default. Click on finish.



LOAD Rank, 
     [Country (or dependent territory)], 
     Population, 
     Date, 
     [% of world population], 
     Source
FROM
[http://en.wikipedia.org/wiki/List_of_countries_by_population]
(html, codepage is 1252, embedded labels, table is @1);


The above script is generated. Now reload the application either by clicking the reload button or ctrl+R. Once the reload is done our connection with the source is finished. any changes in the wiki page wont reflect in our application until we reload it again. The data is now in the QVW file that we have created. 




0 Scribbles:

Post a Comment

Thank You for taking pains, commenting :)

LinkWithin

Search This Blog

 
badge