> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/apis/using-notebooks-with-data-quality-observability-classic/rules-in-notebooks/sql-based-rules/data-type-rules.md).

# Data type rules

Simple checks for individual columns.

{% hint style="info" %}
See also: [Data type rules](/data-quality-self-hosted/core-concepts/dq-rules/rule-types/sql-based-rules/data-type-rules.md).
{% endhint %}

## Rule types

### Empty check

**Rule type: EMPTYCHECK** **Description:** Checks whether or not the target column has empty values.

### Null check

**Rule type: NULLCHECK** **Description:** Checks whether or not the target column has *NULL* values.

### Date check

**Rule type: DATECHECK** **Description:** Checks whether or not the target column has **only** DATE values.

### Integer check

**Rule type: INTCHECK** **Description:** Checks whether or not the target column has **only** INTEGER values.

### Double check

**Rule type: DOUBLECHECK** **Description:** Checks whether the target column has **only** DOUBLE values or not.

### String check

**Rule type: STRINGCHECK** **Description:** Checks whether the target column has **only** STRING values or not.

### Mixed datatype check

**Rule type: DATATYPECHECK** **Description:** Checks whether the target column has values with different data types, such as DATE, INTEGER, DOUBLE, and STRING.

## Syntax

* **\<rule\_type>** - Fixed key to the rule type
* **\<column\_name>** - Column to apply the rule
* **\<rule\_name>** - Custom name of the rule

```
opt.dataset = "example_ds"
 
val rule = OwlUtils.createRule(opt.dataset)
rule.setRuleNm("<rule_name>")
rule.setRuleValue("<column_name>")
rule.setRuleType("<rule_type>")
rule.setPerc(1.0)
rule.setPoints(1)
rule.setIsActive(1)
rule.setUserNm("admin")
```
