Data Quality Rules

Update rule

Update a rule using JSON Merge Patch (RFC 7396).

The following rules apply to both the rule fields and its sub-entities (input groups, inputs, conditions, group-by inputs, parameters, and variables with their transformations):

  • To change a field or a sub-entity, send only the new values. For a sub-entity, send them under the sub-entity's ID.
  • To clear a field or delete a sub-entity, set it to null. The name field is the exception: it cannot be null, only replaced with another non-empty value.
  • To add a sub-entity, use a new_<id> key.
  • To keep anything unchanged, do not mention it in the request.

A single request can combine all of these anywhere in the rule, for example, update the description, rename one input, and delete another. New sub-entities appear in the response under their new IDs, with your temporary key returned in the correlationId field.

If you build the update from a retrieved rule, you can send the edited body back without removing the read-only fields, such as urn and draftType. The API checks only the urn of each sub-entity: it must match the ID under which the sub-entity is stored, as it does before you edit the body. A mismatch is rejected with 400 Bad Request. This happens, for example, when you move a sub-entity under a different key and leave the sub-entity's urn unchanged.

Updates are applied to the current draft. Patching a published rule opens a new draft (draftType: CHANGE) on top of the latest published version.

patch/data-quality/v1/rules/{ruleUrn}

Request

Path parameters

ruleUrnstring uri required

A URN identifying the data quality rule resource in the Data Quality API.

Format: urn:ata:{tenant}:data-quality:rule:{uuid}

Example: urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000.

Example:urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000

Rule URN.

Request body

namestring

Human-readable name of the rule. Omit to leave unchanged. Cannot be null; name is required and may only be replaced with another non-empty value.

descriptionstring nullable

Optional description of the rule.

inputGroupsobject nullable

Input groups keyed by their id (UUID). Omit to leave the collection unchanged; null deletes every group. Within the map, a new_<id> key creates, a null value deletes that group, and an object value is merged into the existing one.

Address existing groups and their inputs by their UUID key. A new_<id> key always creates a new sub-entity under a new URN: recreating an existing input attribute this way breaks the DQ monitor mappings that reference the old one.

parametersobject nullable

Parameters keyed by their id (UUID). Omit to leave the collection unchanged; null deletes every parameter. Within the map, a new_<id> key creates, a null value deletes that parameter, and an object value is merged into the existing one.

variablesobject nullable

Variables keyed by their id (UUID). Omit to leave the collection unchanged; null deletes every variable. Within the map, a new_<id> key creates, a null value deletes that variable, and an object value is merged into the existing one.

Example request

{
  "defaultDqThreshold": {
    "severity": "WARNING",
    "urn": "urn:ata:acme-corp:data-quality:dq-threshold:123e4567-e89b-12d3-a456-426614174000"
  },
  "stewardship": {
    "groupUrn": "urn:ata:acme-corp:iam:group:123e4567-e89b-12d3-a456-426614174000"
  },
  "implementation": {
    "ruleType": "SINGLE_TABLE",
    "dqDimensionUrn": "urn:ata:acme-corp:data-quality:dq-dimension:123e4567-e89b-12d3-a456-426614174000",
    "fallback": {
      "resultUrn": "urn:ata:acme-corp:data-quality:dq-dimension-result:123e4567-e89b-12d3-a456-426614174000"
    }
  }
}

Response

The updated DQ rule draft (draftType=CHANGE) version.

In the example, one input attribute was merged (only its description changed), one was deleted and is therefore absent, and one was created under a server-assigned id with its temporary new_<id> key returned as correlationId.

draftTypestring required

@ExtensibleEnum The type of the DRAFT version (NONE indicates a PUBLISHED version). It specifies what will happen to the entity if the DRAFT is published.

Possible values:

  • NEW — draft proposal to create a new object.
  • CHANGE — draft proposal to change an existing object.
  • DELETE — draft proposal to delete an existing object.
  • RESURRECT — draft proposal to resurrect an already deleted object.
  • NONE — placeholder for a non-existent draft; represents a published version.

The value describes the version that was returned, not the entity as a whole: a PUBLISHED version always reports NONE, even when an unpublished draft is waiting. Fetch it with ?version=DRAFT to see the pending change. An entity that exists only as a draft is not listed and answers a default (published) read with 404.

namestring

Human-readable name of the rule. Not unique: multiple rules can share a name. Identify a rule by its URN, never by its name. None of the rule fields is required to create a draft; name is required to publish it.

descriptionstring nullable

Optional description of the rule.

inputGroupsobject nullable

Groups of input attributes the rule consumes, keyed by their id (UUID). Each input attribute has a name and data type (for example, STRING, INTEGER, or DATE). For cross-table rules, a child input group is marked joined: true.

parametersobject nullable

Parameters that configure the rule, keyed by their id (UUID).

variablesobject nullable

Variables derived from inputs and reused within the rule logic, keyed by their id (UUID). A variable is computed either from an expression or by applying transformations to an input attribute.

urnstring uri required

A URN identifying the data quality rule resource in the Data Quality API.

Format: urn:ata:{tenant}:data-quality:rule:{uuid}

Example: urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000.

Example response

{
  "draftType": "NEW",
  "defaultDqThreshold": {
    "severity": "WARNING",
    "urn": "urn:ata:acme-corp:data-quality:dq-threshold:123e4567-e89b-12d3-a456-426614174000",
    "correlationId": "new_email"
  },
  "stewardship": {
    "groupUrn": "urn:ata:acme-corp:iam:group:123e4567-e89b-12d3-a456-426614174000"
  },
  "implementation": {
    "ruleType": "SINGLE_TABLE",
    "dqDimensionUrn": "urn:ata:acme-corp:data-quality:dq-dimension:123e4567-e89b-12d3-a456-426614174000",
    "fallback": {
      "resultUrn": "urn:ata:acme-corp:data-quality:dq-dimension-result:123e4567-e89b-12d3-a456-426614174000"
    }
  },
  "urn": "urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.