API Reference > Manage data quality scores > Import data quality scores
  

Import data quality scores

Use the import data quality score API to import data quality scores to data quality rule occurrences.
The following table provides the HTTP method and endpoint for the API call:
Method
Endpoint
POST
<baseApiUrl>/data-quality/v1/rule-occurrences/runs
The <baseApiUrl> differs for each pod. For more information, see Send Requests.
If you update data quality scores through API, the updated data quality scores can take up to one hour to reflect in the Total Runs Table of the Score tab of a rule occurrence.

Prerequisites

Before you import data quality scores to data quality rule occurrences, verify that your organization administrator has assigned you the appropriate permission.
You can import data quality scores only if your administrator grants you the Update permission on data quality rule occurrences through access policies in Metadata Command Center.

Request body

Use the request body to upload the import file with scores for data quality rule occurrences.
The following table describes the parameter that you can specify in the body of the request:
Parameter
Description
file
Specify the full path to an import file. The import file must contain the data quality scores of the rule occurrences that you want to import into Data Governance and Catalog.
You can upload only one CSV file per request, with a maximum file size of 10 MB.
Ensure that you populate all the fields of the file that you import.
The following table describes the columns of the import file:
Column
Description
Reference ID
Enter the reference ID for the data quality rule occurrence for which you want to import the data quality score.
Score
Specify the data quality rule score for the asset that corresponds to the rule occurrence.
Type of Entry: Numeric value.
Enter a value between 0 and 100 without the percent sign.
Note:
When you upload data quality scores in Data Governance and Catalog using bulk upload, the scores are automatically rounded to two decimal places. If you set a score with more than two decimal points, the score is rounded to the nearest value and retains only two decimal places.
Total Rows
Specify the total number of rows for which the data quality rule is run.
Type of Entry: Numeric value.
Enter a positive integer value.
Failed Rows
Specify the number of rows where the data quality rule run failed.
Type of Entry: Numeric value.
Enter a positive integer value.
Scanned Time
Specify the date and time on which the data quality rule was run on the assets.
Type of Entry: To specify a date and time, use the YYYY-MM-dd'T'HH:mm:ss.SSS'Z' format.
Example: 2000-10-31T01:30:00.000-05:00
Exception File Path
Specify the path where the exception records are stored. An exception is a record that fails to meet the criteria defined by the data quality rule occurrence.
Type of Entry: Formatted text.
Enter the complete path of the location of the file where the exception records are stored. Ensure that the path includes the name and extension of the file. Do not enter hyperlinks.

Example request

The following example shows a request to import data quality scores to data quality rule occurrences:
Request query
POST https://idmc-api.dm-us.informaticacloud.com/data-quality/v1/rule-occurrences/runs
Authorization: Bearer <jwt_token>
Content-Type: multipart/form-data
X-INFA-ORG-ID:<Org ID>
Request body
file: SalesScores.csv

Response body

When you send a POST request to import data quality scores to data quality rule occurrences, the API triggers a job to import the scores.
The following example shows the response of the POST request to import data quality scores from the file SalesScores.csv:

{
"jobId": "6a084b71-3696-4a50-b83b-9ef0f2c7f30d",
"jobUri": "/data360/observable/v1/jobs/6a084b71-3696-4a50-b83b-9ef0f2c7f30d"
}
The following table describes the response body parameters for the import API request:
Parameter
Description
jobId
Unique ID of the import job that the request triggers.
jobUri
Job tracking URI that you can use to send a GET request to monitor the status of the import job.
A maximum of 5 jobs can be active at a time.
For more information about using the jobs API to monitor the status of jobs, see Monitor jobs.