The Entities tab allows you to configure how entities are created and updated. These entities can represent objects or events and will be stored in your model. You can use the Relationships tab to link them to other entities and create relationships. To create entities for your model, you will need to complete the following information:
- Enter the name of your model in the Model field.
- Click Add... to create a new entity. The Add Entity dialog box will appear.
- Select the field name to be used to generate the Entity ID in the Input field field.
- If you want the entity to have a name other than what is automatically provided, change the contents of the Type field to the desired name.
- On the Properties tab, you define which properties you want to be
included with the entity type you are creating.
For example, if you are creating an entity type that represents places, you might want to choose latitude and longitude as properties. You can select Input or Metadata, depending on what you want to use to define the properties. If your model does not contain metadata, that option will be disabled.
Option Description Input The grid is populated with input fields, which are shown in the Field column; there is one row for each input field. Select the fields you want to be included as properties for the entity type by checking the Include box for that field. The Name column represents the name you want to property to have in the model; it defaults to the input field name, but you can select from any property in the Name drop-down or manually enter a name.
Note: Spectrum supports both simple and complex data types; you can use fields deep within the hierarchical structure of your input file as an entity. If you are using hierarchical data, you will also see a Filter control that allows you to filter out data on the Property list based on the path of the field. Likewise, you will see a control that allows you to hide non-primitive fields.Metadata The grid is populated with properties from the metadata, which are shown in the Name column; there is one row for each property. The properties shown are determined by whether you are defining a known entity type. If it is a known type, the Name column will include properties specific to that type; if it is not a known type, the Name column will include a list of all properties in the model. Select the properties you want to populate for the entity type by checking the Include box for that property. The Field column contains names of input fields you can map properties to and whose data can be used to populate properties. If an input field matches the property name, it will automatically be mapped and the Include box will be checked. -
Click the Updates tab and select how you want Write to Model to manage updates.
After an entity is created it can be updated over time when data with the same ID is input into the Write to Model stage.
Option Description Always update properties Properties are always updated with the most recent information. This includes updating with null or empty strings. Update properties unless all input is null Properties are always updated unless all input fields associated with the selected properties are null. Never overwrite non-empty properties Properties are never updated once populated with non-empty data. Never overwrite properties with empty input data Properties are always updated unless the input is a null or empty string. - Repeat steps 4 through 6 to add additional entities. When you are done adding entities, click Close.
- Select which fields you want to be indexed in your model by clicking the
Indexes... button and checking the box for those
fields.
In the Type column, you can choose whether the data should be indexed exactly as-is, with case sensitivity, or if it should be indexed without case sensitivity, which typically results in greater response to a search.Selecting which fields to index, rather than indexing all fields in your model, results in faster performance when writing to a model. However, if you later attempt to query fields in your model that were not indexed, the response time will be slower.Note: Index properties can be no longer than 8164 bytes. An index property that exceeds 8164 bytes will be treated as a malformed record.