Step 4: Verify and update the generated Vocabulary
- Last Updated: December 17, 2020
- 2 minute read
- Corticon
- Version 7.2
- Documentation
Produce a Vocabulary Report
The import of Datasource metadata to build a Vocabulary is a processed through a best-effort algorithm. You should produce a Vocabulary report to review the entity names, attribute names and their data types, and the implied associations.
Adding and deleting
You can delete any entity (which deletes all its attributes) and any attributes and associations. Be careful not to delete primary keys. The effect of deletions in the Vocabulary are local. The deletions do not affect the Datasource. You can add attributes, and because the metadata you imported was not deleted, you can re-add a deleted attribute and bind it to the column in the Datasource.
Doing updates from a Datasource is not a synching operation. There is no provision for removing metadata that is no longer in the Datasource.
Refactoring names
You can rename any entity and attribute even if it is a just a case change.
For example, you can refactor dob with DOB. It is important that you refactor, not rename, so that other instances of the name
in the Vocabulary such as associations are also updated.
If you repopulate the Vocabulary from the Datasource, then the name you entered is retained while it is still logically the Datasource column name.
Data types
The algorithm in the import makes a best effort to map the Datasource's data
type to a corresponding Corticon data type. The data type for an attribute is evaluated
in this order: Datetime, Time, Date, Decimal, Integer, String, and Boolean. Some
Corticon data types might not get picked for attributes because of an overload of
possible mappings (such as, Date and Time could always be created as Datetime). Note
that these decisions are derived from data when data is in a REST source that does not
have a schema. After import, you can revise the data type, for example when you have
custom data types that apply constraints, or date of birth imports as Datetime when your
rules want just Date, or when "flight_number":55 is
imported as an integer data type when you want it as a String,
Mandatory
Whether an attribute is mandatory is set by you. It is not changed on a re-import.
Associations
The metadata from the Datasource often provides correct associations. When you use multiple Datasources, you need to create the associations between entities. In all cases, review your associations.
Transients
You can add transients. If you change an imported attribute to a transient, then its binding to its Datasource column is dropped.
Foreign keys
When if both the source and target table are mapped in the Datasource, then an association is created for each foreign key for each table.
Domains
You might need multiple domains. If you use REST Datasources, then you need to rename the existing domains before importing a new one.