Skip to main content

Add custom resources

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

  1. Plan the list of custom resources you need for your organization.

  2. Define the type of custom resources.

  3. 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:

  1. Two types of custom resources - Bank accounts and Credit cards.

  2. Users will be able to create both custom resources from the UI.

    custom_resources.png

STEP 1: Add the first type of custom resource

  1. 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.

  2. 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 ] ;

    #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šŸ„³

  1. Go to the Organization Profile page and on the Resources tab, open the New Resources button dropdown.

  2. Select the Other resources option.

    other_resources.png
  3. In the Add resources window, you will see the new options for creating custom resources.

    add_custom_resource.png
  4. You can now view the newly created custom resources on the Resources tab.

    custom_resources.png