0

I have a Conceptual Model in PowerDesigner with 150+ tables and a few thousand columns/fields in total. The columns have been documented separately outside of powerdesigner and I would like to import/insert these comments to each column/field. Is there a way to do this with script rather than manually adding field level comments/notes?

The second step will be to produce a data model report with tables/columns and which includes these comments. I believe I have seen an answer to this here on StackOverflow, but if there are any newer tips, I welcome them.

Have dabbled with PowerDesigner scripts but not done any advance scripting yet. Hoping to be able to read a csv-like or xml file and mapping field names to internal table/field combinations to add the comment.

I have a report template which generates a report of all tables, but column comments are empty.

pascal
  • 3,287
  • 1
  • 17
  • 35
  • For the first question, you have an example of how to read a text file in `VB Scripts\ReadFile.vbs`. You have an example of reading data from an Excel file in `Resource Files\Extended Model Definitions\ExcelImport.xem`; or you could use an ODBC connection as exemplified in `VB Scripts\ReverseEngineerDatabase.vbs`. – pascal Sep 29 '19 at 12:53
  • Once you're able to text from a file, you load them all in a Dictionary, with keys like 'type::name', e.g. 'Table::Customer', 'Column::Customer.CustID'. And the implement a recursive descent on the model, where you compute the key on each object you encounter, and set the description from the text if found with this key in the Dictionary. – pascal Sep 29 '19 at 13:03
  • In the report, are column comments empty, or not displayed? I had to modify the the default "Table Column Card" layout to add the Comment attribute. And then the Comment of Column appeared in the report... In which format are you generating your report? – pascal Sep 29 '19 at 13:10
  • How did you enter the Column Comment that failed to display in the report? By hand in the Column property sheet, or with a VBScript? – pascal Sep 29 '19 at 13:12

0 Answers0