CSV Export - Source/Target Name

Started by Vjerab, November 13, 2015, 14:22:08 PM

Previous topic - Next topic

Vjerab

Hi,

I was wondering if there is a way to get the object name instead of IDs in the Source and Target columns, when exporting the relationships into CSV?

Thank you.

Phil Beauvoir

If you did this you would not be able to match up the source and target elements should you want to post-process the files.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Vjerab

Quote from: Phil Beauvoir on November 13, 2015, 14:32:40 PM
If you did this you would not be able to match up the source and target elements should you want to post-process the files.
Fair enough, but is there an option in case I don't want to post-process or an option to have both ID and the name in the extract file?

Thanks.

Phil Beauvoir

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

prgee

Hi,

It's pretty easy to use Excel (or your favorite spreadsheet) to do this after you export the model. Just open the "elements.csv" file and then create a second worksheet tab where you will copy/paste the contents of "relations.csv". Then you can use the "vlookup" function to retrieve the name from the proper row the "elements" tab, using the ID value as the lookup key.

I've attached a sample (in MS Excel) that illustrates this. Note that in Excel you must set the "range lookup" parameter to "false" so it does an exact match on the ID column.

Cheers,
Peter

Phil Beauvoir

Thanks for that, Peter.  8)

Another approach in getting the exact data that you want is to use XSLT to transform either the Archi native XML file, or The Open Group's ArchiMate exchange format XML file. One could create an XSLT to generate CSV, other XML, or HTML. I blogged about it here - http://blog.archimatetool.com/2015/09/28/generating-content-from-an-archimate-exchange-format-file-using-xslt/

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.