Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

How to abort script an maintain existing data

This may not be the best way to accomplish this.  But we are trying to not run our dashboards every night because our data only gets updated once a month.  So our plan was to put something in the start of the script that checks for a date value from a table and depending on the criteria will exit the script.

The problem is that when we do that the dashboard looses all of its data and shows nothing.

The question is how can we make this scenario work?  Or is there a better way to do this?

I was also thinking that we could do it with dependencies with the tasks.  The problem is that the extract runs every night it just doesn't process data for that client if there is no new data.  So the dashboard will see that the extract ran no matter what. 

Any ideas would be greatly appreciated.

6 Replies
Gysbert_Wassenaar

Try forcing an error instead of using exit script: LOAD EveryThing FROM NonExistingTable;


talk is cheap, supply exceeds demand
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

There is a number of ways to approach this issue.

TO answer your question specifically - if you run a Partial Reload, the existing dataset is not being erased. That being said, I would not recommend using Partial Reload because of its quirky behavior sometimes...

I'd try to find the solution within the scheduler - if the data is being updated only once a month, why run the task daily?

Also, if you split your process into at least three phases: Data - Model - Dashboard, then you could be more flexible in scheduling each stage appropriately.

Another "trick" you could try - create a "pre-process" task that gets initiated daily, checks for new data and aborts with an error if there is no new data (You'll have to creatively find out how to throw an error in this case). Then, your Dashboard reload can be conditioned "Upon successful completion of another task". When the pre-process task fails, the main reload process won't start.

Cheers,

Oleg Troyansky

Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Milan, Italy!

maxgro
MVP
MVP

did you try to raise an error when you're not at the 1st of the month?

or you can schedule the Qlik task every 1st of month

rittermd
Master
Master
Author

That would seem to be a simple and easy solution. 

One issue would be that we have notifications turned on when jobs fail.  So we would be getting an email 29 out of 30 nights for each job when it fails.  I think notifications are either on or off.  Is there a way to make them conditional?

rittermd
Master
Master
Author

I like your last idea/trick.  I think we will give that a try and see if that works for us.

Our challenge is that we have a task for each client for each dashboard.  Also, the data is only updated once a month and there is no set schedule.  Clients can and will be updated on different dates.  So it's kind of a moving target.

But I think that your suggestion may work around all of these challenges.

Will let you know how it goes.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You may want to consider setting up an EDX task. And then whatever updates the client data can send a signal to the QV Server to start the reload.

-Rob