Row Count Monitoring tracks row counts in your tables over time. It detects when data volumes drop unexpectedly (data loss) or spike unusually (duplicate loads), helping you catch ETL issues before they impact downstream consumers.Documentation Index
Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
Use this file to discover all available pages before exploring further.
Why Row Count? Row count monitoring used to be part of Data Quality Metrics. We moved it to its own feature with enhanced capabilities: ML-based pattern learning, time-windowed counting, and explicit threshold support.
Configuration Reference
Monitoring Mode
Row Count Monitoring offers two approaches to fit different needs:Auto-Learn Mode (Recommended)
Let AnomalyArmor learn your table’s normal row count patterns:| Aspect | How It Works |
|---|---|
| Learning period | Collects data for 7+ days to establish baseline |
| Pattern detection | Identifies daily, weekly, and seasonal trends |
| Anomaly detection | Uses statistical analysis (mean +/- stddev * sensitivity) |
| Best for | Tables with consistent, predictable patterns |
Explicit Mode
Set specific row count thresholds when you know exactly what to expect:| Setting | Description |
|---|---|
| Min rows | Alert if row count falls below this value |
| Max rows | Alert if row count exceeds this value |
| Best for | Tables with known, fixed expectations |
Sensitivity
For auto-learn mode, sensitivity controls how strict the anomaly detection is. It’s the multiplier applied to the standard deviation when calculating expected ranges.| Sensitivity | Behavior | Use When |
|---|---|---|
| 1 (Tight) | Very strict, catches small deviations | Critical data, low tolerance for anomalies |
| 2 (Balanced) | Default, catches moderate deviations | Most tables, standard monitoring |
| 3 (Relaxed) | Less strict, allows more variation | High natural variability, noisy data |
| 4 (Loose) | Very permissive, only catches large deviations | Highly variable patterns, initial setup |
Timestamp Column
Optional column used to filter rows within the time window. Without a timestamp column, all rows in the table are counted regardless of when they were created. When to use: -Append-only tables that grow over time -Event streams or log tables -Tables where you care about recent data arrival When to skip: -Tables that are fully replaced on each load -Snapshot tables with fixed row counts -Dimension tables with slow-changing data- Must be a timestamp or datetime type
- Should represent when the row was created/ingested
- Should be indexed for performance
Time Window
How far back to count rows when a timestamp column is specified. Choose based on your data load frequency:| Window | Duration | Best For |
|---|---|---|
| 1 hour | Last 60 minutes | Real-time streaming, high-frequency events |
| 6 hours | Last 6 hours | Hourly batch jobs, frequent updates |
| 12 hours | Last 12 hours | Twice-daily pipelines |
| 24 hours | Last day | Daily batch ETL (most common) |
| 168 hours | Last 7 days | Weekly aggregates, slow-changing data |
Check Interval
How often to run the row count check and evaluate for anomalies:| Interval | Frequency | Best For |
|---|---|---|
| 1 hour | Every hour | Real-time monitoring, critical tables |
| 6 hours | 4x per day | Standard monitoring, daily tables |
| 12 hours | 2x per day | Less critical tables, longer time windows |
| 24 hours | Once per day | Weekly tables, slow-changing data |
Time-Windowed Counting
For tables that accumulate data over time, use a timestamp column to count rows within a specific window:| Window | Use Case |
|---|---|
| 1 hour | Real-time event streams |
| 6 hours | Frequent batch loads |
| 12 hours | Twice-daily pipelines |
| 24 hours | Daily batch ETL (most common) |
| 168 hours | Weekly aggregates |
Setting Up Row Count Monitoring
Open Data Quality Tab
Click the Data Quality tab on the asset detail page, then scroll to the Row Count Monitoring section.
Create Schedule
Click Create Schedule and configure:
- Table: Select the table to monitor
- Timestamp column: (Optional) For time-windowed counting
- Time window: How far back to count rows
- Check interval: How often to check (1h, 6h, 12h, 24h)
Choose Monitoring Mode
Select your monitoring approach:Auto-Learn Mode:
- Toggle Auto-learn on
- Set Sensitivity (1-4, lower = more sensitive)
- Wait for learning period to complete
- Toggle Auto-learn off
- Set Expected min rows
- Set Expected max rows
Understanding Results
Status Indicators
| Status | Meaning | Action |
|---|---|---|
| Healthy | Row count within expected range | None needed |
| Anomaly | Row count outside expected range | Investigate the cause |
| Learning | Collecting baseline data | Wait for learning to complete |
| No Data | No checks have run yet | Check will run on next interval |
Anomaly Types
| Anomaly | Possible Causes |
|---|---|
| Row count too low | ETL failure, data loss, filter bug, source issue |
| Row count too high | Duplicate load, removed filter, upstream spike |
| Row count zero | Complete ETL failure, wrong table, permissions |
Best Practices
Choose the Right Mode
| Scenario | Recommended Mode |
|---|---|
| Data patterns vary naturally | Auto-learn with sensitivity 2-3 |
| Exact expectations known | Explicit with min/max thresholds |
| New table, unknown patterns | Auto-learn with sensitivity 3-4 |
| Critical data, low tolerance | Auto-learn with sensitivity 1-2 |
Set Appropriate Windows
| Data Pattern | Recommended Window |
|---|---|
| Real-time streaming | 1 hour |
| Hourly batch jobs | 6 hours |
| Daily batch jobs | 24 hours |
| Weekly aggregates | 168 hours |
Start Conservative, Then Tighten
- Week 1: Use auto-learn with sensitivity 3 (less sensitive)
- Week 2-4: Review any anomalies, adjust if too noisy
- Month 2+: Tighten to sensitivity 2 once patterns are stable
Row Count vs. Metrics
| Feature | Row Count | Data Quality Metrics |
|---|---|---|
| Purpose | Monitor row counts | Monitor column statistics |
| Scope | Table-level | Column-level |
| ML-based | Yes (auto-learn) | Yes (anomaly detection) |
| Time windows | Yes | No |
| Explicit thresholds | Yes | Via checks |
Troubleshooting
Status shows 'Learning' for too long
Status shows 'Learning' for too long
Causes:
- Not enough data points collected yet
- Check interval is very long (weekly)
- Wait for at least 7 data points (7 days for daily checks)
- Consider switching to explicit mode if you know expected values
Too many false positive anomalies
Too many false positive anomalies
Causes:
- Sensitivity is too low (too sensitive)
- Natural data variation is high
- Seasonality not yet learned
- Increase sensitivity (e.g., 2 to 3)
- Allow more baseline data (30+ days)
- Switch to explicit mode with wider thresholds
Missing real anomalies
Missing real anomalies
Causes:
- Sensitivity is too high (not sensitive enough)
- Baseline includes anomalous data
- Decrease sensitivity (e.g., 3 to 2)
- Switch to explicit mode with tighter thresholds
Row count always zero with time window
Row count always zero with time window
Causes:
- Timestamp column has no recent data
- Wrong timestamp column selected
- Time window too narrow
- Verify timestamp column has data in the window
- Check column data type (should be timestamp/datetime)
- Widen the time window
Common Questions
Auto-learn or explicit mode, which should I pick?
Use auto-learn when row counts fluctuate naturally, AnomalyArmor builds a statistical baseline and flags deviations. Use explicit when you know the exact min and max (for example, a daily summary that should always have exactly one row).Why configure a timestamp column?
Without one,COUNT(*) returns all rows ever, so counts only grow and anomaly detection loses meaning. A timestamp column lets AnomalyArmor count only rows inside a time window like the last 24 hours, which is what you actually want to monitor for append-only tables.
How long does auto-learn mode need before it starts alerting?
At least 7 data points. For a daily check interval that’s 7 days; for hourly it’s 7 hours. Until enough baseline accumulates, the status shows Learning and no anomalies fire.What does a sensitivity of 2 actually mean?
It’s the multiplier on the standard deviation used to define the expected range. Expected range =mean ± (stddev × sensitivity). Lower values (1) are stricter and catch smaller drifts; higher values (3-4) tolerate more variation.
What’s the difference between row count monitoring and data quality metrics?
Row count is table-level (“did the right volume arrive?”) with ML pattern learning and time windows. Metrics are column-level (“are the values correct?”), tracking things like null percentages, distinct counts, and numeric ranges.What typically causes a row count spike?
The most common cause is a duplicate load, where the same batch ran twice or a filter was removed upstream. Sudden drops are usually ETL failures, wrong source, or a filter change that excluded valid data. The anomaly page shows the timing so you can correlate with deploys.What’s Next
Set Up Alerts
Get notified when row count anomalies are detected
Data Quality Metrics
Monitor column-level statistics like null percentages
Freshness Monitoring
Track when data was last updated
Report Badges
Embed row count status in dashboards
