Work smarter with #PowerDesigner – generate text from your model contents

One of the features that really differentiates SAP PowerDesigner from the competition is the “Generation Template Language” (GTL) which uses a series of templates to create textual content from the content of your models. I’ve used it in the past to generate JSON or CSV output from a model, and to create simple model documentation (which could be included in a standard PowerDesigner report).

Here are a couple of examples for you

Entity Documentation generated by GTL
JSON generated from an Entity in a Logical Data Model

In every other data modelling tool I’ve worked with, I would have to use whatever scripting language is supported (usually some form of Basic), and write a script to generate the output. This can be horrendous to figure out.

Frankly, using GTL in PowerDesigner is really straightforward. The image below shows everything needed to create the “Entity Statistics” shown in the first example.

10 lines of GTL is all it takes

The GTL is colour-coded

  • the black text is text to be output (some it is formatting instructions, like starting a new line or inserting a tab)
  • the purple/lilac text is processing logic – in this case it outputs certain information only if the model notation is “Barker”
  • the green text is a comment
  • the blue text is where the real work happens – it outputs information from the model; in this example it tells you how many things there are in a collection, such as the collection of relationships linked to an Entity

The logic is critical

Knowledge of the underlying metamodel is critical for creating effective GTL – this can be affected by factors such as the model notation in use, especially if the model is in Barker notation.

Please get in touch if you would like to talk about generating content from your PowerDesigner model.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: