Skip to content
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
1086154
initial version
mwojtyczka Sep 5, 2025
b8f97b9
fmt
mwojtyczka Sep 5, 2025
949f803
Merge branch 'main' into feature/multi-table
mwojtyczka Sep 5, 2025
e186ad4
increase allowed local vars due to tests
mwojtyczka Sep 5, 2025
c6c4f32
Merge remote-tracking branch 'origin/feature/multi-table' into featur…
mwojtyczka Sep 5, 2025
229beb6
Merge branch 'main' into feature/multi-table
mwojtyczka Sep 15, 2025
0d4cdd6
Merge branch 'main' into feature/multi-table
mwojtyczka Sep 16, 2025
a401ab3
Merge branch 'main' into feature/multi-table
mwojtyczka Sep 18, 2025
ef1aee8
Merge branch 'main' into feature/multi-table
mwojtyczka Sep 19, 2025
4e4df41
fix import issues
mwojtyczka Sep 23, 2025
4d5e317
added telemetry
mwojtyczka Sep 23, 2025
09953ac
added integration tests
mwojtyczka Sep 23, 2025
899f106
updated demo and docs
mwojtyczka Sep 23, 2025
1ac1e71
updated docs
mwojtyczka Sep 23, 2025
c918534
updated demo and docs
mwojtyczka Sep 24, 2025
e391bdf
refactor
mwojtyczka Sep 24, 2025
8f30e04
refactor
mwojtyczka Sep 24, 2025
6c10874
refactor
mwojtyczka Sep 24, 2025
53514f3
refactor
mwojtyczka Sep 24, 2025
023fdd4
refactor
mwojtyczka Sep 24, 2025
b52003c
increase random names to 10 to minimize clashes
mwojtyczka Sep 25, 2025
857cc75
updated docs
mwojtyczka Sep 25, 2025
1c2ff2a
Support running workflows for multiple all run configs.
mwojtyczka Sep 26, 2025
5416895
Support running workflows for multiple all run configs.
mwojtyczka Sep 26, 2025
04eace2
fixed tests
mwojtyczka Sep 26, 2025
ebc36eb
refactor
mwojtyczka Sep 26, 2025
f172cd6
updated docs
mwojtyczka Sep 26, 2025
6b36ca3
updated docs
mwojtyczka Sep 26, 2025
7f67d53
updated docs
mwojtyczka Sep 26, 2025
31ca824
updated docs
mwojtyczka Sep 27, 2025
2edab9a
fix tests
mwojtyczka Sep 28, 2025
3293b75
fix tests
mwojtyczka Sep 28, 2025
b05549e
refactor
mwojtyczka Sep 28, 2025
26a4008
updated tests
mwojtyczka Sep 29, 2025
95f551c
fixed tests
mwojtyczka Sep 29, 2025
bc57613
fixed tests, updated docs
mwojtyczka Sep 29, 2025
241f576
updated demos
mwojtyczka Sep 29, 2025
2b509e2
updated docs
mwojtyczka Sep 29, 2025
f32b939
updated demo
mwojtyczka Sep 29, 2025
9176d63
refactor
mwojtyczka Sep 29, 2025
f784236
optimize list tables logic
mwojtyczka Sep 29, 2025
c9309c4
refactor
mwojtyczka Sep 29, 2025
ed07bfe
refactor
mwojtyczka Sep 29, 2025
c8d6c67
fixed tests
mwojtyczka Sep 29, 2025
2be6e05
Merge branch 'main' into feature/multi-table
mwojtyczka Sep 30, 2025
a8a3aa9
refactor
mwojtyczka Sep 30, 2025
36ff06b
fmt
mwojtyczka Sep 30, 2025
5eb4c13
test
mwojtyczka Sep 30, 2025
ba36518
test
mwojtyczka Sep 30, 2025
9061e13
added exclusion pattern
mwojtyczka Oct 1, 2025
c44159a
added exclusion pattern to workflows
mwojtyczka Oct 1, 2025
19855e4
refactor
mwojtyczka Oct 1, 2025
d44a689
fixed tests
mwojtyczka Oct 1, 2025
6088721
updated docs
mwojtyczka Oct 1, 2025
4dcd015
updated docs
mwojtyczka Oct 1, 2025
64723a6
updated docstrings
mwojtyczka Oct 1, 2025
c323c61
updated docstrings
mwojtyczka Oct 2, 2025
694c64a
refactor
mwojtyczka Oct 2, 2025
0ad7e08
docs update
mwojtyczka Oct 2, 2025
66f6c24
docs update
mwojtyczka Oct 2, 2025
18870d7
code review feedback implementation
mwojtyczka Oct 2, 2025
74d6c0d
fixed tests
mwojtyczka Oct 2, 2025
86638e6
Merge branch 'main' into feature/multi-table
mwojtyczka Oct 2, 2025
36a36a9
fixed tests
mwojtyczka Oct 2, 2025
139f132
added integration test
mwojtyczka Oct 2, 2025
b743c89
make tests deterministic
mwojtyczka Oct 3, 2025
f3a8a75
Merge branch 'main' into feature/multi-table
mwojtyczka Oct 3, 2025
8e1a6b8
added instruction for installing dqx cli in windows
mwojtyczka Oct 3, 2025
da5e385
Add pytest-benchmark performance baseline
mwojtyczka Oct 3, 2025
8fd27ec
added comments
mwojtyczka Oct 3, 2025
24f1ee3
added comments
mwojtyczka Oct 3, 2025
6a5265d
updated demo
mwojtyczka Oct 3, 2025
b217ac9
refactor, updated docs
mwojtyczka Oct 3, 2025
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
60 changes: 52 additions & 8 deletions demos/dqx_demo_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# MAGIC
# MAGIC Run in your terminal: `databricks labs install dqx`
# MAGIC
# MAGIC When prompt provide the following:
# MAGIC When prompt provide the following and leave other options as default:
# MAGIC * Input data location: `/databricks-datasets/delta-sharing/samples/nyctaxi_2019`
# MAGIC * Input format: `delta`
# MAGIC * Output table: valid fully qualified table name (catalog.schema.table when using Unity Catalog or schema.table). The output data will be saved there as part of the demo.
Expand All @@ -24,6 +24,8 @@
# MAGIC log_level: INFO
# MAGIC version: 1
# MAGIC serverless_clusters: true # optional
# MAGIC profiler_max_parallelism: 4
# MAGIC quality_checker_max_parallelism: 4
# MAGIC run_configs:
# MAGIC - name: default
# MAGIC checks_location: checks.yml
Expand Down Expand Up @@ -68,10 +70,20 @@
# MAGIC
# MAGIC Run in the terminal:
# MAGIC ```
# MAGIC # run for all configured run configs (default)
# MAGIC databricks labs dqx profile
# MAGIC
# MAGIC # or run for a specific run config
# MAGIC databricks labs dqx profile --run-config "default"
# MAGIC
# MAGIC # You can also run for tables/views matching wildcard patterns. Conventions:
# MAGIC # * Run config is used as a template for all relevant fields except location
# MAGIC # * Input table location is derived from the patterns
# MAGIC # * For table-based checks location, save checks to the delta table, otherwise to install_folder/checks/<input_table>.yml
# MAGIC databricks labs dqx profile --run-config "default" --patterns "main.nytaxi.*;main.default.table"
# MAGIC ```
# MAGIC
# MAGIC This will profile the data defined in the `input_config` field of the config. The generated quality rule candidates and summary statistics are saved in the installation folder as per the `checks_location`, `profiler_config` fields.
# MAGIC This will profile the data defined in the `input_config` field of the run config. The generated quality rule candidates and summary statistics are saved in the installation folder as per the `checks_location`, `profiler_config` fields.

# COMMAND ----------

Expand All @@ -80,35 +92,62 @@
# MAGIC
# MAGIC Run in the terminal:
# MAGIC ```
# MAGIC # run for all configured run configs (default)
# MAGIC databricks labs dqx apply-checks
# MAGIC
# MAGIC # or run for a specific run config
# MAGIC databricks labs dqx apply-checks --run-config "default"
# MAGIC
# MAGIC # You can also run for tables/views matching wildcard patterns. Conventions:
# MAGIC # * Run config is used as a template for all relevant fields except location
# MAGIC # * Input table location is derived from the patterns
# MAGIC # * For table-based checks location, load checks from the delta table, otherwise from install_folder/checks/<input_table>.yml
# MAGIC # * For output and quarantine tables location, use <input_table>_dq_output and <input_table>_dq_quarantine suffixes
# MAGIC databricks labs dqx apply-checks --run-config "default" --patterns "main.nytaxi.*;main.default.table"
# MAGIC ```
# MAGIC
# MAGIC This will apply quality checks defined in the `checks_location` field of the config to the data defined in the `input_config`. The results are written to the output as defined in the `output_config` and `quarantine_config` fields.
# MAGIC This will apply quality checks defined in the `checks_location` field of the run config to the data defined in the `input_config`. The results are written to the output as defined in the `output_config` and `quarantine_config` fields.

# COMMAND ----------

# MAGIC %md
# MAGIC ### Run end-to-end (e2e) workflow
# MAGIC
# MAGIC You can optionally, run both profiler and quality checker in a sequency using the e2e workflow.
# MAGIC You can optionally, run both profiler and quality checker in a sequence using the e2e workflow.
# MAGIC
# MAGIC Run in the terminal:
# MAGIC ```
# MAGIC # run for all configured run configs (default)
# MAGIC databricks labs dqx e2e
# MAGIC
# MAGIC # or run for a specific run config
# MAGIC databricks labs dqx e2e --run-config "default"
# MAGIC
# MAGIC # You can also run for tables/views matching wildcard patterns. Conventions:
# MAGIC # * Run config is used as a template for all relevant fields except location
# MAGIC # * Input table location is derived from the patterns
# MAGIC # * For table-based checks location, save/load checks from the delta table, otherwise from install_folder/checks/<input_table>.yml
# MAGIC # * For output and quarantine tables location, use <input_table>_dq_output and <input_table>_dq_quarantine suffixes
# MAGIC databricks labs dqx e2e --run-config "default" --patterns "main.nytaxi.*;main.default.table"
# MAGIC ```
# MAGIC
# MAGIC This will use the settings from the profiler and quality checker as explained before.

# COMMAND ----------

# MAGIC %md
# MAGIC You can also profile and run quality checking across multiple tables in a single method call (see multi table demo).

# COMMAND ----------

# MAGIC %md
# MAGIC ## Programmatic Approach

# COMMAND ----------

# MAGIC %md
# MAGIC ### Installation of DQX in the Databricks cluster
# MAGIC Once DQX is installed in the workspace, we install it in the DQX library in the cluster.
# MAGIC Once DQX is installed in the workspace as a tool, it must be installed in the cluster.

# COMMAND ----------

Expand Down Expand Up @@ -171,7 +210,7 @@
from databricks.labs.dqx.engine import DQEngine
from databricks.labs.dqx.config import InstallationChecksStorageConfig, WorkspaceFileChecksStorageConfig
from databricks.labs.dqx.config_loader import RunConfigLoader
from databricks.labs.dqx.utils import read_input_data
from databricks.labs.dqx.io import read_input_data
from databricks.sdk import WorkspaceClient


Expand Down Expand Up @@ -285,7 +324,7 @@
# COMMAND ----------

from databricks.labs.dqx.engine import DQEngine
from databricks.labs.dqx.utils import read_input_data
from databricks.labs.dqx.io import read_input_data
from databricks.sdk import WorkspaceClient
from databricks.labs.dqx.config import InstallationChecksStorageConfig, WorkspaceFileChecksStorageConfig
from databricks.labs.dqx.config_loader import RunConfigLoader
Expand Down Expand Up @@ -343,7 +382,7 @@
# COMMAND ----------

# MAGIC %md
# MAGIC ### End-to-end programmatic approach
# MAGIC ### End-to-end programmatic approach
# MAGIC
# MAGIC You can use a single method call to apply checks and save the results.

Expand All @@ -364,6 +403,11 @@

# COMMAND ----------

# MAGIC %md
# MAGIC You can also profile and run quality checking across multiple tables in a single method call (see multi table demo).

# COMMAND ----------

# MAGIC %md
# MAGIC ### View data quality in DQX Dashboard

Expand Down
Loading
Loading