The primary way to create and configure a new object type is with a guided step-by-step helper. The guided helper is the recommended method, but if you exit the helper before completing the object creation process, you can also manually complete the process by specifying the metadata, backing datasource, property mappings, and keys (primary and title) for the new object type.
After creating a new object type, you can change the API name from the assigned default.
This page also contains troubleshooting information on the new object type creation process.
To create a new object type, select the New object type button from the home page header.
After selecting New object type, the Create new object type helper will appear.
If you have an existing datasource in Foundry containing data to back the object type then you can select it. This will automatically populate the object type's metadata. It will also map every column of the backing datasource to a property, but you can discard added properties in the Properties step.
A backing datasource for an object type may not contain MapType
or StructType
columns.
If you do not have an existing datasource containing data for the object type, you can choose to continue without an existing datasource. This option is not available if you are using Object Storage V1. Because the permissions of the objects of a type are determined by the location of their backing datasources, you will be prompted to choose a location to save an empty dataset to.
In the next step you will be prompted to provide the following information regarding your new object type:
In the third step of the dialog you can customize which properties the object type will have. If you have chosen an existing Foundry datasource, any columns will be mapped automatically, but can be discarded during this step.
Every object type requires at least one property. This is because object types need a primary key to uniquely identify them. The wizard allows you to add any other desired properties.
Note that property types that require advanced configuration, such as media, cannot be generated as part of the bootstrapping wizard and must be added after you have exited it.
As part of the Properties step you need to choose a primary key and title key:
full name
property as the title key of the Employee
object type would use the values of that property, such as “Melissa Chang”, “Akriti Patel”, or “Diego Rodriguez” as the display names for each respective notional Employee
object.employee ID
property will be used to identify “Melissa Chang” as a unique employee within the organization.A list of supported property types can be found in the object type properties documentation.
Be sure to check your backing datasets for duplicates before assigning a primary key. The primary key you select must be unique for every record in the dataset. If your Ontology is using Object Storage V2, a duplicate primary key will cause Funnel batch pipeline errors leading to a build failure. If you are using Object Storage V1 (also known as Phonograph), an update will appear as successful; however, the duplicate primary keys can cause unexpected changes to your Ontology.
Primary keys should be deterministic. If the primary key is non-deterministic and changes on build, edits can be lost and links may disappear. Edits can be lost because Ontology edits are associated with the primary key of the object. Links between objects can disappear if builds are not coordinated to update link IDs. To ensure deterministic primary keys, you should define pipeline logic such that the primary key is the function of either a single column or multiple columns. Avoid using numbered row or random key generation, since these can cause primary keys to change between build runs.
This step is not available if you are using Object Storage V1. In the fourth and final step you can optionally generate a standard set of Actions to edit objects of this type and assign a specific user or group that can run them.
Once you have finalized the object type and exited the wizard, you can still make edits to these Actions or create new additional Actions.
When you are done filling in these fields, select Create. Selecting Create will only stage your changes and will not save them. To save your new object type to the Ontology, follow the instructions on how to save changes to the Ontology.
When creating a new object type with the helper, it is possible to select Create before completing all of the steps in the Create a new object type helper instructions above. Selecting Create before the process is complete will exit the helper and bring you to the Overview page.
At this point, the object type is unsaved and cannot be saved until all of the steps below have been completed. The steps for completing the creation process manually (outside of the Create a new object type helper) are described below:
On the Overview page’s metadata section, you can edit the object type’s display name, plural display name, description, and ID:
Groups are labels that help categorize object types. From the object type metadata widget, you can:
Groups are searchable in the Ontology Manager's Search bar and Search bar dialog. The table of object types in the Ontology Manager supports displaying and filtering by group. Groups are also displayed on the Object Explorer home page.
Groups as labels in object type metadata replace the previous method of adding oe_home_page_object_type_group
type class to the primary key property; this previous method is no longer available.
In order to populate property values for objects of this type with data, you must add a backing datasource. You can do this by:
From within the property editor, select Add in the Properties pane on the right side of the screen. This will add a new property to the object type.
It is possible to map properties to columns in a backing datasource in any of the following ways:
In the datasource pane on the left side of the screen (see image below), you can see all of the columns of the datasource. Hover over the column you want to map and select the Add as a new property button to create a new property mapped to this column. The property ID, display name, and base type will be inferred from the name of the column.
In the datasource pane on the left side of the screen, you can see all of the columns of the datasource. Hover over an unmapped column and select the Add as a new property button. If a property already exists with a property ID that matches the column name, the column will be mapped to the existing property.
In the properties pane on the right side of the screen, hover over the property you want to map to a column and select Map to a column. This will open a dropdown from which you can select the column you want to map to your property.
Next to the datasource name in the datasource pane, you will find an Add all unmapped columns as new properties button. Selecting the button will create properties for all the unmapped columns in the datasource. The IDs, display names, and base types of the properties will be inferred from the corresponding columns in the datasource.
Now that you've created your new object type, added a backing datasource, and mapped it to new properties, you still need to configure the primary key and title key before being able to save your object type. You can navigate to the property metadata pane in the property editor (see image below) to set a property as the primary key and title key:
employee ID
property will be used to identify “Melissa Chang“ as a unique (notional) employee within the organization.full name
property as the title key of the Employee
object type will use the values of that property, such as “Melissa Chang”, “Akriti Patel”, or “Diego Rodriguez” as the display names for each respective notional Employee
object.Be sure to check your backing datasets for duplicates before assigning a primary key. The primary key you select must be unique for every record in the dataset. If your Ontology is using Object Storage V2, a duplicate primary key will cause Funnel batch pipeline errors leading to a build failure. If you are using Object Storage V1 (also known as Phonograph), an update will appear as successful; however, the duplicate primary keys can cause unexpected changes to your Ontology.
An API name is the name used when referring to an object type or a property programmatically in code. All new object types and properties are automatically assigned API names that are inferred from their display names. Learn more about API names.
You can change the automatically assigned API names as follows:
Object type API names follow functional coding standards. An object type’s API name must:
A property’s API name must:
To save a new object type, the following object type fields must not be empty:
Additionally, the following property fields must not be empty:
Object type IDs:
Property type IDs:
In line with functional coding standards, an object type’s API name must:
A property’s API name must:
Note that there are a number of reserved keywords that cannot be used for API names. They are: ontology
, object
, property
, link
, relation
, rid
, primaryKey
, typeId
, and ontologyObject
.
Phonograph2:DatasetAndBranchAlreadyRegistered
If you receive the error Phonograph2:DatasetAndBranchAlreadyRegistered
, the datasource backing the object type you are trying to save is already backing a different object type in the Ontology and cannot be used again.