PageSourceSearch

https://weiser.ai/assets/js/a5a6afe9.facbd13b.js

js weiser.ai collected 2026-10-05 15:59:02 UTC 6,825 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[607],{2667:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"check-types/row-count","title":"Row Count Check","description":"The row_count check validates the number of rows in a dataset. This is one of the most basic and commonly used data quality checks.","source":"@site/docs/check-types/row-count.md","sourceDirName":"check-types","slug":"/check-types/row-count","permalink":"/docs/check-types/row-count","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Check Types","permalink":"/docs/check-types/"},"next":{"title":"Numeric Check","permalink":"/docs/check-types/numeric"}}');var r=s(4848),i=s(8453);const c={},o="Row Count Check",d={},l=[{value:"Configuration",id:"configuration",level:2},{value:"Examples",id:"examples",level:2},{value:"Basic Row Count Check",id:"basic-row-count-check",level:3},{value:"Row Count with Filter",id:"row-count-with-filter",level:3},{value:"Row Count by Dimensions",id:"row-count-by-dimensions",level:3},{value:"Row Count with Time Dimension",id:"row-count-with-time-dimension",level:3},{value:"Use Cases",id:"use-cases",level:2},{value:"Generated SQL",id:"generated-sql",level:2}];function a(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"row-count-check",children:"Row Count Check"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"row_count"})," check validates the number of rows in a dataset. This is one of the most basic and commonly used data quality checks."]}),"\n",(0,r.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Required"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"name"})}),(0,r.jsx)(n.td,{children:"Yes"}),(0,r.jsx)(n.td,{children:"Unique name for the check"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"dataset"})}),(0,r.jsx)(n.td,{children:"Yes"}),(0,r.jsx)(n.td,{children:"Table name or SQL query"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"type"})}),(0,r.jsx)(n.td,{children:"Yes"}),(0,r.jsxs)(n.td,{children:["Must be ",(0,r.jsx)(n.code,{children:"row_count"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"condition"})}),(0,r.jsx)(n.td,{children:"Yes"}),(0,r.jsx)(n.td,{children:"Comparison operator"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"threshold"})}),(0,r.jsx)(n.td,{children:"Yes"}),(0,r.jsx)(n.td,{children:"Expected row count value"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"dimensions"})}),(0,r.jsx)(n.td,{children:"No"}),(0,r.jsx)(n.td,{children:"Group by columns"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"filter"})}),(0,r.jsx)(n.td,{children:"No"}),(0,r.jsx)(n.td,{children:"WHERE clause conditions"})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,r.jsx)(n.h3,{id:"basic-row-count-check",children:"Basic Row Count Check"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"- name: orders_minimum_rows\n  dataset: orders\n  type: row_count\n  condition: gt\n  threshold: 0\n"})}),"\n",(0,r.jsx)(n.p,{children:"This check ensures the orders table has more than 0 rows."}),"\n",(0,r.jsx)(n.h3,{id:"row-count-with-filter",children:"Row Count with Filter"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"- name: active_users_count\n  dataset: users\n  type: row_count\n  condition: ge\n  threshold: 100\n  filter: status = 'active'\n"})}),"\n",(0,r.jsx)(n.p,{children:"This check validates that there are at least 100 active users."}),"\n",(0,r.jsx)(n.h3,{id:"row-count-by-dimensions",children:"Row Count by Dimensions"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"- name: orders_by_region\n  dataset: orders\n  type: row_count\n  dimensions: [regi
1on, status]\n  condition: gt\n  threshold: 10\n"})}),"\n",(0,r.jsx)(n.p,{children:"This check ensures each region/status combination has more than 10 orders."}),"\n",(0,r.jsx)(n.h3,{id:"row-count-with-time-dimension",children:"Row Count with Time Dimension"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"- name: daily_orders_count\n  dataset: orders\n  type: row_count\n  condition: gt\n  threshold: 50\n  time_dimension:\n    name: created_at\n    granularity: day\n"})}),"\n",(0,r.jsx)(n.p,{children:"This check validates that each day has more than 50 orders."}),"\n",(0,r.jsx)(n.h2,{id:"use-cases",children:"Use Cases"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Data Freshness"}),": Ensure new data is being loaded"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Completeness"}),": Verify expected data volume"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Business Rules"}),": Validate minimum activity levels"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Monitoring"}),": Track growth or decline in data volume"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"generated-sql",children:"Generated SQL"}),"\n",(0,r.jsx)(n.p,{children:"The row count check generates SQL similar to:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sql",children:"SELECT COUNT(*) \nFROM orders \nWHERE status = 'active'\n"})}),"\n",(0,r.jsx)(n.p,{children:"With dimensions:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sql",children:"SELECT region, status, COUNT(*) \nFROM orders \nGROUP BY region, status\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>o});var t=s(6540);const r={},i=t.createContext(r);function c(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.