Book a Demo

Author Topic: Data Model import  (Read 4192 times)

kadamowi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Data Model import
« on: May 29, 2010, 01:09:51 am »
I have Excel file with Data Model, list of entities and attributes with type and description.

Hot to import it to EA as a tables with attributes ?

Import/export csv dont have attributes -:(
XMI is to complicated.

Do You have any idea ?

Kris

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Data Model import
« Reply #1 on: May 31, 2010, 08:08:25 am »
Use your model to create an instantiated database.
Then reverse engineer the model into EA.
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

kadamowi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Data Model import
« Reply #2 on: May 31, 2010, 06:11:33 pm »
I don't know how to do it, but ...

I remembered that Geert Bellekens uploaded on Community Site example in VBA which can import data from Excel.
It is exactly this what I'm looking for.

It's working well, I only try to change it how to add element as a <table> stereotype and Database "Oracle".

kadamowi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Data Model import
« Reply #3 on: May 31, 2010, 11:55:17 pm »
Maybe somebody know what is the type Attribute.Scale ?

myAttribute.Precision = attrPrec
is working, but
myAttribute.Scale = attrScale
causes error : Expected: ( on "=" char

and another little problem
data after import are in alphabetical order, can be in the sam as in file ?

Kris
« Last Edit: June 01, 2010, 12:10:43 am by kadamowi »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Data Model import
« Reply #4 on: June 01, 2010, 03:53:46 pm »
Kris,

The easiest to find out what to put in the Attribute.Scale is to manually add a scale in EA and then inspect the Scale attribute of the attribute in your code.
Another option is to open the database (if you are using an eap file use MS-Access) and see what EA has put in the t_attribute.scale column.

The alphabetical ordering is probably cause by the option: Tools/Options/Objects/Sort Features Alphabetically.

Geert

kadamowi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Data Model import
« Reply #5 on: June 01, 2010, 10:06:37 pm »
Thanx Geert,
for Scale I will try use Access.
Alphabetical order not working with this option, but I find another solution: in VBA script I set field attribute.Pos
after that its ok.

Kris