Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've got a single APP whose objective is to read SQL Tables and generate QVD files.
I then have a series of Apps that then read those QVD files. Any given QVD file may be used in one more more Apps.
I'm trying to figure out, for impact analysis, what Apps would be impacted if a QVD file is changed.
I can't locate the proper API methods. And it appears that once the data is loaded and the search index is produced, the APIs that read the App data are only looking at the "tables" that have already been rendered independent of the source.
Perhaps there are APIs that I haven't found that can read the Data Load scripts?
Hi
You can using script to read log files and find all apps that load QVD files
for each FoundFile in filelist( 'lib://Log_Folder ' & '\*.log' )
FileList_TMP:
Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'
(txt, utf8, no labels, delimiter is '\t', msq)
where Upper(@1) like '*.QVD*';
next FoundFile
NoConcatenate
FILE_QVD_TABLE:
load App_ID,
left(Right(QVD_FILES,len(QVD_FILES)-Index(QVD_FILES,'\',-1)),len(Right(QVD_FILES,len(QVD_FILES)-Index(QVD_FILES,'\',-1)))-1) as QVD_FILES
,ReloadTime
Resident FileList_TMP
where App_ID <>'13470956-078b-4287-a711-c055f9449fa1'; // exclude Current App
Drop Table FileList_TMP;
Here is my result
Regards
An Pham
There is a GetScript method on the App object, but that's pretty raw and a pain to parse out the QVD files.
Still hoping for something more basic that would represent the source files/databases, etc., that are used by an App.
Hi
You can using script to read log files and find all apps that load QVD files
for each FoundFile in filelist( 'lib://Log_Folder ' & '\*.log' )
FileList_TMP:
Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'
(txt, utf8, no labels, delimiter is '\t', msq)
where Upper(@1) like '*.QVD*';
next FoundFile
NoConcatenate
FILE_QVD_TABLE:
load App_ID,
left(Right(QVD_FILES,len(QVD_FILES)-Index(QVD_FILES,'\',-1)),len(Right(QVD_FILES,len(QVD_FILES)-Index(QVD_FILES,'\',-1)))-1) as QVD_FILES
,ReloadTime
Resident FileList_TMP
where App_ID <>'13470956-078b-4287-a711-c055f9449fa1'; // exclude Current App
Drop Table FileList_TMP;
Here is my result
Regards
An Pham
This gets me close enough to mark as correct for anyone else who comes by.
Ideally, I'd only read the logs of a given timeframe to avoid getting duplicate counts. Also, I'd need a way of excluding from QVD_Files those entries that are the timestamped log entries and not the parsed QVD rows.
Thanks for the creativity of examining the logs.
The GetScript api would also work, but would need to be parsed to find the QVD files.
You made an amazing job!
is there any clue about how to get the app name also?
Thank you so much
Hi @kenphamvn
Thank you very much for the code, it was very useful. Here it is.
I have a small question. When I run the code, if there is a commented qvd in the app, it sees it too and shows more qvds. How can I separate them?
İn App:
show result
Can you help about this?
Thank you so much