Set is Empty

You expect the provided query didn't return any results.


This expectation is simple and self-explanatory - you expect the provided query didn’t return anything.

For example, if you log errors into a table and you need an automated way to check no errors are being added:

- Suite: Smoke Tests
  Name: Table dbo.Errors is empty
  Data Source: DWH
  Query: SELECT * FROM dbo.[Errors]
  Expectation: set is empty


If no rows are returned, the test result will be Passed.

After reading at least one row, CAT marks the test as Failed.

If the underlying provider returns an exception, the result will be Error.


More Rows in the Error Message

When Maximum Errors Logged is set to 1 (default) or 0, CAT closes the connection to the underlying provider immediately after it receives first row. This is intentional, CAT is meant to be an “indicator” that points to problems, not a tool that returns all rows that do not satisfy a rule. You can raise Maximum Errors Logged to a higher value. Maximum is 50 - it is enough to spot patterns in erroneous data and fix the problems.

Common Confusion

If the table or view you are testing might be huge (well, you don’t expect that, but if under some circumstances might be), consider some optimization techniques. The syntax depends on the underlying provider. If you are not experienced, try to search for e.g., “best way to check table is empty in ORACLE”.