Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
chris_j_miller
Contributor
Contributor

How to abort reload retaning existing data if data source doesn't exist

Hi folks, 

I'm working on an app with a source file with a date in the file name e.g "source dd mmm yyyy.xlxs".The time the file is created varies so I want the data load not to run if the file doesn't exist yet and to retain currently loaded data. Is it possible to complete this with Qlik Sense?

Thanks, 

Chris.

6 Replies
Gysbert_Wassenaar

By default if an error occurs during the load then the script execution stops and the app reverts to the state before the script execution. That means it will have the same data as before the failed reload.

A missing file would trigger an error during load. So it sounds to me that the default behaviour of Qlik Sense already does what you want.


talk is cheap, supply exceeds demand
chris_j_miller
Contributor
Contributor
Author

Thanks 

That was my understanding as well however I'm seeing the same behavour in QS desktop and enterprise edition where todays file has not been created yet. The data load has been triggered and is failing with a "cannot open file" error and stating that the "data has not been loaded". When I open the app I'm then seeing "incomplete visualisation" errors.

I'm sure this worked previously. (possible on a earlier version of QS desktop???)

Any ideas?

Chris.

 

Gysbert_Wassenaar


That was my understanding as well however I'm seeing the same behavour in QS desktop and enterprise edition where todays file has not been created yet. The data load has been triggered and is failing with a "cannot open file" error and stating that the "data has not been loaded".

If a reload fails that is the messages you will see. And the app will revert to the state before the failed reload. Any data that was in the app before the failed reload will again be in the app after the failed reload.


When I open the app I'm then seeing "incomplete visualisation" errors.

Then something else must have changed first in your data before you reloaded the app. Incomplete visualisations most likely means the visualisation contains a reference to field that is no longer in the data. If you open the properties pane of the visualisation you're likely to see something like 'Invalid dimension'.


talk is cheap, supply exceeds demand
chris_j_miller
Contributor
Contributor
Author

Thanks again for your quick reply.

So I've done some quick testing by loading yesterdays file - which shows visualisations.

I then reverted to my wildcard file search for todays file - which doesn't exist. And as you stated it failed but didn't wipe the data - perfect.

But I'm not sure why loading this file before the above tests resulted in incomplete visualisations?

Are there any other conditions under which the existing data is wiped e.g. time since last successful data load?

Thanks, 

Chris.

Gysbert_Wassenaar


Are there any other conditions under which the existing data is wiped e.g. time since last successful data load?

  • A user inputting a name for a non-existing field as dimension in the properties of a chart and saving the result.
  • A user doing a debug reload and continuing whenever an error is encountered so the script does complete (since the user chose to ignore all the errors).

talk is cheap, supply exceeds demand
chris_j_miller
Contributor
Contributor
Author

I am currently the only user accessing the report at present so the below 2 scenarios don't apply.

I will continue to monitor and will update this chat if I see a repeat of the behaviour.

Chris.