Skip to main content

Data & Intelligence

PowerDesigner Tips – Exporting Model Metadata

Once you’ve invested the time and effort into creating really solid, well documented data models, it would be really great to let some folks know about it, right!?!? If you’re using PowerDesigner, you’ve got a few options:

  1. Use the included (in some editions) web repository.  This requires the use of the model repository and displays the contents of your model(s) on a web site.  The drawbacks are a little bit clunky setup process, very limited customization, and almost no capability to integrate non-model data into the pages.  Also, getting the style to match anything else you might be going to communicate to users is a mammoth task.
  2. Use a third party tool that can read PowerDesigner models.  Great if you have one or can buy one.
  3. Extract data from the model to load into whatever metadata system you have.

We’re generally using option 3 in an attempt to integrate design metadata (from the model) with implementation metadata.  This allows us to check if our implementation matches the design and present a more complete view of the system.

Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

To make #3 work, we’re using extended generation of files.  This is a nice feature of PowerDesigner that allows you to add file definitions for any type of object to your XEM and then generate output based on those definitions.  For use, we export CSV files for tables, columns, entity, attributes, table and column mappings, business rules, etc.

Here’s the table template:

.foreach_item(Tables)
   .ifnot (%IsShortcut%)
%Model.Code%,[%Owner%?%Owner.Code%],%Code%,%Name%,
      .if %Comment%
"
         .replace("\"","")
%Comment%
         .endreplace
"      
      .endif
\n
   .endif
.next
.foreach_item(Packages)
%extGenMDRTable%
.next

The template runs in the context of a package and recursively traverses child packages to export all table data.  That’s all there is to it! Now, under the Tools->Extended Generation menu, I have the option to export all sorts of metadata in a format that is easily loaded into our metadata repository.

 

Thoughts on “PowerDesigner Tips – Exporting Model Metadata”

  1. Nice article, Chris.
    I’d add a couple more:
    * If you don’t have a repository, look at the HTML reporting capabilities
    * Some people love to see their metadata in Excel – they can sort, filter and generally play with it (perhaps they can provide updates for you via Excel as well) – I’d use List reports, so you can repeat the extract when needed; keep a result set before you extract

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Chris Grenz

More from this Author

Follow Us