Volume
Detects abnormal changes in the number of rows of a table.
The Volume monitor counts the rows of a table and alerts you when there are unusually few or unusually many.
When to Use
- Missing data: A table receives rows from several sources. A drop in the number of new rows reveals that one source stopped sending data.
- Unexpected spikes: A loading job runs twice, and the number of rows added to the table in one day doubles.
- Full reloads: A table is fully replaced every night. Compare its total number of rows with the previous run to make sure no rows were lost.
To check that new rows arrive on time rather than in the expected quantity, use Freshness.
How It Works
Each data point is a row count (COUNT(*)) of the rows that match the where clause:
- In incremental scan mode, Sifflet computes one data point per period of the time-based data aggregation (for example, one row count per day).
- In full dataset scan mode, Sifflet computes one data point per run: the total number of rows in the table.
The monitor fails when a data point is outside the threshold:
- Dynamic (default): Outside the confidence band that a machine learning (ML) model predicts from the history of the table, including its seasonality.
- Static: Outside the minimum and maximum you set.
- Relative: The change compared to the previous data point, as a value or a percentage, is outside the range you set.
With a dynamic threshold, the model needs a few data points before it can detect anomalies: at least four runs in full dataset scan mode. In incremental scan mode, the first run loads the history of the table (365 days by default), so the model can usually detect anomalies right away.
Example
You want to know when fewer orders than usual reach the orders table. Create a Volume monitor on orders with the following settings:
- Monitoring mode: Incremental scan, with
created_atas the time window column and a daily time-based data aggregation. - Threshold: Dynamic (default).
The table usually receives about 10,000 new orders per day, with fewer orders on Sundays. On June 14, one of the sales websites stops sending its orders, and orders receives only 2,000 new rows. The data point of June 14 is 2,000, below the expected range for a Wednesday, so the monitor fails.

A Volume monitor with an anomaly on June 14
Configure the Monitor
Volume Settings
| Setting | Description | Default |
|---|---|---|
| Use metadata-based queries when possible | Oracle only. Reads the row count from the table statistics (ALL_TABLES.NUM_ROWS) instead of running a SELECT COUNT(*) query. Available for tables (not views) in full dataset scan mode, without a where clause or group by. | Off |
Common Settings
- Threshold: Dynamic (default), static, or relative. See Thresholds.
- Scan mode: Incremental (default) or full dataset. See Scan Modes.
- Where clause and group by: Filter the rows to count, or compute one row count per value of a field. See Where Clause, Group By, and Joins. For example, group by a country field to detect a drop in the rows of one specific country.
- Joins: Join a second dataset to filter or group by its fields. See Joins.
Monitor as Code
The monitor kind is Volume. The following YAML creates the monitor of the example:
kind: Volume
timeWindow:
field: created_at
firstRun: P365D
frequency: P1DWithout a timeWindow, the monitor counts all the rows of the table at each run. Without a threshold, it uses a dynamic threshold.
| Parameter | Required | Description |
|---|---|---|
metadataBased | No | true to read the row count from the table statistics (Oracle only, see Volume Settings). Default: false. |
The following monitor counts the rows of each day per value of my_field, and alerts only on drops:
kind: Volume
threshold:
kind: Dynamic
sensitivity: 25
bounds: Min
groupBy:
field: my_field
timeWindow:
field: my_time_field
firstRun: P365D
offsetPeriods: 1
frequency: P1DFor the shared parameters (threshold, timeWindow, whereStatement, groupBy, partition), see the Parameters reference.
Related Templates
- Freshness: Checks whether new rows arrive in each period, regardless of how many.
- Row-Level Duplicates: Detects rows loaded twice, which a Volume monitor only catches when duplication changes the row count significantly.
Updated 10 days ago

