> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/more-details/applications/application-modules/gate.md).

# Gate

> Assert row counts, null rates, keys, ranges, freshness or a pinned schema before data flows on.

Checks a frame against data-quality rules and stops the flow, or the branch, when one fails.

Each check in `checks` reads the subset of its optional parameters that its `kind` needs — a `rowCountMin` reads `min`, a `nullRateMax` reads `column` and `value`, a `schemaEquals` compares against the `schemaSnapshot` the author captured in the inspector. `onFail` decides whether a failure fails the run or merely skips what is downstream.

## At a glance

|                          |                        |
| ------------------------ | ---------------------- |
| Module type              | `Gate`                 |
| Category                 | Data Processing        |
| Default tier             | `reactive`             |
| Runs on                  | `reactive`, `durable`  |
| Starts a flow            | no                     |
| Holds a body             | no                     |
| Keeps state between runs | no                     |
| Available in             | every application type |

## Parameters

### `checks`

`GateCheck[]` · required · defaults to `[]`

The checks to run, in order; each `kind` reads the subset of the optional parameters it needs.

### `onFail`

`GateOnFail` · required · defaults to `"fail"`

Fail the whole run on a failed check, or emit nothing and skip what is downstream.

### `schemaSnapshot`

`SchemaEntryModel[] | null` · required · defaults to `null`

The columns a `schemaEquals` check compares against, captured in the inspector; a run never overwrites it.

## Inputs

| Port   | Kind        | Required | Description                                                                                                                           |
| ------ | ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `on`   | `event`     | no       | Implicit on every module that does not itself start a flow: wire an event here to make this module the start of what that event runs. |
| `data` | `dataframe` | yes      | The frame to check.                                                                                                                   |

## Outputs

| Port     | Kind        | Connects to           | Description                                             |
| -------- | ----------- | --------------------- | ------------------------------------------------------- |
| `passed` | `dataframe` | `dataframe`, `signal` | The same frame, emitted only when every check passed.   |
| `report` | `dataframe` | `dataframe`, `signal` | One row per check with its verdict, emitted either way. |

***

[← All application modules](/more-details/applications/application-modules.md)
