Skip to content
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

Docs: Seperating sections in data quality #18142

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Adding Test Cases to an Entity
slug: /how-to-guides/data-quality-observability/quality/adding-test-cases
---

# Adding Test Cases to an Entity
Tests cases are actual test that will be ran and executed against your entity. This is where you will define the execution time and logic of these tests
**Note:** you will need to make sure you have the right permission in OpenMetadata to create a test.

## Step 1: Creating a Test Case
Navigate to the entity you want to add a test to (we currently support quality test only for database entity). Go to `Profiler & Data Quality` tab. From there, click on the `Add Test` button in the upper right corner and select the type of test you want to implement

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/add-test-case.png"
alt="Write your first test"
caption="Write your first test"
/%}

## Step 2: Select the Test Definition
Select the type of test you want to run and set the parameters (if any) for your test case. If you have selected a `column` test, you will need to select which column you want to execute your test against. Give it a name and then submit it.

**Note:** if you have a profiler workflow running, you will be able to visualize some context around your column or table data.

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/add-test-defintion.png"
alt="Write your first test"
caption="Write your first test"
/%}

## Step 3: Set an Execution Schedule (Optional)
Starting in 1.5 it is possible to create multiple pipeline for your test cases. If you want to execute all of your test cases within the same pipeline you can simply toggle on the `Select All` on the ingestion configuration page. Otherwise you can select the specific test cases the pipeline will execute. The second options allows you to orchestrate pipelines at different times for different test cases.

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/add-ingestion.png"
alt="Create an ingestion pipeline"
caption="Create an ingestion pipeline"
/%}

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/ingestion-page.png"
alt="Schedule you test execution"
caption="Schedule you test execution"
/%}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Adding test suits through the UI
slug: /how-to-guides/data-quality-observability/quality/adding-test-suits
---

# Adding Test Suites Through the UI
Test Suites are logical container allowing you to group related Test Cases together from different tables. This is a great way to group related test cases together and set a single alert for test case failure.
**Note:** you will need to make sure you have the right permission in OpenMetadata to create a test.

## Step 1: Creating a Test Suite
From the vertical navigation bar, click on `Quality` and navigate to the `By Test Suites` tab. From there click on `Add Test Suite` button on the top right corner.

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/profiler-tab-view.png"
alt="Write your first test"
caption="Write your first test"
/%}


On the next page, enter the name and description (optional) of your test suite.

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/test-suite-page.png"
alt="Create test suite"
caption="Create test suite"
/%}


## Step 2: Add Test Cases
On the next page, you will be able to add existing test cases from different entity to your test suite. This allows you to group together test cases from different entities

**Note:** Test Case name needs to be unique across the whole platform. A warning message will show if your Test Case name is not unique.

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/test-case-page.png"
alt="Create test case"
caption="Create test case"
/%}


{% partial file="/v1.5/connectors/yaml/data-quality.md" /%}
Original file line number Diff line number Diff line change
Expand Up @@ -52,115 +52,3 @@ Test Definitions are generic tests definition elements specific to a test such a

### Test Cases
Test Cases specify a Test Definition. It will define what condition a test must meet to be successful (e.g. `max=n`, etc.). One Test Definition can be linked to multiple Test Cases.

## Adding Test Cases to an Entity
Tests cases are actual test that will be ran and executed against your entity. This is where you will define the execution time and logic of these tests
**Note:** you will need to make sure you have the right permission in OpenMetadata to create a test.

## Step 1: Creating a Test Case
Navigate to the entity you want to add a test to (we currently support quality test only for database entity). Go to `Profiler & Data Quality` tab. From there, click on the `Add Test` button in the upper right corner and select the type of test you want to implement

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/add-test-case.png"
alt="Write your first test"
caption="Write your first test"
/%}

## Step 2: Select the Test Definition
Select the type of test you want to run and set the parameters (if any) for your test case. If you have selected a `column` test, you will need to select which column you want to execute your test against. Give it a name and then submit it.

**Note:** if you have a profiler workflow running, you will be able to visualize some context around your column or table data.

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/add-test-defintion.png"
alt="Write your first test"
caption="Write your first test"
/%}

## Step 3: Set an Execution Schedule (Optional)
Starting in 1.5 it is possible to create multiple pipeline for your test cases. If you want to execute all of your test cases within the same pipeline you can simply toggle on the `Select All` on the ingestion configuration page. Otherwise you can select the specific test cases the pipeline will execute. The second options allows you to orchestrate pipelines at different times for different test cases.

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/add-ingestion.png"
alt="Create an ingestion pipeline"
caption="Create an ingestion pipeline"
/%}

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/ingestion-page.png"
alt="Schedule you test execution"
caption="Schedule you test execution"
/%}

## Adding Test Suites Through the UI
Test Suites are logical container allowing you to group related Test Cases together from different tables. This is a great way to group related test cases together and set a single alert for test case failure.
**Note:** you will need to make sure you have the right permission in OpenMetadata to create a test.

### Step 1: Creating a Test Suite
From the vertical navigation bar, click on `Quality` and navigate to the `By Test Suites` tab. From there click on `Add Test Suite` button on the top right corner.

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/profiler-tab-view.png"
alt="Write your first test"
caption="Write your first test"
/%}


On the next page, enter the name and description (optional) of your test suite.

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/test-suite-page.png"
alt="Create test suite"
caption="Create test suite"
/%}


### Step 2: Add Test Cases
On the next page, you will be able to add existing test cases from different entity to your test suite. This allows you to group together test cases from different entities

**Note:** Test Case name needs to be unique across the whole platform. A warning message will show if your Test Case name is not unique.

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/test-case-page.png"
alt="Create test case"
caption="Create test case"
/%}


{% partial file="/v1.4/connectors/yaml/data-quality.md" /%}

## How to Visualize Test Results
### From the Quality Page
From the home page click on the `Quality` menu item on the vertical navigation. This will bring you to the quality page where you'll be able to see your test cases either by:
- entity
- test suite
- test cases

If you want to look at your tests grouped by Test Suites, navigate to the `By Test Suites` tab. This will bring you to the Test Suite page where you can select a specific Test Suite.

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/test-suite-home-page.png"
alt="Test suite home page"
caption="Test suite home page"
/%}


From there you can select a Test Suite and visualize the results associated with this specific Test Suite.

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/test-suite-results.png"
alt="Test suite results page"
caption="Test suite results page"
/%}


### From a Table Entity
Navigate to your table and click on the `profiler & Data Quality` tab. From there you'll be able to see test results at the table or column level.
#### Table Level Test Results
In the top panel, click on the white background `Data Quality` button. This will bring you to a summary of all your quality tests at the table level

{% image
src="/images/v1.4/features/ingestion/workflows/data-quality/table-results-entity.png"
alt="Test suite results table"
caption="Test suite results table"
/%}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Adding Data Quality Test Cases from yaml config
slug: /how-to-guides/data-quality-observability/quality/test-cases-from-yaml-config
---

{% partial file="/v1.4/connectors/yaml/data-quality.md" /%}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To create a test in OpenMetadata:
- Click on **Add Test** to select a `Table` or `Column` level test.

{% image
src="/images/v1.4/how-to-guides/quality/test1.png"
src="/images/v1.5/how-to-guides/quality/test1.png"
alt="Write and Deploy No-Code Test Cases"
caption="Write and Deploy No-Code Test Cases"
/%}
Expand All @@ -41,7 +41,7 @@ OpenMetadata currently supports the following table level test types:
10. Table Data to Be Fresh: Validate the freshness of a table's data.

{% image
src="/images/v1.4/how-to-guides/quality/test4.png"
src="/images/v1.5/how-to-guides/quality/test4.png"
alt="Configure a Table Level Test"
caption="Configure a Table Level Test"
/%}
Expand Down Expand Up @@ -73,15 +73,15 @@ OpenMetadata currently supports the following column level test types:
15. Column Values to Not Match Regex: Define the regular expression that the column entries should not match.

{% image
src="/images/v1.4/how-to-guides/quality/test2.png"
src="/images/v1.5/how-to-guides/quality/test2.png"
alt="Configure a Column Level Test"
caption="Configure a Column Level Test"
/%}

Once the test has been created, you can view the test suite. The test case will be displayed in the Data Quality tab. You can also edit the Display Name and Description for the test.

{% image
src="/images/v1.4/how-to-guides/quality/test3.png"
src="/images/v1.5/how-to-guides/quality/test3.png"
alt="Column Level Test Created"
caption="Column Level Test Created"
/%}
Expand All @@ -91,7 +91,7 @@ A pipeline can be set up for the tests to run at a regular cadence.
- Add a pipeline

{% image
src="/images/v1.4/how-to-guides/quality/test5.png"
src="/images/v1.5/how-to-guides/quality/test5.png"
alt="Set up a Pipeline"
caption="Set up a Pipeline"
/%}
Expand All @@ -100,46 +100,46 @@ caption="Set up a Pipeline"
- Click on **Submit**.

{% image
src="/images/v1.4/how-to-guides/quality/test6.png"
src="/images/v1.5/how-to-guides/quality/test6.png"
alt="Schedule the Pipeline"
caption="Schedule the Pipeline"
/%}

The pipeline has been set up and will run at the scheduled time.

{% image
src="/images/v1.4/how-to-guides/quality/test7.png"
src="/images/v1.5/how-to-guides/quality/test7.png"
alt="Pipeline Scheduled"
caption="Pipeline Scheduled"
/%}

The tests will be run and the results will be updated in the Data Quality tab.

{% image
src="/images/v1.4/how-to-guides/quality/test8.png"
src="/images/v1.5/how-to-guides/quality/test8.png"
alt="Data Quality Tests"
caption="Data Quality Tests"
/%}

If a **test fails**, you can **Edit the Test Status** to New, Acknowledged, or Resolved status by clicking on the Status icon.

{% image
src="/images/v1.4/how-to-guides/quality/test9.png"
src="/images/v1.5/how-to-guides/quality/test9.png"
alt="Failed Test: Edit Status"
caption="Failed Test: Edit Status"
/%}

- Select the Test Status
{% image
src="/images/v1.4/how-to-guides/quality/test10.png"
src="/images/v1.5/how-to-guides/quality/test10.png"
alt="Edit Test Status"
caption="Edit Test Status"
/%}

- If you are marking the test status as **Resolved**, you must specify the **Reason** for the failure and add a **Comment**. The reasons for failure can be Duplicates, False Positive, Missing Data, Other, or Out of Bounds.
- Click on **Submit**.
{% image
src="/images/v1.4/how-to-guides/quality/test11.png"
src="/images/v1.5/how-to-guides/quality/test11.png"
alt="Resolved Status: Reason"
caption="Resolved Status: Reason"
/%}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: How to Visualize Test Results
slug: /how-to-guides/data-quality-observability/quality/visualize
---

# How to Visualize Test Results
## From the Quality Page
From the home page click on the `Quality` menu item on the vertical navigation. This will bring you to the quality page where you'll be able to see your test cases either by:
- entity
- test suite
- test cases

If you want to look at your tests grouped by Test Suites, navigate to the `By Test Suites` tab. This will bring you to the Test Suite page where you can select a specific Test Suite.

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/test-suite-home-page.png"
alt="Test suite home page"
caption="Test suite home page"
/%}


From there you can select a Test Suite and visualize the results associated with this specific Test Suite.

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/test-suite-results.png"
alt="Test suite results page"
caption="Test suite results page"
/%}


## From a Table Entity
Navigate to your table and click on the `profiler & Data Quality` tab. From there you'll be able to see test results at the table or column level.
### Table Level Test Results
In the top panel, click on the white background `Data Quality` button. This will bring you to a summary of all your quality tests at the table level

{% image
src="/images/v1.5/features/ingestion/workflows/data-quality/table-results-entity.png"
alt="Test suite results table"
caption="Test suite results table"
/%}
8 changes: 8 additions & 0 deletions openmetadata-docs/content/v1.5.x/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,14 @@ site_menu:
color: violet-70
icon: openmetadata

- category: How-to Guides / Data Quality Observability / Visualize
url: /how-to-guides/data-quality-observability/visualize
- category: How-to Guides / Data Quality Observability / Test Cases From YAML Config
url: /how-to-guides/data-quality-observability/quality/test-cases-from-yaml-config
- category: How-to Guides / Data Quality Observability / Adding Test Suits
url: /how-to-guides/data-quality-observability/quality/adding-test-suits
- category: How-to Guides / Data Quality Observability / Adding Test Cases
url: /how-to-guides/data-quality-observability/quality/adding-test-cases
- category: How-to Guides / Getting Started
url: /how-to-guides/getting-started
- category: How-to Guides / Day 1
Expand Down
Loading
Loading