Automating data quality remediation
When you enforce data quality through a data contract whether through API calls or in a data product, you can have tickets automatically created whenever the data quality requirements of a data contract aren't met.
The data quality remediation capability provides an automated way to analyze data quality and contract violations, identify root causes for those violations, and create work items in a tracking tool such as GitHub with context and guidance for fixing the issues. You can then use AI assistants like IBM Bob to help resolve these issues faster.
Tech preview This is a technology preview and is not yet supported for use in production environments.
How data quality remediation works
Data quality issues can be time-consuming to investigate and fix. The data quality remediation capability helps speed up that process:
- Analyze violations automatically: When a data quality check fails, watsonx.data intelligence analyzes what went wrong and why.
- Create detailed tickets: Watsonx.data intelligence generates tickets in GitHub that include the issue context, root cause analysis, and suggestions for fixing the problem.
- Work with AI assistants: AI assistants like IBM Bob can read these tickets and help you fix the issues by generating code, suggesting changes, or guiding you through the remediation steps.
Requirements and restrictions
The following requirements and restrictions exist.
- Cloud platforms
-
-
Some functionality might not be available in all regions on all cloud platforms. See Regional availability.
- Required services or service plans
-
DataStage must be provisioned in addition to watsonx.data intelligence.
- Required permissions
-
To enforce data contracts through APIs, you must have the Admin or the Editor role in the project and the Manage data quality assets and Execute data quality rules user permissions.
-
For managing data contracts in a data product, you must have the following roles:
- IBM watsonx role: Manager or Data Product Hub Administrator
- Data Product Hub collaborator role: Admin
- Required credentials
-
Task credentials are required for data contract testing. For more information, see Managing task credentials.
- Supported data contract formats
-
YAML
- Supported tracking tools
-
GitHub Enterprise
- Supported AI assistants
-
IBM Bob, Claude, or other customer-selected AI assistants that can consume remediation tickets through standard interfaces
Configuring data quality remediation
To enable the remediation capabilities, complete the following steps:
-
Set up the tracking system for remediation tickets.
- In your GitHub Enterprise system, create a repository for storing, managing, and tracking remediation tickets.
- For this repository, create a personal access token with write permissions for issues. You can create a fine-grained or a classic personal access token. Select the scope repo with full control of private repositories.
-
Create project for data contract testing and configure the Git connection.
- Create a GitHub API connection to your GitHub Enterprise server. Select Bearer token as the authentication method and provide the personal access token that you created in the previous step.
- Go to the project's Manage tab and open the data quality settings.
- In the Agentic data quality remediation section, select the Git connection that you created and enter the name of the GitHub repository that you created earlier for tracking data quality issues.
-
Configure remediation behavior. Add the following custom properties to your data contract either in the YAML file or in the data product configuration UI.
remediationRequired: true-
Required property to enable generation of remediation tickets.
remediationInstruction: "<instructions-for-remediation>"-
Optional property to provide instructions for ticket generation. If you don't provide this property, the default instructions are used:
Get the explanation for data contract violation. After retrieving the explanation, create a git issue using received title data and the obtained explanation.
-
In the data contract YAML file, add the entries to the global
customProperties:section:- property: remediationRequired value: true - property: remediationInstruction value: "<instructions-for-remediation>"Additionally, you can provide
id:anddescription:entries for these properties. -
In the data product configuration UI, add the entries on the Custom properties page of the data contract.
-
In the data contract Tests configuration page in Data Product Hub, select the project where you configured the Git repository as the project for running data contract tests. In the API call for testing the data contract, use the equivalent project ID.
When data quality violations are detected during data contract testing, a ticket with the default title [ODCS Data Quality Violation] Contract Name: <contract_name> (Created At: <timestamp>) is created in the tracking
system that you can evaluate and act upon.
Such a remediation ticket contains issue context, root-cause insights, and remediation guidance that external AI assistants can use to accelerate resolution.
However, if multiple data quality rules are executed in a single test run, not all error statuses might be included in the ticket, with higher-priority issues being reported first.
Each test run generates a new ticket where the explanations might differ from run to run even if the rules and the evaluated data did not change. For more information, see Accuracy considerations.
Retrieving remediation logs
You can retrieve detailed information about the latest run for a data contract by using the following API call:
GET /data_quality/v4/projects/{project_id}/remediations/logs
The API call requires the project_id parameter and either the type or id parameter:
- project_id
- The ID of the project where the data contract tests were run.
- type
- The type of the remediation target:
odcsUse the type parameter to get the log information for the latest remediation request in general. - id
- The data contract ID. Use the id parameter to get the log information for the latest remediation request for a specific contract.
- You can get the contract ID from the contract details in the data product UI or you can submit a
GET /data_quality/v4/projects/{project_id}/data_contractscall to list all data contracts within the project.
Working with AI assistants
AI assistants like IBM Bob can read the detailed tickets and help you fix the issues. In general, such a ticket includes this information:
- What data quality rule failed
- Why it failed (root cause)
- Suggestions for fixing it
- Context about the data and contract
You can ask the AI assistant to:
- Explain the problem in simpler terms
- Generate code to fix the issue
- Suggest changes to your data quality rules
- Create a pipeline to prevent similar problems
You review and approve any changes before they're applied.