<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Test patterns on </title>
    <link>https://docs.justcat.it/how-to-guides/test-patterns/</link>
    <description>Recent content in Test patterns on </description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Fri, 21 Aug 2026 10:00:00 +0200</lastBuildDate><atom:link href="https://docs.justcat.it/how-to-guides/test-patterns/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Compare data across systems</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/compare-data-across-systems/</link>
      <pubDate>Fri, 21 Aug 2026 10:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/compare-data-across-systems/</guid>
      <description>The ladder #Each rung costs more and proves more. Most projects keep tests on every rung — the cheap ones run after every load, the expensive ones nightly or on demand.
Rung Proves Cost 1 — counts the same number of rows (per table, per day) trivial 2 — counts by period or key where the difference is — which month, which region cheap 3 — the IDs which rows are missing on which side the key column of every row, ordered 4 — the full rows every value agrees every column of every row, ordered You have the query language on both sides, so you decide the grain, the filter, the columns — CAT only compares what comes back.</description>
    </item>
    
    <item>
      <title>Test incremental loads</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/test-incremental-loads/</link>
      <pubDate>Fri, 21 Aug 2026 10:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/test-incremental-loads/</guid>
      <description>How it goes wrong #An incremental load picks rows by a watermark — ModifiedAt &amp;gt; last run — or by a change log, and merges them into the target. The failure modes are the same everywhere:
Late-arriving rows — a row whose ModifiedAt is older than the watermark when it finally lands in the source (replication lag, a batch stamped with its business date, a transaction that committed after the load read) — skipped forever.</description>
    </item>
    
    <item>
      <title>Test schemas and metadata</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/test-schemas-and-metadata/</link>
      <pubDate>Fri, 21 Aug 2026 09:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/test-schemas-and-metadata/</guid>
      <description>The design against reality #Most analytical solutions are built from a sheet: a list of tables and columns with types, owners, layers — the spec the developers worked from, kept in Excel or CSV in the repo. That sheet is a data source for CAT (Excel@2 / Csv@2), the catalog of the platform is another (INFORMATION_SCHEMA, sys.columns, Unity Catalog&amp;rsquo;s system.information_schema), and the test is a comparison between the two.</description>
    </item>
    
    <item>
      <title>Test compliance rules</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/test-compliance-rules/</link>
      <pubDate>Fri, 21 Aug 2026 09:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/test-compliance-rules/</guid>
      <description>Masked values for flagged customers #The anonymization job replaces personal columns with a marker — --removed--, a hash, NULL — for customers with a flag (erasure requested, contract ended, consent withdrawn). The test: a flagged customer whose column still holds anything else.
Form view YAML Name Erased customers carry no personal data Suite GDPR Data source CRM Query SELECT CustomerId, Email, Phone, FirstName, LastName FROM dbo.Customer WHERE ErasureRequested = 1 AND (Email &amp;lt;&amp;gt; &#39;--removed--&#39; OR Phone &amp;lt;&amp;gt; &#39;--removed--&#39; OR FirstName &amp;lt;&amp;gt; &#39;--removed--&#39; OR LastName &amp;lt;&amp;gt; &#39;--removed--&#39; OR Email IS NULL OR Phone IS NULL) Expectation set is empty Maximum errors logged 0 Tests: - Name: Erased customers carry no personal data Suite: GDPR Description: Customers with ErasureRequested = 1 must have every personal column set to &#39;--removed--&#39; by the nightly anonymization job.</description>
    </item>
    
    <item>
      <title>Smoke tests with set is not empty</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/smoke-tests-with-set-is-not-empty/</link>
      <pubDate>Fri, 21 Aug 2026 10:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/smoke-tests-with-set-is-not-empty/</guid>
      <description>The pattern #set is not empty passes on the first row and never reads a second. Make the query cheap to return one row — TOP 1 / LIMIT 1 and a filter that hits an index — and it is the fastest test in the project:
Form view YAML Name Customer dimension is loaded Suite Smoke tests Data source DWH Query SELECT TOP 1 1 FROM dim.Customer Expectation set is not empty Name Yesterday&amp;rsquo;s sales arrived Suite Smoke tests Data source DWH Query SELECT TOP 1 1 FROM fact.</description>
    </item>
    
    <item>
      <title>Find problems with set is empty</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/find-problems-with-set-is-empty/</link>
      <pubDate>Fri, 21 Aug 2026 10:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/find-problems-with-set-is-empty/</guid>
      <description>The pattern #State the rule as a violation query: every row it returns is a problem. Orphans, duplicates, nulls where none may be, values out of range, a dimension member that appeared out of nowhere, a fact older than its dimension row:
Form view YAML Name No duplicate customer emails Suite Data quality Data source DWH Query SELECT Email, COUNT(*) AS Rows FROM dim.Customer WHERE IsCurrent = 1 GROUP BY Email HAVING COUNT(*) &amp;gt; 1 Expectation set is empty Name Every fact row has a date in the calendar Suite Data quality Data source DWH Query SELECT TOP 20 f.</description>
    </item>
    
    <item>
      <title>Differences between systems</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/differences-between-systems/</link>
      <pubDate>Fri, 21 Aug 2026 10:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/differences-between-systems/</guid>
      <description>CAT compares values leniently by design — NULL equals NULL, text ignoring case, numbers as numbers within a tolerance, dates as dates; the rules are on Sets match. The table below is what still bites, and the fix for each. The principle throughout: make both sides return the same shape, rather than asking CAT to guess.
Difference What you see Neutralize it Numeric types — INT vs DECIMAL, FLOAT vs NUMERIC, money as DECIMAL(19,4) vs FLOAT sums off by a cent, 12.</description>
    </item>
    
    <item>
      <title>Which expectation when</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/which-expectation-when/</link>
      <pubDate>Fri, 21 Aug 2026 10:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/which-expectation-when/</guid>
      <description>You want to prove… Expectation Queries Shape of the query no row breaks this rule set is empty 1 SELECT … WHERE &amp;lt;the rule is broken&amp;gt; — the offending rows there is data here set is not empty 1 SELECT TOP 1 … FROM &amp;lt;table&amp;gt; (or a partition, a day) exactly N rows set row count 1 + the number SELECT DISTINCT &amp;lt;member&amp;gt; FROM … with Expected row count N these two sets are the same sets match 2 the same columns from both sides, both ORDER BY the key everything here is also there contains 2 same as sets match; the first set may hold more Each example below is shown twice: as the fields you fill in on the Tests page of CAT Studio, and as the same test in a project file.</description>
    </item>
    
    <item>
      <title>My expectation does not exist</title>
      <link>https://docs.justcat.it/how-to-guides/test-patterns/my-expectation-does-not-exist/</link>
      <pubDate>Fri, 21 Aug 2026 10:00:00 +0200</pubDate>
      
      <guid>https://docs.justcat.it/how-to-guides/test-patterns/my-expectation-does-not-exist/</guid>
      <description>The move #Keep the query that computes the number. Add the condition that means something is wrong — as a HAVING or a WHERE on a derived table — and expect set is empty. Two things happen: the test passes exactly when the rule holds, and when it fails the failure message shows the actual value, because the row that came back carries it.
&amp;ldquo;I expect COUNT(*) to be between 10 and 20&amp;rdquo; — as you fill it in on the Tests page of CAT Studio, and as YAML:</description>
    </item>
    
  </channel>
</rss>
