Author Topic: HELP editing DDL templates: add a prefix on the DDL name of all objects  (Read 2842 times)

Richard Freggi

  • EA User
  • **
  • Posts: 493
  • Karma: +18/-7
    • View Profile
EA 16.1

I'm editing the PostgreSQL templates to generate DDL for SAP HANA from a ERD.

INCLUDE_OWNER  seem to be doing nothing even though I created a tag named Owner with value = the schema name and also populated the Owner field in the table's Properties.
 I set owner to 'True' in the DDL generation options.  Not sure why INCLUDE_OWNER is failing, or maybe the Owner value is not populated in my new database type / template.  Any ideas?   

Even better, I would like to prefix the object name (table, view name) with the name of the EA package, so I can create a package for each schema in my EA model and then forward engineer the whole thing, resulting in

CREATE TABLE "packagename"."tablename" ( etc. etc.)

Anyone know how to change the SQL template to do this?  I think I would need something like (row 19 on the PostgreSQL 'DDL Name' template)

$name= "_SYS_BIC." + [package name here] + %ddlTableName%

Also, how to escape the double quote character so the object name has double quotes before and after the  .  With
$name= "_SYS_BIC." + %ddlTableName% the result is:   CREATE TABLE "_SYS_BIC.Customer" instead of CREATE TABLE "_SYS_BIC"."Customer"

Thanks and season's greetings!
« Last Edit: December 25, 2022, 03:32:59 pm by Richard Freggi »

bomber

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Did you manage to resolve this?