Data Governance Agent

Updated at:

Locating and fixing governance issues usually require manual, item-by-item investigation, and governance actions are hard to keep covering newly added tasks. DataWorks Data Governance Agent upgrades these workflows into natural-language-driven intelligent governance. Describe your governance goal in one sentence, and the Agent automatically completes issue analysis, plan generation, SQL rewriting, and re-inspection. You can also save validated governance workflows as scheduled tasks for continuous, round-the-clock governance.

Feature overview

Data Governance Agent is a vertical capability set of Data Agent for data governance scenarios. It covers five specific scenarios — AI governance of governance items, conversational governance, natural language governance item creation and automatic scanning, automatic tagging, and code review inspection — as well as the cross-cutting automated governance remediation capability. You can start governance from governance work items, the data governance workbench, or the Data Agent conversation panel. The Agent reads the issue context, generates a governance plan for your confirmation, and supports configuring validated workflows as scheduled tasks for periodic execution.

Core capabilities

Capability

Applicable scenario

Core value

AI governance of governance items

System governance rules have detected an issue and generated a governance work item, and you need quick analysis and remediation of the identified task.

Enter a governance session with full issue context in one click. The Agent automatically completes issue analysis, SQL rewriting, CodeDiff comparison, and governance re-inspection.

Conversational governance

The issue has not appeared in governance work items, but the governance goal is clear, and you want to provide context through conversation to complete governance.

Submit governance issues in natural language. The AI diagnoses tasks and SQL, presents changes as visual diffs, and executes them after your confirmation.

Natural language governance item creation and automatic scanning

A category of governance issues has not surfaced yet, and you need custom rules to continuously scan and detect them.

Define scan rules in natural language. AI secondary filtering reduces false positives. Rules can be configured as periodic scan tasks to continuously detect new issues.

Automatic tagging

A workspace has many scheduled tasks and you need to maintain owner tags in bulk.

Identifies task owners and binds tags in bulk through natural language, and can be saved as a scheduled task to keep covering new tasks.

Code review inspection

You want continuous inspection of code reviews in a project and want to intercept governance issues before approval.

Creates AI inspection services based on the Code Review template, forming a closed loop of review submission, issue remediation, re-inspection, and result verification.

Automated governance remediation

Governance issues discovered in the preceding scenarios need to be continuously remediated according to a strategy, rather than handled manually one time.

Validated workflows from any governance scenario can be saved as scheduled remediation tasks that run at a specified frequency and batch size for 24/7 continuous governance.

Prerequisites

  • DataWorks Data Agent is activated. For more information, see Activate Data Agent.

  • This feature is currently available only in the following regions: China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Chengdu), China (Hong Kong), Singapore, Germany (Frankfurt), and Indonesia (Jakarta). Availability in more regions will be announced separately.

Feature entry

You can access Data Governance Agent through the following methods:

  • Log on to the DataWorks console. In the left-side navigation pane, click Data Governance > Data Asset Governance.

  • Go to the Data Asset Governance page. In the AI Workbench area on the left side of the page, click Data Agent to open the Data Governance Agent page.

Use cases

The following scenarios are organized in a progression by how issues are discovered: AI governance of governance items targets issues already detected by system governance rules; conversational governance targets requests with a clear goal; natural language governance item creation and automatic scanning targets unknown issues that require continuous proactive detection; automatic tagging and code review inspection cover specialized scenarios such as tag maintenance and review governance closed loops. Validated workflows from all five scenarios can be saved as scheduled remediation tasks through the automated governance remediation capability for periodic execution.

AI governance of governance items

Capability description

Applicable scenario: System governance rules have detected an issue and generated a governance work item, and you need quick analysis and remediation of the specific issue. For system governance items that support AI governance, select a specific issue on the governance work items page and start processing through the AI governance entry of the corresponding task. The Agent reads the governance item and task context, and performs the following actions:

  • Issue analysis: Combines governance item rules with the task SQL to explain the cause and impact of the issue.

  • SQL rewriting: Generates a fix plan that complies with governance rules, such as moving a constant filter in a JOIN ON condition to the WHERE clause, or replacing max_pt with a business date parameter. Changes are presented as a CodeDiff.

  • Governance re-inspection: After the fix is published, automatically runs governance re-inspection and confirms that the governance item checker passes.

Usage example

  1. Go to the governance work items page of Data Governance and locate the target governance issue and task.

  2. Click the AI governance entry of the task to open a Data Agent session with the governance context.

  3. Review the cause analysis, SQL rewrite plan, and CodeDiff produced by the Agent, and confirm the changes.

  4. Execute the fix and publish it. The Agent automatically runs governance re-inspection and reports the result.

Conversational governance

Capability description

Applicable scenario: The issue has not appeared in governance work items, but the governance goal is clear. Instead of starting from a fixed governance item entry, you can describe your governance goal in natural language directly in the Data Agent conversation panel, including the task name, workspace, and expected governance outcome. The Agent enriches the context step by step and forms an execution plan. It diagnoses tasks and SQL, presents changes as visual SQL diffs, such as replacing max_pt with a bizdate parameter, and lets you select the fix scope at task granularity.

Usage example

  1. Open the Data Agent conversation page.

  2. Describe the governance goal in natural language and provide required context such as the workspace and target tasks.

  3. Review the SQL diffs, governance suggestions, and executable options, and confirm the governance scope.

  4. After confirmation, the Agent executes the fix and reports the governance result.

Note

If a task name cannot uniquely identify a task, provide the workspace or task identifier. Before batch modifications, verify that the SQL diffs and business date parameters match the task semantics.

Natural language governance item creation and automatic scanning

Capability description

Applicable scenario: A category of governance issues has not surfaced yet and cannot be covered by built-in rules. You need to quickly create custom governance rules in natural language and continuously scan for them. You only need to describe the scan targets and conditions, and the Agent generates custom governance items/check items and triggers scans, upgrading governance from manual item-by-item investigation to continuous automated execution.

Main steps include:

  • Natural-language governance item creation: Describe a scan condition in one sentence, such as "find ODPS SQL tasks that only query data without writing to any target table". The Agent generates an executable custom governance item/check item.

  • Automatic scanning + AI secondary filtering: After a scan is triggered, AI performs semantic re-verification on initial results, distinguishing hits, non-hits, and non-target tasks to reduce false positives.

  • Periodic scanning: Configures a published rule as a periodic scan task to continuously detect new issues at a specified frequency.

  • Governance strategy selection: For issues found by scans, choose to generate a remediation report, automatically modify SQL, or scan and notify only.

Usage example

  1. In Data Agent, describe the scan rule in natural language, for example, "find periodic tasks that have not set owner tags in the past 7 days" or "find ODPS SQL tasks that only query data without writing to any target table".

  2. Review the rule content generated by the Agent and confirm that the scan targets, conditions, and hit examples meet expectations.

  3. Save it as a custom governance item/check item and trigger the first scan.

  4. Review the hit results after AI secondary filtering and select a governance strategy such as generating a remediation report, automatically modifying SQL, or scanning and notifying only.

  5. After confirming that the rule is effective, configure the name, workspace, and execution frequency of the periodic scan task to continuously detect new issues.

Note

Governance strategies such as automatic SQL modification and task decommission may affect production tasks. Confirm the scope and follow the change process of your team before execution.

Automatic tagging

Capability description

In workspaces with many scheduled tasks, maintaining owner tags one by one is time-consuming and prone to missing new or changed tasks. You can instruct the Agent in natural language to read the task list of a specified workspace, extract the owner of each task, and bind the corresponding owner tag in bulk. After binding, the Agent summarizes the task count and tag parameters and provides an entry for verification.

A validated automatic tagging workflow can also be saved as a scheduled task. Configure the workspace, execution frequency, and governance prompt, and the task runs periodically to keep tagging new tasks and tasks whose owners change.

Usage example

  1. In Data Agent, issue a natural-language instruction to bind owner tags to tasks of the target workspace by task owner.

  2. Check the task count and tag parameters summarized by the Agent, and confirm the batch binding.

  3. For continuous execution, ask the Agent to create a scheduled task, and confirm the task name, execution frequency, and workspace.

  4. View execution records and running logs on the AI scheduled tasks page.

Note

Batch tag binding and scheduled task creation are write operations. Verify the workspace, task scope, and tag values before execution.

Code review inspection

Capability description

You can create an AI inspection service based on the project Code Review template to continuously inspect code reviews assigned to you in a specified project. When governance issues are found, Data Agent analyzes the issue context, applies fixes, and runs governance re-inspection, forming a traceable closed loop of issue detection, remediation, re-inspection, and review resubmission. The inspection service details also show the running status and token consumption, helping you track service health and model usage.

Usage example

  1. Go to the AI inspection services page of Data Governance, select the project Code Review template, configure the inspection workspace, running resource group, compute units, and model, and create the inspection service.

  2. Modify and publish code in Data Studio, specify reviewers, and submit a code review.

  3. For governance issues found by the inspection, let Data Agent analyze the context, apply fixes, run re-inspection, and publish.

  4. Submit the code review again and check the approval or rejection status in the review details.

  5. Go back to the AI inspection service details to view the running status and token consumption.

Automated governance remediation

Capability description

Applicable scenario: In all five governance scenarios (AI governance of governance items, conversational governance, natural language governance item creation and automatic scanning, automatic tagging, and code review inspection), validated governance workflows can be saved as scheduled remediation tasks that run at a specified frequency and batch size without repeated manual intervention. Main capabilities include:

  • One-click scheduled task creation: After confirming a governance plan in any scenario, you can directly ask to create a scheduled task, specifying the task name, workspace, execution frequency, and governance prompt.

  • Batch control: Configure the number of tasks to remediate per batch to avoid a single execution affecting the production environment at too large a scope.

  • Execution records and logs: View the running status, governance results, and token consumption of each execution on the AI scheduled tasks page.

Usage example

  1. Complete governance in any of the preceding scenarios and confirm that the plan is effective.

  2. In the conversation, ask to create a scheduled task. Confirm the task name, execution frequency (such as daily or weekly), and batch size.

  3. After creation, trigger the task once immediately to verify that it executes as expected.

  4. View execution records and running logs on the AI scheduled tasks page.

Note

Scheduled remediation tasks automatically execute governance operations at the configured frequency. Before creation, confirm the governance strategy, workspace, and task scope, and follow the change process of your team.

Next steps