Discussion Board for collaboration related to QlikView App Development.
Hi experts,
I have a requirement where I will load all server logs like (qvd extractor document logs).If my script execution is failed then I wil create flag Script_Failed ='Y' else N.If flag Y then I want to fetch the error like syantax error or anything .But if it is succsful then null.
Script failed | Header 2 |
---|---|
Sctipt Failed | Error |
Y | sysntax error |
N | |
Y | Unknown statement |
N |
Regards,
Rupali Ethape.
You could try like:
Set ErrorMode=0;
<Your Script here>
Load
If(Len('$(ScriptError)')=0, 'N', 'Y') as [Script failed],
'$(ScriptError)' as Header2
AutoGenerate 1 ;
Hi Tresesco B ,
My main concern is that how to load log file and captur error .I want to write a script.How to write a script to capture error flag?
Difficult to load your log files into Qlik platform. Instead, We have tools to understand where that error occurs. Moreover, We can skip that error using SET ErrorMode = 0
The free Script Log Analyzer tool
Qlikview Cookbook: Script Log Analyzer http://qlikviewcookbook.com/recipes/download-info/script-log-analyzer/
loads logs and flags those that are failing. You could use that as a base, Should be easy enough to update to capture some error reasons by looking for "Error:" in the script text.
You might also consider a different approach and read the C:\ProgramData\QlikTech\DistributionService\TaskResults files instead.
-Rob