> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: Assert Transformation

> Use the Assert transformation to validate that all records meet specified conditions. Non-compliant records cause the ETL job to fail with errors.

<Frame>
  <img src="https://mintcdn.com/integrateio/2ttHYDu3EKov-VoY/images/creating-packages/using-components-assert-transformation/image-1.png?fit=max&auto=format&n=2ttHYDu3EKov-VoY&q=85&s=57dc176079418b15d39b0a7438859bcc" alt="Assert component configuration panel" width="1200" height="828" data-path="images/creating-packages/using-components-assert-transformation/image-1.png" />
</Frame>

## Error message

Type the error message that will be thrown to the log **if a record does not comply with the conditions** you specify below.

<Frame>
  <img src="https://mintcdn.com/integrateio/2ttHYDu3EKov-VoY/images/creating-packages/using-components-assert-transformation/image-2.png?fit=max&auto=format&n=2ttHYDu3EKov-VoY&q=85&s=6bbc7c48e5bf2aad2ba945f8537effc0" alt="Error message field for failed assertion conditions" width="1200" height="828" data-path="images/creating-packages/using-components-assert-transformation/image-2.png" />
</Frame>

## Conditions

### Logical operator

By default, a record must match all the conditions.

* **Match all of the following conditions (AND)** - selects records with values that meet all conditions specified (logical "AND")
* **Match any of the following conditions (OR)** - selects records with values that meet at least one of the conditions specified (logical "OR")
* **Match none of the following conditions (NOT)** - selects records with values that doesn't meet any of the conditions specified (NOT ( ... OR ...))

### Specifying conditions

Each condition comprises of an expression (or field), a comparison operator, and possibly another value or expression to compare with (depending on the operator).

* **Expression (left-hand)** - In the drop-down list on the left, select a field or edit an expression. (You can read more about [expressions](/etl/using-expressions-in-integrateio-etl/) and [functions](/etl/integrateio-etl-functions/)).
* **Operator** - Select the operator from the following list:
  | Operator          | Description                                                                                                                                                                                                                                                                     |
  | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | text equals       | The expression on the left must be equal to the string value on the right. The text should not be enclosed in quotes or escaped.                                                                                                                                                |
  | text not equals   | The expression on the left must not be equal to the string value on the right. The text should not be enclosed in quotes or escaped.                                                                                                                                            |
  | text matches      | The expression on the left must must match the regular expression string value on the right. The text should not be enclosed in quotes or escaped. For example, matching a string field with .\*dog.\* would pass any string that contains the string dog: dog, dogs, adogmatic |
  | text is empty     | The expression on the left must be empty.                                                                                                                                                                                                                                       |
  | text is not empty | The expression on the left must not be empty.                                                                                                                                                                                                                                   |
  | =                 | The expression on the left must be equal to the expression on the right.                                                                                                                                                                                                        |
  | !=                | The expression on the left must not be equal to the expression on the right.                                                                                                                                                                                                    |
  | >                 | The expression on the left must be greater than the expression on the right.                                                                                                                                                                                                    |
  | >=                | The expression on the left must be greater than or equal to the expression on the right.                                                                                                                                                                                        |
  | `<`               | The expression on the left must be less than the expression on the right.                                                                                                                                                                                                       |
  | `<=`              | The expression on the left must be less than or equal to the expression on the right.                                                                                                                                                                                           |
  | is null           | The expression on the left must be null.                                                                                                                                                                                                                                        |
  | is not null       | The expression on the left must not be null.                                                                                                                                                                                                                                    |
  | is true           | The expression on the left must true - especially useful when left hand side is a complex expression.                                                                                                                                                                           |
* **Value/Expression** - with text operators, type the text or pattern to compare to. With other operators, pick a field or edit an expression.

## Assert sample

1. Set target sample data
   <Frame>
     <img src="https://mintcdn.com/integrateio/2ttHYDu3EKov-VoY/images/creating-packages/using-components-assert-transformation/image-3.png?fit=max&auto=format&n=2ttHYDu3EKov-VoY&q=85&s=936675bb5c0e91ab9a26708337b91850" alt="Target sample data configured for assert testing" width="1200" height="828" data-path="images/creating-packages/using-components-assert-transformation/image-3.png" />
   </Frame>
2. Set error message and assert condition
   <Frame>
     <img src="https://mintcdn.com/integrateio/2ttHYDu3EKov-VoY/images/creating-packages/using-components-assert-transformation/image-4.png?fit=max&auto=format&n=2ttHYDu3EKov-VoY&q=85&s=b3c444f568f1148aacf051df4c4ba8c9" alt="Assert error message and condition configured" width="1200" height="828" data-path="images/creating-packages/using-components-assert-transformation/image-4.png" />
   </Frame>
3. Assert triggered & error message in error log
   <Frame>
     <img src="https://mintcdn.com/integrateio/2ttHYDu3EKov-VoY/images/creating-packages/using-components-assert-transformation/image-5.png?fit=max&auto=format&n=2ttHYDu3EKov-VoY&q=85&s=085235ead63b62f4b5371848bcf1426a" alt="Assert triggered showing job failure" width="1200" height="246" data-path="images/creating-packages/using-components-assert-transformation/image-5.png" />
   </Frame>
   <Frame>
     <img src="https://mintcdn.com/integrateio/2ttHYDu3EKov-VoY/images/creating-packages/using-components-assert-transformation/image-6.png?fit=max&auto=format&n=2ttHYDu3EKov-VoY&q=85&s=4d9667a8282e9ec054f3c8179978ce16" alt="Error message displayed in the job error log" width="1200" height="828" data-path="images/creating-packages/using-components-assert-transformation/image-6.png" />
   </Frame>
