Archi Forum

Archi => General Archi Discussion => Topic started by: tommy_ng@gwu.edu on May 15, 2015, 17:01:15 PM

Title: Importing multiple properties using csv file
Post by: tommy_ng@gwu.edu on May 15, 2015, 17:01:15 PM
Hi,
I was able to import via csv a number of elements into archi (with id's).  But when it came to uploading multiple properties for each of the elements, I was unable to figure out how to do this.  I was able to import one key, value pair for one property but would like to upload multiple properties to an element.  Is there any way to do this?  I even tried to upload each key, value pair in separate properties files.
Title: Re: Importing multiple properties using csv file
Post by: prgee on May 18, 2015, 14:30:45 PM
Multiple properties for each element can definitely be imported during a single operation. You just have to create your CSV files as in the following example:

ArchiSurance-elements (note that you only need the header in the "elements" file since you are only importing properties):
ID,Type,Name,Documentation

ArchiSurance-properties (repeat the element ID for each user property you wish to add):
ID,Key,Value
90f75b18-46f9-4c40-9cf1-3d624c5c3739,user-property-1,user-value-1
90f75b18-46f9-4c40-9cf1-3d624c5c3739,user-property-2,user-value-2
90f75b18-46f9-4c40-9cf1-3d624c5c3739,user-property-3,user-value-3
90f75b18-46f9-4c40-9cf1-3d624c5c3739,user-property-4,user-value-4
90f75b18-46f9-4c40-9cf1-3d624c5c3739,user-property-5,user-value-5
90f75b18-46f9-4c40-9cf1-3d624c5c3739,user-property-6,user-value-6

This import file will add all 6 user properties along with their values to a single element.

Regards,
Peter
Title: Re: Importing multiple properties using csv file
Post by: Jean-Baptiste Sarrodie on May 18, 2015, 14:38:10 PM
Hi,

I would add that you can not import multiple values for the same property name (the import will always update the property if it already exists).

Regards,

JB
Title: Re: Importing multiple properties using csv file
Post by: tommy_ng@gwu.edu on May 18, 2015, 14:53:32 PM
that worked, although i still get error importing message saying "File should contain element information" when i import the properties file.

thanks, i will make note of multiple values for same property.  but i rather it update existing value if key exists for the element.