Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

jeremy_kofoot
New Contributor III

How to get a list of QVD's used in a QVW

Is there a way to script the ability for a qvw to read another qvw to see what QVD's it is using?  I can use the QVD metadata CreatorDoc to determine what QVW file created a QVD, but I want to know what QVW's then use those QVD's and I haven't been able to think of a good way of doing this.

So our base setup is that we have 3 layers, T1, T2 and T3.  T1 is the extract layer and generates QVD files.  These QVD's are then fed into our T2's which is our transform layer.  The T2 does it thing and then creates a new QVD which is used in T3.  T3 is our application.  So I can see that T1.QVW creates T1_data1.qvd, T1_data2.qvd, etc... and I can see that T2 creates T2_transform.qvd etc.. but how do I go about saying T2.qvw uses these specific T1 qvd's such as T1_data1.qvd, T1_data2.qvd.  Just wondering if anyone has a solution or an idea about this.

Thanks

8 Replies
MVP
MVP

Re: How to get a list of QVD's used in a QVW

You can look into the QlikView Components DataLineage sub (or first have a look at the sample QVW contained in QVC download to check if this comes close to what you want to see).

GitHub - RobWunderlich/Qlikview-Components: A library for common Qlikview Scripting tasks

MVP
MVP

Re: How to get a list of QVD's used in a QVW

Also have a look at the governance dashboard:

QlikView Governance Dashboard

jeremy_kofoot
New Contributor III

Re: How to get a list of QVD's used in a QVW

From what I've seen of the Governance Dashboard and I've used it a lot in 2 years it runs into the same issue, in that it doesn't include a full Data Lineage from 1 end to the other. 

peter_turner
Valued Contributor

Re: How to get a list of QVD's used in a QVW

Maybe you could look at reading in the reload log files into a QV app?

You could dump all your reload logs into a folder and create a QV app to load them into a table, and add the filename() into the script so you know which log the data row comes from.

You would then be able to search all the rows in the table for a specific QVD file name, see how many times this appears in a log, and which actual reload logs are linked to this file.

It would be a manual process, but might help you find if there are QVDs being created but not used.

v_petrenko
New Contributor III

Re: How to get a list of QVD's used in a QVW

Jeremy, this kind of problems are called lineage-dependency analysis (see Kimball's ETL subsystem 29 for instance), and here is a tool I've created for accomplishig this task in QlikView environment: Lineage / Dependency Analyzer for QlikView

Please mark this answer as correct and your question as answered if this suggestion helps.

applemag
New Contributor

Re: How to get a list of QVD's used in a QVW

Take a look at this and see if it covers what you need - NodeGraph - Your Data Starts Here - YouTube
Let me know if you want more information.

jeremy_kofoot
New Contributor III

Re: How to get a list of QVD's used in a QVW

So what I ended up doing is creating a quick powershell script to read all of our T2 and T3 log files.  The script looked for a string character followed by .qvd and then outputted this information to a csv file.  Since all of our T1 and T2 qvd's start with a specific character set this simplified the process.

The csv file included the filename that the qvd was used in and the line that had the qvd filename in it, so once I loaded the csv file in my app it was just a matter of doing a substring on the line to get the qvd name and to tie that to the filename.

There is still some tweaking to do, but this allows me to tie T1 qvw file all the way up to our T3 (app) qvw file with the qvds used as well.

Thanks for all the help.

leandroserrado
New Contributor II

Re: How to get a list of QVD's used in a QVW

Look the Qlikview Lineage Dependency Analizer Application.

Community Browser