Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using the User Manager tool to remove licenses that are not in use anymore.
On success, it creates a CSV file that looks like this:
No CALs to remove on QVS@Test
No Document CALs to remove from 'Dashboard - 150320.qvw' on QVS@Test
Removed 6 Document CALs from 'Dashboard.qvw' on QVS@Test
Removed 1 Document CALs from 'Dashboard_SH.qvw' on QVS@Test
No Document CALs to remove from Dashboard_UAT.qvw' on QVS@Test
No Document CALs to remove from 'QVSystemMonitor.qvw' on QVS@Test
No Document CALs to remove from 'QVSystemMonitor_v5.1.23_sec.qvw' on QVS@Test
Unfortunately, errors don't get caught, instead the content of the CSV might look like this:
System.NullReferenceException: Object reference not set to an instance of an object.
at PIX.CalInfo.WriteXml(XmlWriter w)
at Wrappers.QVSWrapper.CallFunction(String methodName, String iStartElement, String iStartAttribute, IXmlSerializable arguments, IXmlSerializable outpar, String& message, Byte[][] attachments)
at Wrappers.QVSWrapper.SetCalInfo(CalInfo i_CalInfo)
at QMSBackendCore.Communication.QlikViewServer.SetCalInfo(QlikViewServerResource qvsResource, CalInfo calInfo)
at QMSBackendCore.Service.ServiceImpl.SaveCALConfiguration(CALConfiguration calConfiguration)
I would like to load the csv into my dashboard and check if an error occured or not, How can I?
Thanks
Jens
A workaround would be to load it as a fixed record file, which can contain several lines.
Then you can do a resident load to pick out the errors.
log:
LOAD
"@1:n" As Log
FROM [C:\_QLIKVIEW\CENT.QV\Tickets\18\data\removecal.csv]
(fix, codepage is 1252, no labels, record is 6 lines);
errors:
Load Log As Error Resident log where wildmatch(Log, '*exception*', '*error*');
drop table log;
I've tried something, but it won't work:
ErrorPrep:
LOAD
if(wildmatch(@1, '*exception*', '*error*'), @1, 'N/A') as Log
FROM
(txt, codepage is 1252, no labels, delimiter is ';', msq)
Problem is that the application six rows (you can also see those in the table viewer), but you cannot access more than one row in the script or data itself.
A workaround would be to load it as a fixed record file, which can contain several lines.
Then you can do a resident load to pick out the errors.
log:
LOAD
"@1:n" As Log
FROM [C:\_QLIKVIEW\CENT.QV\Tickets\18\data\removecal.csv]
(fix, codepage is 1252, no labels, record is 6 lines);
errors:
Load Log As Error Resident log where wildmatch(Log, '*exception*', '*error*');
drop table log;
Thanks Ralf, this is working fine.
I'm wondering a bit, as I tried to load with a fixed record, too, and it didn't work. No clue what I did different than you .