Postgres Extended icon

Postgres Extended

Extended Postgres operations to complement the built-in Postgres node

Check → Row Count Threshold

AI-generated

Summary

Check if the number of rows in a specified Postgres table matching given conditions meets a specified threshold comparison.

Inputs

  • Schema (required) — The schema containing the target table. Choose from a list or specify by name.
  • Table (required) — The table to count rows in. Choose from a list or specify by name.
  • Must Match — Whether a row must satisfy all conditions ('All Conditions') or at least one ('Any Condition'). Defaults to 'All Conditions'.
  • Conditions — One or more column/operator/value conditions to filter which rows to count. Operators include Equal, Not Equal, Like, Greater Than, Less Than, Is Null, and others.
  • Threshold (required) — The row count value to compare against.
  • Comparison (required) — How to compare the counted rows to the threshold: 'At Least' (≥), 'More Than' (>), 'Exactly' (=), 'Less Than' (<), or 'At Most' (≤). Defaults to 'At Least'.

Output shape

a filtered list of input items where each output item is enriched with the actual row count and threshold values in its json property

The operation processes each input item individually using its parameters. It queries the count of rows in the specified schema and table filtered by the given conditions combined using the chosen match type. Only items where the counted rows satisfy the comparison against the threshold are included in the output. Each output item includes json properties 'rowCount' (actual count) and 'threshold' (threshold value). Errors per item can be included if 'Continue On Fail' is enabled.

Examples

Example 1: Example usage

Count rows from the 'public' schema and 'users' table where the 'status' column equals 'active' and output only if at least 5 such rows exist.

Links

Discussion