CSV Data Import - Properties

Started by Lieven, November 14, 2023, 11:29:06 AM

Previous topic - Next topic

Lieven

Hi,

I am using the CSV import functionality already for a long time. Everything is working fine.

The only thing what is not consistent is when you want to update elements with properties.

The element update itself is working fine. When you have multiple instances of an element, it updates the element itself.  So the last instance is in your model.  For properties, even though the ID is unique and the property value is also unique, it adds the multiple instances as new properties.  In the example below you will end up with three properties "Pillar" in the element with ID "P.1.3":

"P.1.3","Pillar","Technology"
"P.1.3","Pillar","People"
"P.1.3","Pillar","Process"

Is this a suggestion for improvement or a feature request ?  When updating your models with elements with properties on a regular basis, you will end-up with a lot of properties...

Br, Lieven

Phil Beauvoir

#1
Hi, yes this is expected behaviour when importing from CSV. Sometimes users want to add the same Property with different values. If you want to update a Property only once then only include it once.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Lieven

Hi,

I can understand this approach from a single import point of view.  From a multiple import point of view, this make less sense...  This could be solved by including a checkbox to allow flexibility to the user and support both approaches.  Is this something you could consider for the future ?

Br, Lieven

Phil Beauvoir

Quote from: Lieven on November 14, 2023, 11:55:36 AMHi,

I can understand this approach from a single import point of view.  From a multiple import point of view, this make less sense...  This could be solved by including a checkbox to allow flexibility to the user and support both approaches.  Is this something you could consider for the future ?

Br, Lieven

You can open a feature request if you wish, but as the Archi backlog is so big, and there's only one of me, it would remain a low priority.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Lieven

Understood.  Thanks for your support.

Do you have other suggestions to keep your models up-to-date with external information sources?  If you want to realise this through the import function you need this functionality.

Jean-Baptiste Sarrodie

Hi,

Quote from: Lieven on November 14, 2023, 13:10:26 PMDo you have other suggestions to keep your models up-to-date with external information sources?

You can do it with jArchi scripts. I've share a script for that some years ago. a new version is ongoing and should be publish in the coming months, but this one still works fine: https://gist.github.com/jbsarrodie/77e1e6779ace738a15c0bdcf551d68ec

Regards,

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

UAEArchitect

Can you provide an example file and tell me the structure of the CSV file for uploading new items to Arch?
I can't do it with standard Import. :(
It is not clear where to take and whether it is necessary to load ID's for elements.

Phil Beauvoir

Quote from: UAEArchitect on January 19, 2024, 13:34:09 PMCan you provide an example file and tell me the structure of the CSV file for uploading new items to Arch?
I can't do it with standard Import. :(
It is not clear where to take and whether it is necessary to load ID's for elements.

This is explained in the User Guide on page 98 ("Exporting and Importing the Model in CSV Format") - https://www.archimatetool.com/downloads/archi/Archi%20User%20Guide.pdf

The best way to see the CSV format is to export a model to CSV and look at the output files in a text editor.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.