Skip to content

Added quality checker and end to end workflows#519

Merged
mwojtyczka merged 93 commits into
mainfrom
dq_job
Aug 22, 2025
Merged

Added quality checker and end to end workflows#519
mwojtyczka merged 93 commits into
mainfrom
dq_job

Conversation

@mwojtyczka

@mwojtyczka mwojtyczka commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Changes

  • Added a data quality checking job/workflow (Quality Checker) for validating data at rest. This enables applying quality checks without the need for code-level integration. It supports reference data provided from a table for checks that require reference data (e.g., foreign key validation) as well as custom check functions (python module with custom function(s) can be defined as absolute or relative workspace path or as a volume). This handles one run config for each job run. This should be extended by running quality checking across multiple tables as part of ticket 488.
  • Added end to end workflow to run profiler and quality checker as part of one workflow.
  • Added new cli command to apply checks: databricks labs dqx apply-checks
  • Added new cli command to run end-to-end workflow (profiler + quality checker): databricks labs dqx e2e
  • Added support for absolute path to InstallationChecksStorageHandler
  • Added support for serverless clusters to DQX workflows (default serverless_cluster=True). Applicable to profiler and quality checker.
  • Fixed profiler to always overwrite checks in the target
  • Removed unused connect field from he config
  • Moved ExtraParams from rule module to config to be able to set additional params for the quality checker. Also it is not used in rules and don't really belongs there.
  • Store run_time in ExtraParams as string in iso format to be able to serialize the config
  • Added timeout-minutes parameter to the profiler and apply checks cli commands
  • Refactored the installer
  • Fixed dqx installation via cli. Added missing databricks-connect dependency.

TODO:

  • Update documentation

FOLLOW UPs:

BREAKING CHANGES!

  • ExtraParams moved from databricks.labs.dqx.rule to databricks.labs.dqx.config

Linked issues

Resolves #173

Tests

  • manually tested
  • added unit tests
  • added integration tests
  • added end-to-end tests

This reverts commit f4a9901.
# Conflicts:
#	docs/dqx/docs/guide/quality_checks.mdx
#	docs/dqx/docs/reference/engine.mdx
#	src/databricks/labs/dqx/profiler/runner.py
#	src/databricks/labs/dqx/profiler/workflow.py
#	tests/integration/conftest.py
* added support for absolute paths to checks location in installation checks storage handler
* set product correctly when creating workspace client in workflow context
* use string for run_time filed in extra params to simplify serialization
* added integration test for quality checker
* removed unused connect field from config
* removed unused properties from contexts
added integration tests for custom functions
@mwojtyczka
mwojtyczka requested a review from a team as a code owner August 11, 2025 10:25
@mwojtyczka mwojtyczka added the do-not-merge The PR is blocked, e.g. being worked on and not ready. Not using draft to be able to test changes. label Aug 11, 2025
@mwojtyczka
mwojtyczka requested review from tombonfert and removed request for a team August 11, 2025 10:25
@mwojtyczka
mwojtyczka requested a review from dinbab1984 August 11, 2025 10:25

@ghanse ghanse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor comments

Comment thread docs/dqx/docs/guide/index.mdx Outdated
Comment thread docs/dqx/docs/guide/index.mdx Outdated
Comment thread docs/dqx/docs/guide/data_profiling.mdx
The "default" run config will be used if the run config is not provided. The run config is used to select specific run configuration from the 'config.yml'.

The following DQX configuration from 'config.yml' is used by the profiler workflow:
- 'input_config': configuration for the input data.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a link here to the config documentation.

@mwojtyczka mwojtyczka Aug 21, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is already linked: configuration file
or do you mean to create a separate page for the config?

Comment thread src/databricks/labs/dqx/cli.py Outdated
Comment thread src/databricks/labs/dqx/cli.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive data quality checking functionality and end-to-end workflows to DQX. It introduces a new quality checker job/workflow that can validate data at rest independently of code-level integration, supports custom check functions and reference data validation, and adds CLI commands for applying checks and running end-to-end workflows.

Key Changes

  • Added quality checker workflow and end-to-end workflow capabilities
  • Introduced support for custom check functions and reference tables
  • Added serverless cluster support by default for all workflows
  • Refactored installer architecture with cleaner separation of concerns

Reviewed Changes

Copilot reviewed 82 out of 85 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/test_workflow_task.py Updated test assertions for job_cluster default value change
tests/unit/test_workflow_instaler.py Fixed import path typo and quote style consistency
tests/unit/test_utils.py Added test for new get_reference_dataframes utility function
src/databricks/labs/dqx/workflows_runner.py Renamed from runtime.py and added quality checker/e2e workflows
src/databricks/labs/dqx/utils.py Added get_reference_dataframes function for reference table handling
src/databricks/labs/dqx/quality_checker/ New module containing quality checker workflow and runner implementations
src/databricks/labs/dqx/profiler/ Refactored profiler components with updated naming and storage handling
src/databricks/labs/dqx/installer/ Major refactoring with new warehouse installer, version checker, and config provider
src/databricks/labs/dqx/config.py Moved ExtraParams from rule module and added new configuration fields
src/databricks/labs/dqx/cli.py Added new CLI commands for apply-checks and e2e workflows
src/databricks/labs/dqx/checks_resolver.py Added support for resolving custom check functions from file paths

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tests/unit/test_workflow_instaler.py
Comment thread src/databricks/labs/dqx/pii/__init__.py
Comment thread src/databricks/labs/dqx/installer/dashboard_installer.py Outdated

@dinbab1984 dinbab1984 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested the DQX tooling demo. Everything works as expected.

@ghanse ghanse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This was referenced Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add quality checks workflow

4 participants