Formatting a CSV for Entities and Associations Import

From PHENOM Portal Knowledgebase
Revision as of 17:15, 2 January 2026 by Annie (talk | contribs) (Element and Attribute Specialization)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To bulk import model content, the CSV file should be formatted as described in this article.


General Column/Data Requirements

The following column headers must exist and contain data in each row:

  • Element_Name
  • Operation_Type
  • Attribute_Name
  • Attribute_Type

The following columns are optional:

  • Element_Description
  • Element_Tags
  • Attribute_Description
  • Attribute_Tags
  • Association_Path
  • Package_Name
  • Package_Description
  • Package_Tags
  • Element_Specialization
  • Attribute_Specialization

Column-specific Requirements

Element Name & Description

  • If an Entity (or Association) with a matching name is found in the model, the attribute will be added to it.
  • New created elements default to a type of Entity.
  • If an Entity (or Association) is created, the description is applied to that new element. If the element already exists, its description (if not an empty string) will be updated with the description provided here.

Operation Type & Association Path

  • Must be set to 'Composition' or 'Association'. If Operation_Type is Association, then the Element will automatically be turned into an Association.
  • If the Attribute already exists, it will be updated to be an Associated Entity (i.e., turns the Entity into an Association)
  • There MUST BE AT LEAST TWO associated entities or the creation/update operation will fail. It is possible to only add a single associated entity if the element already exists and already contains an associated entity.
  • By default, the Association Path is empty. This is an advanced concept used to relate to specific attributes of an element rather than the entire element itself.

Attribute Name, Type & Description

  • Attribute_Name is the desired name for the attribute.
  • Attribute_Type must be a valid Observable, Entity, or Association that either
    • exists in the model, or
    • was created on a previous row.
  • Attribute_Description is the description that will be applied to that attribute. If the attribute already exists, its description (if not an empty string) will be updated with the description provided here.

Package Name & Description

  • These columns allow you to place new entity in the package specified by Package_Name. If a package with the provided name does not exist, the new package will be created under the PhenomEntities package.
  • Package_Name specified the name of the existing/new package.
  • Package_Description specifies the description that will be applied to that package.

Element and Attribute Specialization

  • These columns can be used to create new elements specializing other new elements, create new elements specializing existing elements, and update existing elements to specialize new or existing elements.
  • If an element has a child with the same rolename and type as a child to be inherited via a new specialization, Phenom will attempt to align these attributes.
  • The Attribute_Specialization column is used to denote a specialization when that attribute doesn't necessarily align with the rolename and type of the target specialized attribute. This column must be paired with the Element_Specialization column.
  • Remove a specialization by filling in the corresponding column with <REMOVE>.

Tagging (Optional)

  • Optional columns can be added in to CSV to tag new Packages, Elements, or Attributes.
  • Each field can have multiple comma delimited tags.