Create custom data quality badges (CTK)
This topic explains how to add data quality badges to resources in your catalog. By default, the catalog provides three out-of-the-box badges—Good, Moderate, and Poor—to indicate data quality. If these options do not meet your needs, you can create custom badges. These badges are used in the Data Quality API.
Add a new custom data quality badge
Important
Perform this task in the Catalog Configuration organization.
To add a new custom data quality badge:
On the Organization profile page, go to the Resources tab.
Click the New button and select Catalog resource.
On the Create a new resource page, in the Select type tab, select Status. Click the Continue to configure fields button.
The Create a new Status page opens.
In the Configure fields tab, set the following in the About section.
In the Title field, provide a label for the data quality badge you want to add.
Important
If you change the title of the data quality badge after it is in use in the destination organizations, you must setup the IRI override to maintain seamless object visibility and functionality across all systems.
From the Collections dropdown, select the Metadata profile collection.
In the Configure fields tab, set the following in the More information section.
In the Status category field, select Data Quality Badge. A data quality badge appears on the search card and the resource page. For details, see Data quality.
In the Status disposition field, select from Positive, Negative, Neutral. This disposition determines the color of the badge - that is - Green (positive), Red (negative), or Yellow (neutral).
Click Continue to review the status.
In the Review status tab, check the configuration details for any possible errors before saving it. If adjustments are needed, click Back to edit the configuration.
Click Create. The creation page is closed and you are taken to your new Status page.
Publish the changes
See: Publishing changes.
Retriev the IRI of the badge
Important
Perform this task in the Sandbox or Main organization.
In the Sandbox or Main organization, browse to the DDW Sandbox Catalog (ddw-catalog) dataset.
Click Launch workspace to open the query editor space.
Run the following SPARQL query to find the IRI of the badge you just added.
SELECT ?badgeLabel ?badgeIri ?sentiment FROM : WHERE { ?badgeIri rdf:type kos-data-quality:Badge ; rdfs:label ?badgeLabel ; kos-data-quality:hasSentiment ?sentiment . }
In the Results pane, in the badgeiri column, click the arrow and uncheck the Hide IRI prefixis option.
Locate the custom badge you want to use in the data Quality API and note down the IRI of the badge.
Use the custom badge IRI while setting up API for data quality.
View the results
The custom badge is now visible on the resource pages.