Enable Writeback on Custom Query DQ Rules

Custom Query Rules

Custom Query data quality rules are powerful rules that give users the ability to monitor any sort of data quality rules that they require. The article Creating a CUSTOM QUERY DQ Rule explains how to create a rule. This article builds on that foundation and explains how to support writeback so that data stewards can take corrective action.

Enabling writeback prerequisites

  1. You have a working DQ rule of type "CUSTOM QUERY". 
  2. The table that you want to allow writeback on has an ID field configured.

Confirm that an ID field is configured for the table

Profile → Profiling → [tick relevant table] → More Actions → Edit Configuration Screenshot_2023-05-17_at_4.28.25_PM.png

Confirm the value of "Field(s) that can uniquely identify a data record".

Confirm that "Allow Write-Back" is ticked.


Enabling writeback steps


  1. Edit rule definition to enable writeback.
  2. Run the rule.
  3. Configure writeback fields.
  4. Run the rule.


Edit the rule definition and tick "Enable Writeback".


  • The tab "Write-back Configuration" is grayed out when writeback is not enabled.
  • The Analysis tab displays error records. They may be exported, but there is no "Cleanse" option to correct the errors.



After saving the change, a warning is displayed.

Note: the tab "Write-back Configuration" should now be enabled. But you must run the rule before it's possible to configure the writeback details.

Run the rule. Screenshot_2023-05-18_at_4.13.09_PM.png

Configure the Key Identifier on the "Write-back Configuration" tab. Then click Next.

In this example the Key Identifier is CUSTOMER_ID, and the field returned by the query is also CUSTOMER_ID. So DvSum has automatically guessed the mapping. This is typical, and it's a best practice to use field names that match. But in some cases you'll need to map fields with different names.


Configure the Write-back Column Mapping.

Enable Write-back for the columns which data stewards should be allowed to make changes.


Run the rule.


Cleanse is now enabled in the Analysis tab.

The fields enabled for writeback will be highlighted in red. Clicking "Cleanse" will start a workflow allowing a data steward to fix the data.





Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk