Book a Demo

Author Topic: CSV import with preserve hierarchy  (Read 6952 times)

Pegasus

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
CSV import with preserve hierarchy
« on: November 08, 2016, 07:45:38 pm »
I do have a problem with CSV import and the colums CSV_KEY and CSV_PARENT_KEY.
Scenario: I import data from a separate "Requirement management" system exported to Excel. this system exports ID and hierarical relations as reference to the actual numerical ID. To import in EA(13) it is necessary to write into CSV_KEY the name of the element and in CSV_PARENT_KEY the name of the parent element. Unfortunaltely it is not possible to use own identifier. So I get warning if e.g. the parent is a package wit name XXX and the underlying element (Requirement) has identical name XXX. Do I something wrong. If not than it is desirable that SPARX adds possibility to use selfdefined token also numerical values for CSV_(PARENT_)KEY.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: CSV import with preserve hierarchy
« Reply #1 on: November 08, 2016, 07:51:10 pm »
Hello,

I'd leave the CSV_KEY and CSV_PARENT_KEY alone if I were you. They're EA's, and they're not visible in the model (they only exist in the CSV file), which means you can't do any sort of fault finding with them.

Instead, add a tagged value value column to your CSV import/export definition and put the other tool's unique ID in that. That way, those identities will be present in the model as well which is usually useful.

Secondly, are you really getting warnings for conflicting names? If so, that sounds like a serious (and new) bug to me. EA doesn't generally use names as identifiers, in CSV data or elsewhere.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

Pegasus

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: CSV import with preserve hierarchy
« Reply #2 on: November 08, 2016, 08:32:25 pm »
Hello Uffe, thanks for reply. Maybe I expressed misunderstanding. I need to use the CSV_(PARENT_)KEY columns to build the hierarchy in EA like the other tool respectively excel export. If CSV_(PARENT_)Key are emtpy all elements (Packages, Requirements, ..) will generate plane. thats not what I need.  The IDs itself I import into Tagged values as you describe

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: CSV import with preserve hierarchy
« Reply #3 on: November 10, 2016, 12:04:32 pm »
Hello Uffe, thanks for reply. Maybe I expressed misunderstanding. I need to use the CSV_(PARENT_)KEY columns to build the hierarchy in EA like the other tool respectively excel export. If CSV_(PARENT_)Key are emtpy all elements (Packages, Requirements, ..) will generate plane. thats not what I need.  The IDs itself I import into Tagged values as you describe
Hi Pegasus,

We've done imports from external models using hierarchies.

I think your problem is that EA uses the NAME as the key to create the hierarchy.  Consequently, you need to have unique names for all the elements (rows in the CSV) for it to work.  If you  have access (pun intended) to the underlying repository database, you can rename the element names in the CSV (say by adding a type to the name: REQ_) and then once imported, rename them in a global fashion in the tables themselves.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!