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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load errors into QVD loop

I currently have a QVW thats set up to generate 200+ QVD's. This feeds of an excel file that has database names that are loaded into a variable in the script. It will load the table into a QVD and drop it, then move to the next one.

My question is how would I go about logging an error into another separate QVD thats designed just to hold the QVD generations that failed so I can go reference the QVD and rerun the errored tables off of it?

I've attached a sample of how I do the loop for the QVD's right now. How can I modify this to export the errors to a QVD and rerun the errored tables off that QVD afterwards.

Thanks!

2 Replies
Not applicable
Author

Will I have to do some sort of update of the error QVD afterwards as well? What if the load of that table fails again off that error QVD? I don't want to run it twice come the time.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The easiest way to do this is to write the error QVD everytime it has a new row. So if you have a errorlog sub like:

Sub LogError (errfile)

errors:

LOAD

     now(1) as Datetime,

     '$(errfile)' as ErrorFile

AUTOGENERATE 1

;

STORE errors INTO errors.qvd;

END SUB

You will rewrite the QVD with all the accumluated rows on every call. same principle if the code is inline instead of a sub.

-Rob