Add custom resources (MDP)
If you would like to add a resource type to your data.world catalog, then you can do so by adding custom resource types in the Metadata Profile.
Why would I add custom resources?
One of the primary ways of organizing data in data.world is by resource types such as tables, datasets, and projects. If there is a specific type of resource not included with data.world that you would like to use, then you can create a custom resource type.
Planning your custom resources
Plan the list of custom resources you need for your organization.
Define the type of custom resources.
Follow this documentation, if you want to make these resources read-only.
Specify the custom resources users can create from the UI.
Note
Note that once the types of custom resources are defined, they can be created and edited from the UI!
We will explain this task with an example. The end goal will be to add:
Two types of custom resources - Bank accounts and Credit cards.
Users will be able to create both custom resources from the UI.
STEP 1: Add the first type of custom resource
Browse to the ddw-catalogs dataset in your organization. Find the Metadata profile file.
Note
For steps of updating the Metadata profile file, see Updating the metadata profile.
Use the following syntax to add the first type of custom resource Bank accounts.
:BankAccount a owl:Class ; rdfs:label "Bank account" ; label:plural "Bank accounts" ; .
STEP 2: Add the second type of custom resource
Use the following syntax to add the custom resource type Credit card.
:CreditCard a owl:Class ; rdfs:label "Credit card" ; label:plural "Credit cards" ; .
STEP 3: Make both custom types available in UI for creation
Now, add the following line to the :MetadataProfileDefault section to make both the custom resources available for creating from the UI:
dwec:allowsInstantiationOf [ dwec:forType :CreditCard ], [ dwec:forType :BankAccount ] ; Do not enable this for resources intended to remain read-only for users.
#Define the collection #Make the fields available in the UI :MetadataProfileDefault rdf:type dwec:MetadataProfile ; rdfs:label "Metadata profile default" ; dwec:allowsInstantiationOf [ dwec:forType :CreditCard ], [ dwec:forType :BankAccount ] ; . [ dwec:metadataProfile :MetadataProfileDefault ] .
Note
Further enhance the custom resource page with custom icons.
Complete syntax after completing these steps
Here is the final syntax after completing the task.
#Make the fields available in the UI :MetadataProfileDefault rdf:type dwec:MetadataProfile ; rdfs:label "Metadata profile default" ; dwec:allowsInstantiationOf [ dwec:forType :CreditCard ], [ dwec:forType :BankAccount ] ; . [ dwec:metadataProfile :MetadataProfileDefault ] . :BankAccount a owl:Class ; rdfs:label "Bank account" ; label:plural "Bank accounts" ; . # Add credit card. :CreditCard a owl:Class ; rdfs:label "Credit card" ; label:plural "Credit cards" ; .
Final result🥳
Go to the Organization Profile page and on the Resources tab, open the New Resources button dropdown.
Select the Custom resource option.
In the Add resources window, you will see the new options for creating custom resources.
You can now view the newly created custom resources on the Resources tab.