Adding support for running checks on multiple tables#566
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for running data quality checks on multiple tables simultaneously, extending the existing single-table functionality. The implementation includes a new apply_checks_and_save_in_tables method that enables end-to-end checking for multiple input sources with configurable parallelism.
Key changes include:
- Added multi-table processing capability with configurable parallelism
- Refactored I/O operations into a separate module for better organization
- Enhanced storage factory to support dynamic handler creation based on location patterns
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/databricks/labs/dqx/engine.py | Added apply_checks_and_save_in_tables method and helper functions for multi-table processing |
| src/databricks/labs/dqx/io.py | New module containing refactored I/O operations moved from utils.py |
| src/databricks/labs/dqx/utils.py | Added list_tables function for table discovery and removed I/O functions |
| src/databricks/labs/dqx/checks_storage.py | Enhanced factory with create_for_location method for dynamic handler creation |
| tests/integration/test_apply_checks_and_save_in_table.py | New comprehensive test suite for multi-table functionality |
| demos/dqx_multi_table_demo.py | Demo notebook showcasing multi-table processing capabilities |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
added integration tests updated docstrings
|
✅ 402/402 passed, 3 flaky, 1 skipped, 4h14m30s total Flaky tests:
Running from acceptance #2685 |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 63 out of 66 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 63 out of 66 changed files in this pull request and generated 9 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 68 out of 71 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Changes
Added new execution methods to the engine and Workflows to support running quality checks on multiple tables including running for all tables/views matching wildcard patterns.
DETAILS:
apply_checks_and_save_in_tables- run quality checking and save results for multiple run configs.apply_checks_and_save_in_tables_for_patterns- run quality checking and save results for all tables matching wildcard patterns.profile_tablestoprofile_tables_for_patternsto use common naming convention.patternsjob parameter)exclude_patternsjob parameter)<input_table><output_table_suffix>,<input_table><quarantine_table_suffix>.output_table_suffixjob parameter uses "_dq_output" by default.quarantine_table_suffixjob parameter uses "_dq_quarantine" by default.run_config_name) and patterns (patterns) so that they run for all defined run configs in the configuration file by default. User can run workflows for specific run config by providingrun_config_name, and for tables matching wildcard patterns by providingpatternsparameter when running the workflows.run-configparameter optional and by default execute all run configs:validate-checks,profile,apply-checks--patterns,--exclude-patterns,--output-table-suffix, and--quarantine-table-suffixparameters to the CLI commands for pattern based matching execution of workflowsBREAKING CHANGES!
DQEngine:load_checks_from_local_file,load_checks_from_workspace_file,load_checks_from_table,load_checks_from_installation,save_checks_in_local_file,save_checks_in_workspace_file,save_checks_in_table,,save_checks_in_installation,load_run_config. For loading and saving checks, users are advised to useload_checksandsave_checksof theDQEnginedescribed here, which support various storage types.Linked issues
Resolves #488 #586
Tests