Book a Demo

Author Topic: import connectors from csv  (Read 6986 times)

AlexY

  • EA User
  • **
  • Posts: 60
  • Karma: +3/-0
    • View Profile
import connectors from csv
« on: April 01, 2008, 03:21:27 am »
Hello All,

Is there a way to import connectors from csv file (I run EA 7.1)?
or the only way to automate import of relationships is to write a plug-in or script with use of EA automation interface?

More issue background:
I need to import objects and relationships currently kept in a database consisting from 2 tables: objects, relationships. The logical way is to convert the data from tables into csv format to import into EA. I see there is a built-in support in EA to import elements, but I do not find an option to import connectors.

Thank you,
Alex.

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: import connectors from csv
« Reply #1 on: April 01, 2008, 08:53:28 am »
Hi Alex,

The CSV import/export is only intended for Elements, and the CSV format is much too limited to introduce a different class of object (as you'd have to have two sets of headings, with only one set being totally redundant for the class it doesn't belong to).

The XMI import/export facility is much more flexible and allows for connectors and all of their metadata. You could possibly write an XSLT stylesheet that transforms your data to XMI and then import that into EA.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

AlexY

  • EA User
  • **
  • Posts: 60
  • Karma: +3/-0
    • View Profile
Re: import connectors from csv
« Reply #2 on: April 01, 2008, 11:07:42 am »
Michael,

thanks for reply and confirmation..that csv import of connectors is not supported.

In the same time not sure I understand your comment about redundancy..

The way I see it is that there should be a separate menu item "csv import/export of connectors". The connectors would be defined as pairs of element names + attributes for the connection.
For every pair, the "import connectors from csv" process should find both elements in the model selected and then to create a connector and attach it to the elements.

I think it should be relatively simple to implement with EA automation and logical to have in the product that already supports csv import of elements.. that's why I wonder why it is not supported..

Alex.





mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: import connectors from csv
« Reply #3 on: April 01, 2008, 11:19:47 am »
Hi Alex, thanks for your response.

The comment about redundancy was if you stored both elements and connectors in the same file rather than store them in seperate files as you suggested in your second post.

I'll log a feature request for this on your behalf. In the mean time the problem can be addressed either by using XMI import/export or the automation interface.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

AlexY

  • EA User
  • **
  • Posts: 60
  • Karma: +3/-0
    • View Profile
Re: import connectors from csv
« Reply #4 on: April 01, 2008, 11:24:55 am »
Michael,

thank you..
could you please post the link for the future request here?

Alex.

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: import connectors from csv
« Reply #5 on: April 01, 2008, 11:35:21 am »
Hi Alex,

Our change/feature request system is only available internally. I've logged the feature request however and Forwarded you the request entry that was sent.

PS: Features can be requested directly by following the following link: http://www.sparxsystems.com/support/feature_request.html
« Last Edit: April 01, 2008, 11:45:50 am by mfraser »
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: import connectors from csv
« Reply #6 on: April 01, 2008, 10:38:11 pm »
Quote
...
PS: Features can be requested directly by following the following link: http://www.sparxsystems.com/support/feature_request.html
Or by clicking the Feature Request link below the Support link near the bottom of any forum page.
No, you can't have it!

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: import connectors from csv
« Reply #7 on: April 02, 2008, 03:08:27 am »
I will note that it is also possible to import them via SQL.  That requires a bit of discovery, but depending on your skill set might give you some options.

AlexY

  • EA User
  • **
  • Posts: 60
  • Karma: +3/-0
    • View Profile
Re: import connectors from csv
« Reply #8 on: April 02, 2008, 11:33:41 am »
With skillset anyone can and everything is possible, but what to do without skillset? Right, to ask a colleague or better a vendor for advice  :)

Thomas,
[ch1089]ould you please explain what you mean here? is it about automation interface or something else?

Thanks,
Alex.

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: import connectors from csv
« Reply #9 on: April 03, 2008, 03:33:26 am »
I mean that a repository is just a database and it is quite possible to build components and connectors with SQL writing directly into the tables of the dataset.  The only problem is a near total lack of documentation.  I will probably produce some one of these days, but it might be a few weeks.  My current work has been building a fairly good sized model this way.

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: import connectors from csv
« Reply #10 on: April 03, 2008, 10:20:18 am »
Alex,

Tags are stored in 3 key tables - t_connectortag, t_attributetag and t_objectproperties.

What I do is created a flattened selfjoining view (requires DBMS deployment), then use column based "pasting" via MS Access.

For example (SQLServer)

create view my_apps
as
select t_object.name, prop1.value as "licenses", prop2.value as "vendor"
from t_objectproperties prop1 with (nolock), t_objectproperties prop2 with (nolock), t_object with (nolock)
where t_object.stereotype = 'foo'
and t_object.object_id = prop1.object_id and prop1.property = 'Licenses'
and t_object.object_id = prop2.object_id and prop2.property = 'Vendor'

The above will give you the licenses and vendor tagged values for all your objects with stereotype "foo" as defined in your profile.

Create an ODBC datasource to your SQL database.

Open up MS Acces -> linked table manager -> link to the my_apps "table"

Open the table.  You can now do column based pasting or updates.  Note you can only do one column at a time per row (as SQL Server gets confused on which table to update if more than one column per row is updated).  However, you can select say 5 rows of data in a spreadsheet / CSV within one column - then "paste" that into MS Access to update it.

I actually use a SQL / DTS based version for bulk loading aka Thomas, but the above is useful for a little manual maintenance or for nonSQL skilled people.

PS: The "with (nolock)" prevents SQL Server from placing a read lock on rows read by the MS Acces cursor.  Otherwise, EA users will "freeze" when someone opens up the MS access view (since MS access will be read locking the rows EA users are trying to update). Of course there are concurrency issues, but you have to decide which in your environment is the lesser of the evils.

Cheers,
david.
« Last Edit: April 03, 2008, 10:23:22 am by Dave_Bullet »
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"