Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Customize Physical Database DDL Generation Output

3 views
Skip to first unread message

Exception

unread,
Sep 3, 2009, 7:02:23 PM9/3/09
to
I'm hoping someone here can provide me with a little guidance on
customizing the output the DDL from a physical model generation. I am
using PowerDesigner 12.5 and have read through provided advanced user
documentation. The documentation has been very helpful in extending
the DBMS definition files. However, I haven't been able to find a way
to perform a few operations. This is what I am trying to accomplish:

• Output a separate file for each major object type (i.e. sequences,
tables, users, roles, triggers, etc.)
• Output each object type into a distinct folder (i.e. drop all user
creation DDL in a folder named users)

By toggling the multi-file option on the generation dialog the
generation process will create separate files for some object types
(e.g. tables) but others it just dumps into a single script file. And,
I am not able to adjust the folder target for these files (i.e. they
all end up in one folder). Is it possible to modify this behavior? If
so, how? TIA!

G. Ibsganich

unread,
Sep 7, 2009, 3:13:40 AM9/7/09
to
Exception schrieb:

> I'm hoping someone here can provide me with a little guidance on
> customizing the output the DDL from a physical model generation. I am
> using PowerDesigner 12.5 and have read through provided advanced user
> documentation. The documentation has been very helpful in extending
> the DBMS definition files. However, I haven't been able to find a way
> to perform a few operations. This is what I am trying to accomplish:
>
> � Output a separate file for each major object type (i.e. sequences,

> tables, users, roles, triggers, etc.)
> � Output each object type into a distinct folder (i.e. drop all user

> creation DDL in a folder named users)
>
> By toggling the multi-file option on the generation dialog the
> generation process will create separate files for some object types
> (e.g. tables) but others it just dumps into a single script file. And,
> I am not able to adjust the folder target for these files (i.e. they
> all end up in one folder). Is it possible to modify this behavior? If
> so, how? TIA!

I think you could simply do this:

in the "generated files" folder of the "classifier" folder of the
definition file,
generate a new "output file" (via mouse-right-click) for each object
type you want to have written out to a separate file.
in the first line, insert some GTL code similar to this

.if(%ObjectType% = %Table%)
%generatedcode_tables%
.endif

%generatedcode_tables% could be a template that you create,
copy-and-pasting SQL generation code the code from some other template
that works properly.
You could also insert this GTL code directly instead of new templates.

If there are no object types of some kind, e.g. if your model has no
triggers, the generated file will not be created in the first place, I
think.

0 new messages