Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to build a loop on a specific URL. Seem like loop itself is working but I cannot retrieve the records those to be appended. Any idea or help will be greatly appreciated.
Here is the script:
FOR i = 1 to 3
Set vURLStart = '[http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=';
Set vURLMid = $(i);
Set vURLEnd = ];
LOAD F1,
Name,
MAU
FROM $(vURLStart) & $(vURLMid) & $(vURLEnd)
(html, codepage is 1252, embedded labels, table is @8);
Next
Best,
Piroglu1907
Why not try is like this:
FOR i = 1 to 3
Set vURLMid = $(i);
LOAD F1,
Name,
MAU
FROM [http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=$(vURLMid)]
(html, codepage is 1252, embedded labels, table is @8);
Next i ;
Good Luck.
Dennis.
Hi,
Try with this
FOR i = 1 to 3
Set vURLStart = '[http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=';
Set vURLMid = $(i);
Set vURLEnd = ']';
LOAD F1,
Name,
MAU
FROM $(vURLStart) & $(vURLMid) & $(vURLEnd)
(html, codepage is 1252, embedded labels, table is @8);
Next
Hope it helps
Celambarasan
Hi Celambarasan,
Appreciated your help. But it is still the same. Script seem to be reading 120 records on 3 pages (40 records each) but retrieved data is the only first 40.
What else shall I look into?
Best,
Piroglu1907
Hi,
Did you tried with the table name before it?
FOR i = 1 to 3
Set vURLStart = '[http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=';
Set vURLMid = $(i);
Set vURLEnd = ']';
TableName:
LOAD F1,
Name,
MAU
FROM $(vURLStart) & $(vURLMid) & $(vURLEnd)
(html, codepage is 1252, embedded labels, table is @8);
Next
Celambarasan
Hi ,
I think you have defined vURLEnd incorrectly.
Set vURLEnd=']';
Hope this will work
Hello All,
Its still not working despite adding table name and single quotation My script is as per following:
FOR i = 1 to 3
Set vURLStart='[http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=';
Set vURLMid=$(i);
Set vURLEnd=']';
Records:
LOAD F1,
Name,
MAU
FROM $(vURLStart) & $(vURLMid) & $(vURLEnd)
(html, codepage is 1252, embedded labels, table is @8);
Next
Best,
Piroglu1907
Why not try is like this:
FOR i = 1 to 3
Set vURLMid = $(i);
LOAD F1,
Name,
MAU
FROM [http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=$(vURLMid)]
(html, codepage is 1252, embedded labels, table is @8);
Next i ;
Good Luck.
Dennis.
Hi,
Try
Let vURLMid = $(i); instead of Set
Hi,
Try this script,
Set vURLStart='[http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=';
Set vURLEnd=']';
For i=1 to 3
Set vURLMid=$(i);
LET URL = vURLStart & vURLMid & vURLEnd;
LOAD *
FROM
$(URL)
(html, codepage is 1252, embedded labels, table is @8);
Next
Regards,
Jagan.
Hello Dennis, Celambarasan and Vijay,
Thanks for your help. Dennis' suggestion worked well as per following:
FOR i = 1 to 3
Set vURLMid = $(i);
LOAD F1,
Name,
MAU
FROM [http://www.appdata.com/leaderboard/apps?fanbase=0&metric_select=mau&page=$(vURLMid)]
(html, codepage is 1252, embedded labels, table is @8);
Next i ;
Best,
Piroglu1907