-
Notifications
You must be signed in to change notification settings - Fork 1
QUA-1024: Restructure Expected Values check docs #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RafaelOsiro
wants to merge
2
commits into
main
Choose a base branch
from
qua-1024-expected-values-restructure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,6 @@ | ||
| <!-- SPACING-WARNING --start --> | ||
| !!! info | ||
| Visual warnings for spacing issues are available across all forms where values are entered. | ||
| When a value includes leading or trailing spaces, the system automatically highlights it inside a warning-colored chip and displays a tooltip message indicating the issue in real time — for example: | ||
| The **List** input flags entries with leading or trailing whitespace. A clean value like `ship` renders as a normal chip; values like ` ship` or `ship ` get a yellow chip background so the extra space stands out at a glance. A warning icon also appears next to the field title. Hover the icon to see the full list of values with extra spaces. | ||
|
|
||
| > “The following value has leading or trailing spaces: ‘ship ’” | ||
|
|
||
|  | ||
|
|
||
| <!-- SPACING-WARNING --end --> | ||
| The chip is still saved exactly as typed. Re-enter the value without the surrounding spaces if the engine is meant to match it literally, since the comparison is exact and does not trim. | ||
| <!-- SPACING-WARNING --end --> | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # :material-api:{ .middle style="color: var(--q-brick)" } Expected Values Check API | ||
|
|
||
| The Expected Values check is created and managed through the standard Quality Checks API by setting `rule` to `expectedValues`, listing one field under `fields`, and providing the allowed vocabulary in `properties.list`. | ||
|
|
||
| !!! tip | ||
| For complete API documentation, including request and response schemas, visit the [API docs](https://demo.qualytics.io/api/docs){:target="_blank"}. | ||
|
|
||
| ## Endpoints | ||
|
|
||
| | Method | Path | Purpose | | ||
| |:---|:---|:---| | ||
| | `POST` | `/api/quality-checks` | Create a new Expected Values check. | | ||
| | `GET` | `/api/quality-checks/{id}` | Retrieve an Expected Values check by ID. | | ||
| | `PUT` | `/api/quality-checks/{id}` | Update an existing Expected Values check. | | ||
| | `DELETE` | `/api/quality-checks/{id}` | Delete (or archive) an Expected Values check. | | ||
|
|
||
| **Permission**: Requires **Author** team permission (or above) for `POST`, `PUT`, and `DELETE`; **Reporter** team permission (or above) for `GET`. | ||
|
|
||
| ## Payload Example | ||
|
|
||
| Create an Expected Values check on `o_orderstatus` with `POST /api/quality-checks`, showing every field accepted by the create endpoint: | ||
|
|
||
| ```json | ||
| { | ||
| "description": "Order status must be O, F, or P", | ||
| "rule": "expectedValues", | ||
| "fields": ["o_orderstatus"], | ||
| "container_id": 145, | ||
| "coverage": 1, | ||
| "filter": null, | ||
| "properties": {"list": ["O", "F", "P"]}, | ||
| "tags": ["enum", "orders"], | ||
| "additional_metadata": {"jira": "DATA-1101"}, | ||
| "anomaly_message_field": null, | ||
| "template_id": null, | ||
| "status": "Active", | ||
| "owner_id": 7, | ||
| "default_anomaly_assignee_id": 18 | ||
| } | ||
| ``` | ||
|
|
||
| ## Field Notes | ||
|
|
||
| | Field | Required | Notes | | ||
| |:---|:---:|:---| | ||
| | `description` | Yes | Free-text description shown in the UI. | | ||
| | `rule` | Yes | Must be `"expectedValues"`. | | ||
| | `fields` | Yes | Array with exactly one field name. Expected Values is a single-field rule. | | ||
| | `container_id` | Yes | ID of the container (table or file) the check runs against. | | ||
| | `coverage` | No | Fractional value between `0` and `1`. `1` (default) emits Record Anomalies for each failing row; `< 1` rolls failures into a single Shape Anomaly when the failing fraction exceeds the threshold. | | ||
| | `filter` | No | Spark SQL `WHERE` expression. Applied **before** the value comparison, so only filtered rows are evaluated. Send `null` for no filter. | | ||
| | `properties.list` | Yes | Array of accepted values. The list type is inferred from its contents: all-numeric → numeric list; all-boolean → boolean list; otherwise string list. Match the list type to the field type to avoid every row failing on type coercion. | | ||
| | `properties.is_element_context` | No | Set to `true` to evaluate each element of an array field against the list (uses `array_forall`). Auto-enabled by the platform for `Array[String]` fields. Only string element lists are supported today. | | ||
| | `tags` | No | List of tag names applied to the check for filtering and organization. | | ||
| | `additional_metadata` | No | Free-form key-value pairs (typically links to catalog, tickets, governance records). | | ||
| | `anomaly_message_field` | No | Name of a source-record field whose value should be used as the anomaly message instead of the system-generated one. In the UI this corresponds to the **Custom Anomaly Description** toggle. Applies to Record Anomalies (coverage = 1); ignored for Shape Anomalies. | | ||
| | `template_id` | No | ID of a Check Template to associate the check with. `null` if not using a template. | | ||
| | `status` | No | `"Active"` (default) or `"Draft"`. Draft checks are not evaluated by Scans. | | ||
| | `owner_id` | No | ID of the user who owns the check. Defaults to the user creating the check when omitted. | | ||
| | `default_anomaly_assignee_id` | No | ID of the user automatically assigned to anomalies produced by the check. | |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.