Book a Demo

Author Topic: CSV Import  (Read 4685 times)

piku

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
CSV Import
« on: November 05, 2019, 08:07:51 am »
Hi,
Is there a way to automatically run csv import after configuring csv exchange specification?
Or do we always have to click run button manually?
Thanks

sousac

  • EA User
  • **
  • Posts: 22
  • Karma: +2/-0
    • View Profile
    • Integrationworx, a Sparx EA Authorized Training Partner
Re: CSV Import
« Reply #1 on: November 05, 2019, 01:14:57 pm »
Hi Piku,

That is an odd event to trigger an import on (why would you want to automatically import data when you've only created or changed the specification which tells you nothing about the readiness of the data for import?). 

Maybe let us know what you are trying to generally achieve and perhaps someone would have a suggestion.
- Claudio

piku

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: CSV Import
« Reply #2 on: November 06, 2019, 06:00:22 am »
Hi,
I need to push the status of requirements using from some other system which uses sql server.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: CSV Import
« Reply #3 on: November 06, 2019, 09:34:58 am »
Hi Piku,

Unfortunately there is no API for using the built-in CSV Import/Export Specifications feature from a script or add-in, however you could write your own functionality for reading in the CSV file and then using the EA Object Model to make the necessary additions or updates to your model.

For example, Enterprise Architect includes scripting libraries to assist with writing your own custom CSV Import/Export functions using EA's automation and scripting interface. These libraries allow much greater control over CSV import/export (E.g. import/export of attributes, operations, connectors, etc). Scripting is available in EA Corporate edition or higher. See the "Scripting" topic in EA help for details. The CSV scripting library can be found under Specialize > Tools > Scripting > EAScriptLib > JScript-CSV.

You can find some import and export script examples on the following pages:
http://sparxsystems.com/forums/smf/index.php/topic,25388.msg201695.html#msg201695
http://sparxsystems.com/forums/smf/index.php/topic,25389.msg201697.html#msg201697