Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

script to REload table if first friday of month, otherwise keep already available data

Dear all,

sorry for the (similar) double topic.

I am loading in a daily dashboard a huge dataset, which is actually refreshed once a month only. Therefore everyday I am loading the same data over and over again.

I would like to keep the values in the daily dashboard and skip the loading part of that dataset, unless we are on the first friday of the month (the day this dataset get refreshed).

Is it hence possible to keep the values from previous reload for a certain dataset?

thank you

6 Replies
Anonymous
Not applicable
Author

I guess you can schedule the dashboard to reload on first friday of everymonth on the Publisher.

publisher-job-run.png

Not applicable
Author

sure, but...

my daily dashboard reads from let say 20 datasets.

One of this 20 datasets is huge and refreshed once a month.

Therefore I would like my dashboard, during its daily refresh, to go through the script as always and skip the load part of this huge dataset, if we are not in the first friday of the month....but it should also keep the values somehow, otherwise when the dashboard is refreshed, the values in that huge dataset are not visible (for a month...)

I hope I made it clearer!

Anonymous
Not applicable
Author

Well thats tricky.

A simple option that i can think of is.. (I cannot call this a solution) But anyways..

First, after you read the dataset that is huge and if you do some calculation on top of it... i suggest you then store that table into a QVD at some location.

Next, you can then use a script like below.

Let vToday = WeekDay(Today());

If $(vToday) = 'Fri' then

  Run my script to load the latest data...

Else

  Load the data from my QVD

ENDIF

With this approach you can at least have the reload time reduced during the other six days in the week and you would have the laod time increased only for four days in thee month.

hope this helps.

Not applicable
Author

that would indeed be a great trcick, but sadly the dataset I am loading it is already a QVD (QVX actually) ..

I did that some time ago to already reduce load time.

Now I wanted to reduce once more reload time, as the whole dashboard is getting big, and I thought "what's the purpose of refreshing daily data which is actually refreshed MONTHLY at the source"..

So I was hoping it would have been an easy tweak, to have QV keep data from previous session and skip that part of the script..

Anonymous
Not applicable
Author

well I doubt if there is any such way of reloading a QVW.

I guess you should then look into Direct Discovery option..

Thanks,

Aadil

Not applicable
Author

Then use Partial Reload option.