Skip to main content
POST
Create a custom data quality rule

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Request to create a custom data quality rule.

rule_name
string
required

Name of the data quality rule.

rule_description
string
required

Description of what the rule checks.

sql
string
required

Trino SQL query for validation.

table
string
required

Fully qualified table name this rule applies to.

success_value
string
required

The exact value the rule's SQL query must return for the rule to pass. Use a literal integer such as 0 or 1, or true or false. Do not write an expression such as count = 0 or value > 95; NexusOne compares the query result to this value for equality and does not evaluate expressions.

Response

Rule created.

id
string<uuid>
required

Unique ID of the data quality rule.

rule_name
string
required

Name of the data quality rule.

rule_description
string
required

Brief explanation of what the rule checks.

sql
string
required

Trino SQL query used to validate the rule.

accepted
boolean
required

Whether you have accepted this rule.

table
string
required

The database table this rule applies to.

external_id
string | null

Uniform Resource Name (URN) of the assertion in DataHub.

spark_sql
string | null

Spark SQL query of the rule, if applicable.

success_value
string | null

Expected success condition for this rule.

created_by
string | null

Username or identifier of who created this rule.

approved_by
string | null

Username of who approved this rule.

created_at
string<date-time> | null

Timestamp when the rule was created.

approved_at
string<date-time> | null

Timestamp when the rule was approved.

is_created
boolean
default:false

True once the rule has been explicitly created (not just a suggestion).

blocks_load
boolean
default:true

The rule's setting for whether a failure stops a load of its table. Ignored while the rule feeds Exceptions.

feeds_exceptions
boolean
default:false

Whether the Exceptions workflow runs this rule.

effective_blocks_load
boolean
default:true

Whether a failure of this rule, once approved, stops a load of its table: never for a rule that feeds Exceptions, else its setting.