QUA-1806: Restructure Unique check docs into multi-page section#1118
QUA-1806: Restructure Unique check docs into multi-page section#1118RafaelOsiro wants to merge 8 commits into
Conversation
The Potential Violation Messages example in unique-check.md was using
custom phrasing ("are not unique") that did not match the actual shape
anomaly template emitted by the dataplane. Update it to mirror the live
template ("For the field 'X, Y', N% of M records (K) contain duplicate
values") so the documentation matches what users see in product.
Greptile SummaryThis PR restructures the Unique check documentation from a single flat page into a five-page section (
Confidence Score: 5/5Documentation-only change with no runtime code; safe to merge. All changes are Markdown, HTML table markup, and MkDocs configuration. The deleted page is covered by two redirect-map entries, the navigation is consistent with the new structure, cross-page links use correct relative paths from the new unique/ subdirectory, and the sitewide icon replacement is driven by a single shared include-markdown component so all 39 affected pages stay in sync. No executable code was modified. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
OLD["unique-check.md\n(single page, deleted)"]
REDIRECT["redirect_maps in mkdocs.yml\n/unique-check/ to /unique/introduction/"]
subgraph NEW["New unique/ section"]
INTRO["introduction.md\nDefinition · Field Scope\nAccepted Types · Anomaly Types\nNext Steps card grid"]
HIW["how-it-works.md\nEvaluation flow · NULL handling\nFilter · Coverage · Anomaly format\nRelated rule types"]
HTC["how-to-create.md\nCommented out of nav\npending screenshots"]
EX["examples.md\nSingle-Field PK\nComposite Key\nScoped with Filter"]
API["api.md\nPayload example\nField notes table"]
FAQ["faq.md\nBehavior · Anomaly Reporting\nConfiguration"]
end
OLD -->|deleted + redirect| REDIRECT
REDIRECT --> INTRO
INTRO --> HIW
INTRO -.->|hidden| HTC
INTRO --> EX
INTRO --> API
INTRO --> FAQ
subgraph SITEWIDE["Sitewide icon change (39 check pages)"]
ANOM["anomaly-support/index.md\nOcticons to MDI icons\nempty cell to red close-circle"]
end
ANOM -->|include-markdown| INTRO
Reviews (2): Last reviewed commit: "docs(unique): polish sub-tree pages with..." | Re-trigger Greptile |
Overview
Restructures the Unique check from a single page into a multi-page section (
data-quality-checks/unique/) with Introduction, How It Works, Examples, API, and FAQ. Each Examples scenario now ships with its own Mermaid flowchart and equivalent SQL block. Corrects several factual gaps surfaced during a code-verified review pass (notably theis_element_contextproperty for Array fields, and the fact thatanomaly_message_fielddoes not apply to Unique because the check emits only Shape Anomalies). Tightens copy across the sub-tree, removes em-dashes, and standardizes Accepted Types and Anomaly Types tables sitewide on MDI icons. Also fixes the API Permissions table on the Self-Hosted License Permissions page.The
How to Createpage is authored but temporarily commented out from the nav and from the Introduction card grid until step screenshots are added in a follow-up.Key Changes
Unique sub-tree (new section under
data-quality-checks/unique/):introduction.md,how-it-works.md,examples.md,api.md,faq.md. Oldunique-check.mddeleted;mkdocs.ymlnav andredirect_mapsupdated so legacy URLs point to the new Introduction.examples.md: three tabbed scenarios (Single-Field Primary Key, Composite Key on Order Items, Scoped Uniqueness with Filter), each with its own scenario-specific Mermaid flowchart and equivalent SQL block. Custom Anomaly Description removed from Scenario 3 (it has no effect on Shape-only checks). "What gets flagged" phrasing standardized across all three scenarios.how-it-works.md: long-form semantics covering evaluation flow, single vs. composite, NULL handling, filter behavior, coverage, anomaly message format, and relationship with other rule types. Polished across multiple review rounds: single-field example in the 4-step flow, partial-NULL phrasing, optimized path wording, concrete coverage warning, K-count explanation in plain English, factual correction of the "Not Null" pairing row.introduction.md: tightened H1 to "Unique Check", renamed "In-Depth Overview" to "Overview", removed the NULL admonition (now lives in How It Works), condensed Typical use cases, reworded Field Scope, and updated the Next Steps card grid (How to Create card commented out pending screenshots).api.md: correctedpropertiesdescription to mentionis_element_contextfor Array fields; coverage default made explicit (1, strict mode); added the "Not applicable to Unique" caveat toanomaly_message_field; intro paragraph smoothed; removed single-item tab wrapper.faq.md: Q7 properties answer corrected for the Array case; added missing How It Works link in Related; new Q on Custom Anomaly Description not applying to Unique; standardized online_numberplaceholder; Unicode ellipsis replaced with ASCII dots.how-to-create.md: authored content with a TODO HTML comment noting the page is hidden until screenshots are restored from a local stash.Sitewide check-page alignment:
components/anomaly-support/index.md: standardized on MDI icons (:material-check-circle:green for supported,:material-close-circle:red for not-supported); removedtext-negativeandgrayscalecolor classes from Type labels.data-quality-checks/: replaced:octicons-check-16:with the green MDI check and added the missing "Supported" header to the Accepted Types tables.Other:
self-hosted/license/deep-dive/permissions.md: replaced the Markdown API Permissions table with an HTML equivalent and explicitcolgroupwidths so/license/expirationno longer wraps mid-word.overview-of-a-check.mdandrule-types-overview.md: links updated to the new Unique Introduction.Pages to Test
Custom Anomaly Description: Offand"anomaly_message_field": null.propertiesmentionsis_element_contextfor Array fields,coveragedefaults to1,anomaly_message_fieldhas the "Not applicable to Unique" caveat. Payload renders as a plain code fence (no tab chrome).not-null-check.md,contains-email-check.md,min-value-check.md)./license/expirationno longer wraps mid-word.