# Evaluate rows numbers in a table

### Description

The `Evaluate rows numbers in a table` action evaluates the number of rows in a table and lets you define the success condition that can be used to branch the workflow into success/error streams.

You can either just test the number of rows in a target table, or write a custom SQL statement.

For the success condition you can check the number of rows if they are:

* Equal to
* Different from
* Smaller than
* Smaller or equal to
* Greater than
* Greater or equal to

### Options

| Property                  | Description                                                                                                                                                                                                                                   |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Action name               | The name to use for this workflow action                                                                                                                                                                                                      |
| Connection                | The [Relational database connection to use](https://hop.apache.org/manual/2.14.0/metadata-types/rdbms-connection.html)                                                                                                                        |
| Target schema             | The database schema name                                                                                                                                                                                                                      |
| Target table name         | The database table name                                                                                                                                                                                                                       |
| Success condition         |                                                                                                                                                                                                                                               |
| Success when rows count   | <ul><li>Equal to</li><li>Different from</li><li>Smaller than</li><li>Smaller or equal to</li><li>Greater than (default)</li><li>Greater than or equal to</li></ul>                                                                            |
| Limit                     | the number of rows to evaluate in combination with the selected option above.                                                                                                                                                                 |
| Custom SQL                |                                                                                                                                                                                                                                               |
| Custom SQL                | Check this option when you want to specify a custom SQL statement in the `SQL Script` field below.                                                                                                                                            |
| Use variable substitution | Variables in the SQL statements will be substituted.                                                                                                                                                                                          |
| Clear list of result rows | Clears the internal list of result rows before executing.                                                                                                                                                                                     |
| Add rows to result        | Adds all rows returned from the SQL statement within the internal list of result rows. This list of result rows can then be used in subsequent workflow actions to loop over or e.g. within a pipeline by the Get rows from result transform. |
| SQL Script                | The custom SQL script to use. The `Custom SQL` option above needs to be checked before this field is enabled.                                                                                                                                 |


---

# 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.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/workflows/actions/evaluatetablecontent.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.
