Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I was looking for a way to have Qlikview do an incremental update of its data coming from Google Analytics.
Currently, when I want to pull in new data, I need to do a refresh of the entire data table. For one site, that's ok, but I expand this to quite a few more, and I don't want Qlikview to spend all day pulling in the entire datasets from Google Analytics (ok, that may be dramatized a bit but you get my point ..)
Also, I was wondering if there is a good way to dynamically change the date range. I would like to open the QV dashboard weekly, hit the "Reload" button, and have QV update the data until the date of the day before without having to change the scripts' "end-date" over and over again.
Any support would be greatly appreciated !
Best regards,
Christophe
thx a lot bhs -- I have indeed done it on the mean time like this (forgot to mention it on the forum):
LET vStartDate = '2011-09-01';
LET vEndDate = Year(Today(1)) & '-' & NUM(MONTH(Today(1)),00) & '-' & Date(Today(1),'DD');
when all's stored in the qvd file, I used this:
LOAD * From GoogleAllGoals.qvd (qvd);
Max_Start:
LOAD MAX(Data_date_qv) AS Max_StartDate
Resident GoogleAllGoals;
LET vStartDate = Date(PEEK('Max_StartDate',0,'Max_Start'),'YYYY-MM-DD');
The google query itself would be something like this then:
But thanks again for taking the time to respond !
No answers just yet -- is it because it's impossible to do?
Hi Cristoph,
Why don't you make your code in the script be more dynamic? I mean, you can make the start and end dates be calculated each time the script runs (the qv document is reloaded) and calculate them.
This way, the document would only retrieve from Google the data of the last week or day or month, and the "historical" data you can get it from your own QVD files, populated each time the qv document is reloaded.
Something like:
LET gDateStart= date(today(),'YYYY-MM-DD');
instead of the hardcoded date:
SET gDateStart= '2012-02-11';
Do you have the dates hardcoded in the script?
Have you ever heard about incremental reloads in QlikView using QVD files? If not, check the PDF within this link:
Kind Regards,
Borja
thx a lot bhs -- I have indeed done it on the mean time like this (forgot to mention it on the forum):
LET vStartDate = '2011-09-01';
LET vEndDate = Year(Today(1)) & '-' & NUM(MONTH(Today(1)),00) & '-' & Date(Today(1),'DD');
when all's stored in the qvd file, I used this:
LOAD * From GoogleAllGoals.qvd (qvd);
Max_Start:
LOAD MAX(Data_date_qv) AS Max_StartDate
Resident GoogleAllGoals;
LET vStartDate = Date(PEEK('Max_StartDate',0,'Max_Start'),'YYYY-MM-DD');
The google query itself would be something like this then:
But thanks again for taking the time to respond !