Add custom resource types (MDP)
One of the primary ways of organizing data in data.world is by resource types such as business terms, tables, datasets, and projects. This section will talk about creating custom subtypes for these resources to extend them further to meet your business needs.
If the resource you wish to add is not available out-of-the-box, you can always extend the system by add custom resources and custom subtypes for those resources. For details see, Add custom resources.
Why would I do this?
This task walks you through the process of adding custom types for the following resources:
Business terms
Analysis
Database tables
Columns database views
Columns
Custom resources
Note
Note that custom types cannot be added for datasets and projects.
STEP 1: Add custom types for business terms
Use the following syntax to add custom subtype Metric for business terms.
# An example of a custom glossary term, a Metric. :Metric a rdfs:Class ; rdfs:subClassOf dwec:BusinessTerm; rdfs:label "Metric" ; label:plural "Metrics" ; .
Use the following syntax to add a few more custom subtypes for business terms:
:BusinessRule a rdfs:Class ; rdfs:subClassOf dwec:BusinessTerm; rdfs:label "Business rule" ; label:plural "Business rules" ; . :DataAttribute a rdfs:Class ; rdfs:subClassOf dwec:BusinessTerm; rdfs:label "Data Attributes" ; label:plural "Data Attributes" ; . :Policy a rdfs:Class ; rdfs:subClassOf dwec:BusinessTerm; rdfs:label "Policy" ; label:plural "Policies" ; . :ReferenceCode a rdfs:Class ; rdfs:subClassOf dwec:BusinessTerm; rdfs:label "Reference code" ; label:plural "Reference codes" ;
Results!
Browse to the Glossary tab of the organization profile and create a new glossary term. You will see the option to add new types of glossary terms.
Try another subtype for glossary terms
Use the following syntax to add another glossary subtype called Acronym.
:Acronym a rdfs:Class ; rdfs:subClassOf dwec:BusinessTerm; rdfs:label "Acronym" ; label:plural "Acronyms" ;
STEP 2: Add custom sub types for analysis
Use the following syntax to add custom subtype Use case for Analysis.
:UseCase a rdfs:Class ; rdfs:subClassOf dwec:Analysis; rdfs:label "Use Case" ; label:plural "Use Cases" ; .
Now, add the following line to the :MetadataProfileDefault section to make the custom sub type available for creating from the UI:
dwec:allowsInstantiationOf [ dwec:forType :UseCase ] ;
:MetadataProfileDefault rdf:type dwec:MetadataProfile ; rdfs:label "Metadata profile default" ; dwec:allowsInstantiationOf [ dwec:forType :UseCase ] ; . [ dwec:metadataProfile :MetadataProfileDefault ] .
Results
Note
Further enhance the custom resource pages with custom icons.