Update a quality rule - Precisely Data Integrity Suite

Data Integrity Suite APIs

Product
Data_Integrity
Spatial_Analytics
Data_Enrichment
geo_addressing_1
Services
Spatial Analytics
Data Enrichment
Geo Addressing
ft:title
Data Integrity Suite APIs
ft:locale
en-US
PublicationType
pt_developer
copyrightfirst
2023
copyrightlast
2026

Updates an existing quality rule with the provided details. Returns a status message.

HTML

PATCH https://hostname/v1/quality/rules

Request

Request body properties

Ancestors Property Required Type Description
  id Yes string  
  name No string

The unique identifier for the rule. This value is used to reference the rule within the system.

  description No string A human-readable explanation describing the rule's purpose or intent.
  dimensionName No string
Specifies the data quality dimension that the rule addresses. The following values can be provided:
  • Accuracy
  • Completeness
  • Consistency
  • Timeliness
  • Uniqueness
  • Validity
  passCondition No string

Defines the specific criteria or thresholds a data element must meet to be considered acceptable:

"passCondition": {
  "type": "condition_type",
  "config": "condition_expression"
  },
passCondition type No string

The config type. This is either "script" or "SQL".

Note: We currently only support the script type.
passCondition config No string The expression that defines whether a data element is considered successful. In the expression, use the operators described in Table 2.
  filterCondition No string

An expression used to filter records in a dataset, ensuring only accurate, complete, and relevant data is used for analysis.

filterCondition type No string
The config type. This is either "script" or "SQL". In the expression, use the operators described in Table 2.
Note: We currently only support the script type.
filterCondition config No string The expression that defines whether a data element is returned by the method. In the expression, use the operators described in Table 2
  captureFailedRecords No boolean

Set this property to true to capture failed records. This property is optional. To enable or disable this feature, you must first enable it at the workspace level.

  enableAutoRun No boolean

Set this property to true to enable auto-schedule for the rule.

  targetingType No string

Specifies the type of asset the rule targets. The following values can be provided:

  • Field
  • Dataset
  • FilterByCondition
  targetAssetsFilter No array[string]

This targets assets. Specify an array of filter strings that define which assets the rule applies to (such as datasets, fields, or data sources). Each filter uses a domain-specific syntax, for example: properties.CatalogType:eq(Field)&filter=id:eq(123).

This property uses operators described in Table 1.
  mappings No array[object]

An array of mapping objects that define how columns from the selected assets are mapped for rule evaluation.

Mappings can be applied if targetingType is set to Field/Dataset. Mapping is not required when targetingType is set to FieldByCondition.

mappings datasetId No string

A dataset identifier.

mappings columnMapping No array[object]
An array of objects defining how source columns are mapped to target fields. Each object includes:
  • columnName
  • dataType
  • alias
  • targetField
mappings/columnMapping columnName No string

Name of the source column.

mappings/columnMapping dataType No string

Data type of the column (for example, string, integer)

mappings/columnMapping alias No string

Alias for the column, used in expressions.

Request body property operators

Tables in this section describe operators to be used in specified request body property values.

Table 1. Operators for targetAssetsFilter property setting.

For the targetAssetsFilter property setting, choose from operators in this table.

The eq and ne operators evaluate single values while the in and ni operators evaluate lists.

  • in: value matches any value in a list or set
  • ni: value does not match any value in a list or set
  • eq: equal to
  • ne: not equals to
  • eq("is populated"): contains any value (not null)
  • eq("is not populated"): contains no value (is null)
targetingType value Catalog type Filter Operators
Field Field  
  • For a single field, use the eq operator.
  • For multiple fields, use the in operator
Dataset Dataset  
  • For a single dataset, use the eq operator.
  • For multiple datasets, use the in operator
FilterByCondition Datasource filter = name
  • in
  • ni
Datasource filter = name
  • eq("is populated")
  • eq("is not populated")
Dataset filter = id
  • in
  • ni
Dataset filter = value
  • eq("is populated")
  • eq("is not populated")
Semantic type filter = qualifier
  • eq
  • ne
Semantic type filter = value
  • eq("is populated")
  • eq("is not populated")
Table 2. Operators for passCondition and filterCondition properties.

For passCondition and filterCondition use these operators while formulating a condition into the Natural Language.

For this operation Use this operator
is =
is not !=
is populated IS NOT NULL
is not populated IS NULL
Value in the array values IN
is greater than >=
is greater than or equal to >=
is less than <=
is less than or equals to <=
Date TO_DATE('YYYY-MM-DD'), for example TO_DATE('1990-12-07')
Time TO_TIME('HH:MI:SS'), for example TO_TIME('11:25:31')
Date-time TO_DATETIME('YYYY-MM-DD HH:MI:SS'), for example TO_DATETIME('1990-12-07 11:25:31')

Request example

Example request body for this method is shown below.

Examples
{
  "id": "rule_id",
  "name": "rule_name",
  "description": "rule_description",
  "dimensionName": "dimension_name",
  "passCondition": {
    "type": "script",
    "config": "condition_expression"
  },
  "captureFailedRecords": true,
  "enableAutoRun": true,
  "targetingType": "Dataset",
  "targetAssetsFilter": [
    "properties.CatalogType:eq(Dataset)&filter=id:eq(asset_id)"
  ],
  "mappings": [
    {
      "datasetId": "dataset_id",
      "columnMapping": [
        {
          "columnName": "column_name",
          "dataType": "string",
          "alias": "column_alias"
        }
      ]
    }
  ]
}

Response

The method returns 200 if the rule is updated successfully.

Response example

Example status code responses for this method are shown here.

Examples

Rule updated successfully.

{
  "id": "694b9c09fdf9159bd458aaa1"
}
{
  "type": "about:blank",
  "title": "Bad Request",
  "status": 400,
  "detail": "Rule must have an id present for update",
  "instance": "/v1/quality/rules",
  "errorCode": "DIS-QUALITY-Rule-USR-1005"
}
{
  "type": "about:blank",
  "title": "Not Found",
  "status": 404,
  "detail": "Rule not found",
  "instance": "/v1/quality/rules",
  "errorCode": "DIS-QUALITY-Rule-USR-1001"
}
{
  "type": "about:blank",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "An unexpected error occurred on the server",
  "instance": "/v1/quality/rules",
  "errorCode": "DIS-QUALITY-RULES-SVC-0001"
}