cancel
Showing results for 
Search instead for 
Did you mean: 

Querying the PD Repository

asbowes
Explorer
0 Kudos

I need help; or, I need help finding help... I want to query my PD Repository database to answer questions about the "health" of our models. I have explored the Repository Data Model, but am struggling still. I want to answer questions like: Within a certain Repository folder, including sub-folders, within all current-version physical data models, how many tables have non-empty comments? (And, similarly, for columns.)


I've figured out bits and pieces - but only at the highest level, for example:

select count(*) from PMOBJT where CLSS=272 and cmmt<>0 and lvrs=1; -- number of latest version tables with a comment

What I have not figured out is how to determine how objects are related to each other - folders within folders, PDM's within folders, tables with PDMs, columns within PDMS.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

You might have seen this already, but there is a published metamodel that explains all of the relationships between the tables. I found this one:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38628.1600/doc/html/rad12....

Look at the "MetaModel.oom" file. It should give you more help also.

I missed a reference. The actual Repository PDM file:

C:\Program Files\SAP\PowerDesigner 16\Examples\Repository Metamodel.pdm

llop_anna
Discoverer
0 Kudos

Hi Michael,

First of all, thanks for sharing this, I had no idea about this metamodel and it's being very helpful.

Ive noticed that my Metamodel version is 16.6.3 and my PD version is 16.6.4.2.

¿How can I get updated metamodel? The 16.6.3 one is on my instalation/Examples path

thanks!

Anna

Answers (2)

Answers (2)

asbowes
Explorer
0 Kudos

To follow up... The key was in knowing how to write hierarchical queries. I still don't know how, really, but a teammate does, and helped me out.

GeorgeMcGeachie
Active Contributor
0 Kudos

In the script you could check out the model in memory then navigate it in the usual way