Author Topic: Updating Table and Column Descriptions with Scripting  (Read 4455 times)

Liaison00

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Updating Table and Column Descriptions with Scripting
« on: November 05, 2020, 07:43:58 am »
I'm coming from PowerDesigner and have an extensive dictionary of terms associated to Tables/Columns.  Is there a way by looping through tables/attributes to update the note/description of a table/column elements via scripting?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Updating Table and Column Descriptions with Scripting
« Reply #1 on: November 05, 2020, 09:02:32 am »
Yes sure. Best to start here https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/automation/automation_interface.html

Tables are EA.Elements (table: t_object), columns are EA.Attributes (table: t_attribute)

Geert

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1311
  • Karma: +120/-10
  • Its the results that count
    • View Profile
Re: Updating Table and Column Descriptions with Scripting
« Reply #2 on: November 05, 2020, 01:32:51 pm »

Sounds like you are migrating your data models from PowerDesigner to Sparx EA. Not clear how far you are with that process but there is more to it than just the tables and attributes. For example Indexes, Primary Keys, Foreign Keys, Relationships, cardinality etc.If you have a large number of tables then you could also consider creating a C# plug-in to extract from Power Designer and populate Sparx EA which would run faster then scripting. That is what we did last year.
Before you ask - Sorry can't share the code.
Happy to help
:)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1365
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Updating Table and Column Descriptions with Scripting
« Reply #3 on: January 27, 2025, 09:53:09 pm »
Hi,
I have a team who have PDM built with PowerDesigner and that we'd like to import in EA.
I looked at a PowerDesigner pdm sample file and it looks like the information is there to import both the structure and diagrams in EA, yet the effort seems quite important.
@Sunshine: did you manage to import the diagrams layout as well as the structure ?
Note: the value is on the diagrams/views since the DBs are available for EA reverse engineering.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com