# Validate

Validate that specified conditions are met in a given dataset.

<figure><img src="https://1817223046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5mI0ilekQtcGTXKGQ2EF%2Fuploads%2FLcRhZS1mC6BsrKoWXoLs%2FProperty%201%3DValidate.jpg?alt=media&#x26;token=836c322c-6bfb-4abb-8502-c7df3a804cf7" alt=""><figcaption></figcaption></figure>

### Input/Output

<table><thead><tr><th width="322">Inputs</th><th>Outputs</th></tr></thead><tbody><tr><td>Table to be validated</td><td>Validation Results<br>Validated Table</td></tr></tbody></table>

### Options

<table><thead><tr><th width="323">Inputs</th><th>Description</th></tr></thead><tbody><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><thead><tr><th width="323">Validation Type</th><th>Description</th></tr></thead><tbody><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 Analytics'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><strong>Reference Check, Contains</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>Reference Check, Does Not Contain</strong></td><td>Ensure that the values within a specified column from the validation table are not found within a specified column from the reference table</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.

![](https://1817223046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5mI0ilekQtcGTXKGQ2EF%2Fuploads%2Fgit-blob-6284291ab84fee0a886d201d1b0f37ac9544f373%2FScreen%20Shot%202022-05-05%20at%2012.31.29%20PM.png?alt=media)

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.

### Reference & 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.

![](https://1817223046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5mI0ilekQtcGTXKGQ2EF%2Fuploads%2Fgit-blob-7b0e5abceadd17d886173f69d3f74c1cbb1ade70%2FScreen%20Shot%202022-05-05%20at%2012.37.46%20PM.png?alt=media)

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

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.

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.

### 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.
