Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sudeepkm
Specialist III
Specialist III

Can partial reload help in this case

Hi,

Can you guys pls advice me a solution for the given below scenario.

I've bunch of xls files as datasource and loading data from it and using a QVDgen, I'm creating a QVD out of it.

There is a task created in QMC for this QVDGen qvw file.

I've my main UI QVW that loads data from this QVD.

There is a task created in QMC for this UI QVW file.

Is it possible that I run the UI QVW task whenever the QVD has new data. Can Partial Reload help in this case?

4 Replies
sudeepkm
Specialist III
Specialist III
Author

Can anyone please provide few advice on the above post?

Not applicable

  • You can combine tasks. Trigger the UI-Reload when the QVD-creator finishes his work succesfully. You might be able to control what "successful" is, meaning you could let the QVD creator produce an error on purpose so that the next tak will not start untill you want it to start.
  • Another way would be using EDX-Trigger to start your UI-Reload from the QVD-creator.
  • One more: your idea with using partial reload would also work. Just let the UI reload every 10 minutes checking i.e. if there is a new filetime() on your QVDs. If that is the case REPLACE or ADD LOAD the new QVD-tables. If that is not the case just exit script.

I think, the last way would be the most elegant.

Is that a sufficient description?

KR

Matthias

sudeepkm
Specialist III
Specialist III
Author

Thanks.

The first one (Intentional fail) is not accepted by our code reviewers as it is not a best practice to fail a task intentionally to "run" or "not run" the dependent task.

The second option is something I'm not aware of or do not have an example with me.

I'm currently trying the third option and given below is the code I'm using.

The UI task I created is enabled as Partial Reload. Can you please give me an idea whether should I create another task for the UI to have a full reload in case of any side effect of the partial reload to fail some data. I think a single task cannot be treated as both full and partial reload.

let vqvdtime= QvdCreateTime('tabl.qvd')*1;

let vnowtime= now()-1/600;

if IsPartialReload() then

    if '$(vqvdtime)'>='$(vnowtime)' then

        Replace load * from tabl.qvd(qvd); // The qvd has fresh data to be loaded

        TRACE 'QVD refreshed recently so all data from QVD should be loaded';

    ELSE

        TRACE 'No data to be loaded';

        EXIT Script; // do nothing

    ENDIF

ELSE

        load * from tabl.qvd(qvd); // no Partial reload

        TRACE 'Not a Partial reload and all data to be loaded';

ENDIF

Not applicable

A partial reload is almost the same as a full reload if you use REPLACE on all LOAD-statements. Your code should work.