# Validate

{% hint style="info" %}
This tool is currently in Beta and is still being tested. Want to learn more? Like to provide feedback? Please reach out to <support@cascade.io>
{% endhint %}

Validate that specified conditions are met in a given dataset.

### Input/Output

<table data-header-hidden><thead><tr><th width="235.5">Inputs</th><th>Outputs</th></tr></thead><tbody><tr><td>Inputs</td><td>Outputs</td></tr><tr><td>Table to be validated</td><td>Validation Results<br>Validated Table</td></tr></tbody></table>

### Options

<table data-header-hidden><thead><tr><th width="235.5">Inputs</th><th>Outputs</th></tr></thead><tbody><tr><td>Inputs</td><td>Description</td></tr><tr><td><strong>Validation Type</strong></td><td>The type of validation being performed</td></tr><tr><td><strong>Validation Name</strong></td><td>The name of the validation being performed</td></tr><tr><td><strong>Validation Description</strong></td><td>A description of the validation being performed</td></tr><tr><td><strong>Validation Field</strong> (<em>If applicable</em>)</td><td>The field from the validation table to perform said validation on</td></tr><tr><td><strong>Expression</strong> (<em>If applicable</em>)</td><td>The expression used to validate data</td></tr><tr><td><strong>Format Check</strong> (<em>If applicable</em>)</td><td>The format expected of a given column of data</td></tr><tr><td><strong>Reference Table</strong> (<em>If applicable</em>)</td><td>The reference table used to validate data</td></tr><tr><td><strong>Reference Field</strong> (<em>If applicable</em>)</td><td>The field from the reference table used to validate data</td></tr><tr><td><strong>Aggregate Validation Results</strong></td><td>A boolean value determining whether <em>all</em> of the validations must "Pass" in order for the aggregated validation result to "Pass". If set to <code>true</code>, the validation tool will produce a single validation column on output. If set to <code>false</code>, each validation created will produce a unique column of results.</td></tr></tbody></table>

{% hint style="info" %}
Please Note: Depending on the validation type selected, different options will be displayed to the user.
{% endhint %}

### Validation Type Options

<table data-header-hidden><thead><tr><th width="235.5">Inputs</th><th>Outputs</th></tr></thead><tbody><tr><td>Validation Type</td><td>Description</td></tr><tr><td><strong>Look Up Check</strong></td><td>Ensure that the values within a specified column from the validation table are found within a specified column from the reference table</td></tr><tr><td><strong>Uniqueness Check</strong></td><td>Ensure that a specified column of values from the validation table are unique</td></tr><tr><td><strong>Expression Check</strong></td><td>Use Cascade's expression builder to define your own validation</td></tr><tr><td><strong>Format Check</strong></td><td>Ensure that a specified column of values from the validation table match a specified format</td></tr><tr><td><strong>Null Check</strong></td><td>Check whether the values in a given column are null</td></tr><tr><td><strong>Data Type Check</strong></td><td>Check that the values in a given column are of a certain datatype</td></tr><tr><td></td><td></td></tr></tbody></table>

### Expression Check Example

Let's say that I want to ensure that my price data contains *only* positive values. I could use an expression check to do so.

![](/files/YgueaYzrme7NrlGUTmtZ)

The first output from this tool is seen within the `Validation Results` tab in the image above. This tool also produces a new column in your table, as seen below.

![](/files/KQyNBfWvDt1cwGLndTFa)

### Look Up & Formatting Check Example

Let's say we have new product data that we want to add to our existing master data set. We need to ensure that all products in the new dataset exist within our master dataset.

![](/files/x4o5FLXy1rgiSzHN7dSj)

Now let's say we additionally need to ensure that our SKUs within this dataset are entirely unique.

![](/files/AO3bpGJfd0jtnthDi9uS)

As seen above, we have two validations occurring within the same tool. The `Aggregate Validation Results*` checkbox has been left unchecked, resulting in two unique validation columns in our resultant table.

![](/files/UXy1Nm45F1ypxJoG4CVW)

If, however, we want to force *both* columns to pass in order for our validation to pass, we can check the `Aggregate Validation Results*` checkbox as follows, producing a single column in our resultant table.

![](/files/p5VJtht5Yb7PAsknQQNt)

### Format Check Example

Let's say you have new data containing email addresses and you must validate whether or not those addresses are in a valid email format.

![](/files/YoXuSYT8zW7IByx4HPUT)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cascade.io/cascade/tools/cleaning/validation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
