Is UUID

Detects values of a field that are not valid universally unique identifiers (UUIDs).

The Is UUID monitor checks that a string field only contains universally unique identifiers (UUIDs), such as 123e4567-e89b-12d3-a456-426614174000.

When to Use

  • Technical identifiers: An identifier field is generated by an application and must always be a UUID.
  • Join keys: A foreign key must keep the same format as the identifier it references, or the joins between the two tables silently drop rows.

How It Works

For each data point, Sifflet counts the rows where the field value does not match the UUID format, and computes:

  • Count (default value mode): The number of invalid rows.
  • Percentage: The share of invalid rows among the rows checked for the data point, in percent. These are the rows of the period in incremental scan mode (for example, all the rows created that day), or all the rows of the table in full dataset scan mode. Rows excluded by the where clause are not counted.

Null values are not counted as invalid. To detect them, use Nulls.

The default static threshold fails when the data point is greater than 0, that is, as soon as one value is invalid.

A valid UUID is made of 32 lowercase hexadecimal digits in five groups separated by hyphens (8-4-4-4-12 characters). Uppercase UUIDs, such as 123E4567-E89B-12D3-A456-426614174000, are counted as invalid. To accept them, use Matches Regex with your own pattern.

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Example

You want every order identifier to be a UUID. Create an Is UUID monitor on orders with the following settings:

  • Column to monitor: order_id.
  • Monitoring mode: Incremental scan, with created_at as the time window column and a daily time-based data aggregation.
  • Threshold: Static, Greater than 0 (default).

On June 13, a new sales website starts sending orders with numeric identifiers such as 12345, and 600 orders of the day get one. The data point of June 13 is 600, greater than 0, so the monitor fails.

Configure the Monitor

📝 Note: This template is only available on Athena, BigQuery, Databricks, MySQL, Oracle, PostgreSQL, Redshift, and Snowflake. See Supported Data Sources.

Is UUID Settings

SettingDescriptionDefault
Column to monitorThe string field to check.None

Common Settings

  • Value mode: Count (default) or Percentage.
  • Threshold: Static (default), relative, or dynamic. See Thresholds.
  • Scan mode: Incremental or full dataset. See Scan Modes.
  • Where clause and group by: See Where Clause, Group By, and Joins.
  • Joins: Join a second dataset to filter or group by its fields. See Joins.

Monitor as Code

The monitor kind is FieldFormat, with format.kind: UUID. The following YAML creates the monitor of the example:

kind: FieldFormat
field: order_id
format:
  kind: UUID
timeWindow:
  field: created_at
  firstRun: P365D
  frequency: P1D
ParameterRequiredDescription
fieldYesThe string field to check.
format.kindYesUUID.

For the shared parameters, see the Parameters reference.

Related Templates

  • Matches Regex: Checks values against a regular expression of your own, when the built-in format does not fit your data.

Did this page help you?