Contains Url Check Examples
Three real-world scenarios that show how the Contains Url check is typically used in production: validating a product image column, checking link attachments with a filter, and auditing a legacy column mid-cleanup. The first two run at 100% coverage and report Record Anomalies; the third lowers coverage and reports a Shape Anomaly instead.
The situation: The products table stores the canonical image location in image_url. Rows holding a file name, a note, or an internal path break every storefront and feed that reads the column.
Check configuration
| Field | Value |
|---|---|
| Rule | Contains Url |
| Field | image_url |
| Filter | (none) |
| Custom Anomaly Description | Off |
| Coverage | 100% |
| Owner | (check creator) |
| Anomaly Assignee | (Catalog Data team) |
| Description | Product image column must hold a URL. |
| Tags | catalog, format |
| Additional Metadata | jira: DATA-7401 |
| Status | Active |
Payload
{
"description": "Product image column must hold a URL.",
"rule": "containsUrl",
"fields": ["image_url"],
"container_id": 520,
"coverage": 1,
"filter": null,
"properties": {},
"tags": ["catalog", "format"],
"additional_metadata": {"jira": "DATA-7401"},
"anomaly_message_field": null,
"template_id": null,
"status": "Active",
"owner_id": 7,
"default_anomaly_assignee_id": 22
}
Sample Data
| product_id | image_url | status |
|---|---|---|
| SKU-001 | https://cdn.example.com/a.jpg | active |
| SKU-002 | a.jpg | active |
| SKU-003 | https://cdn.example.com/c.png | active |
| SKU-004 | (null) | draft |
What gets flagged
Product SKU-002 holds a bare file name instead of a location. SKU-004 is NULL and passes without firing an anomaly. Coverage is 100%, so the failing row is reported as a Record Anomaly.
Record Anomaly
The field 'image_url' has value 'a.jpg', which does not contain a URL
Flowchart
graph TD
A["No filter, evaluate all rows"] --> B["Read image_url as text"]
B --> C{"Is value NULL?"}
C -->|Yes| D["Row passes"]
C -->|No| E{"Does it contain<br/>a URL?"}
E -->|Yes| D
E -->|No| F["Flag row.<br/>Record Anomaly per failing row."]
Equivalent SQL
The situation: The attachments table mixes external links with uploaded files. Only rows of type link must carry a URL in location; uploaded files hold storage keys and are out of scope.
Check configuration
| Field | Value |
|---|---|
| Rule | Contains Url |
| Field | location |
| Filter | attachment_type = 'link' |
| Custom Anomaly Description | Off |
| Coverage | 100% |
| Owner | (check creator) |
| Anomaly Assignee | (Content Platform) |
| Description | Link attachments must carry a URL. |
| Tags | content, format |
| Additional Metadata | jira: DATA-7433 |
| Status | Active |
Payload
{
"description": "Link attachments must carry a URL.",
"rule": "containsUrl",
"fields": ["location"],
"container_id": 521,
"coverage": 1,
"filter": "attachment_type = 'link'",
"properties": {},
"tags": ["content", "format"],
"additional_metadata": {"jira": "DATA-7433"},
"anomaly_message_field": null,
"template_id": null,
"status": "Active",
"owner_id": 7,
"default_anomaly_assignee_id": 22
}
Sample Data (filtered to attachment_type = 'link')
| attachment_id | attachment_type | location |
|---|---|---|
| A-01 | link | https://docs.example.com/spec |
| A-02 | link | ask the team |
| A-03 | link | http://example.org/policy |
Why the filter matters
The filter runs before the evaluation, so uploaded files are never tested for a URL. Only link attachments are evaluated.
What gets flagged
A-02 holds a note instead of a location, so it is the only row reported. Coverage is 100%, so the failure is reported as a Record Anomaly, and the message ends with the filter that scoped the evaluation.
Record Anomaly
The field 'location' has value 'ask the team', which does not contain a URL [filter: attachment_type = 'link']
Flowchart
graph TD
A["Apply filter: attachment_type = 'link'"] --> B["Read location as text"]
B --> C{"Does it contain<br/>a URL?"}
C -->|Yes| D["Row passes"]
C -->|No| E["Flag row.<br/>Anomaly message ends with<br/>[filter: attachment_type = 'link']"]
Equivalent SQL
The situation: A legacy reference column mixes links with free-text notes. A cleanup job is rewriting the bad rows, and a small fraction is expected to remain broken until it finishes, so the check tolerates up to 0.5% failures.
Check configuration
| Field | Value |
|---|---|
| Rule | Contains Url |
| Field | reference |
| Filter | (none) |
| Custom Anomaly Description | Off |
| Coverage | 99.5% |
| Owner | (check creator) |
| Anomaly Assignee | (Legacy Migration team) |
| Description | Legacy reference column must hold a URL. |
| Tags | legacy, format |
| Additional Metadata | jira: DATA-7488 |
| Status | Active |
Payload
{
"description": "Legacy reference column must hold a URL.",
"rule": "containsUrl",
"fields": ["reference"],
"container_id": 522,
"coverage": 0.995,
"filter": null,
"properties": {},
"tags": ["legacy", "format"],
"additional_metadata": {"jira": "DATA-7488"},
"anomaly_message_field": null,
"template_id": null,
"status": "Active",
"owner_id": 7,
"default_anomaly_assignee_id": 41
}
Sample Data
| doc_id | reference | migrated |
|---|---|---|
| D-01 | https://intranet.example.com/policy | true |
| D-02 | shared drive | false |
| D-03 | n/a | false |
| D-04 | (null) | false |
What gets flagged
Documents D-02 and D-03 still hold free-text notes. D-04 is NULL, so it passes without firing an anomaly but still counts in the scanned total. Only 50% of the rows pass, which is below the 99.5% coverage threshold, so the check reports a single Shape Anomaly for the dataset with a sample of the offending rows. Coverage below 100% does not produce Record Anomalies.
Shape Anomaly
For the field 'reference', 50.000% of 4 records (2) do not contain a URL
Flowchart
graph TD
A["No filter, evaluate all rows"] --> B["Read reference as text"]
B --> C{"Is value NULL?"}
C -->|Yes| D["Row passes"]
C -->|No| E{"Does it contain<br/>a URL?"}
E -->|Yes| D
E -->|No| F["Flag row.<br/>Passing rate falls below the 99.5%<br/>coverage, so one Shape Anomaly is reported."]
Equivalent SQL
See Also
-
How It Works
The complete reference: definition, field scope, pattern matching, NULL handling, arrays, filter behavior, and coverage.
-
Anomaly Reporting
The anomaly messages the check produces, what the numbers mean, Source Records highlighting, and Custom Anomaly Description.
-
Best Practices
Guidelines for scoping the check, pairing rules, and keeping the signal clean.
-
Permissions
The team permission each action needs: view, create, edit, archive, restore, and delete.