Skip to content
Merged
Show file tree
Hide file tree
Changes from 98 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
2ff3d18
Run demo notebooks in automated tests
ghanse Jul 14, 2025
fb73a5f
Merge branch 'main' into test_demos
mwojtyczka Jul 14, 2025
634c58a
Refactor
ghanse Jul 14, 2025
ba612cd
added e2e tests to github actions
mwojtyczka Jul 15, 2025
b2328d8
test
mwojtyczka Jul 15, 2025
96de2d5
test
mwojtyczka Jul 15, 2025
ec92f91
Refactor demo tests
ghanse Jul 15, 2025
d8448e7
test
mwojtyczka Jul 15, 2025
471b613
updated acceptance tests
mwojtyczka Jul 15, 2025
a548a82
updated acceptance action version
mwojtyczka Jul 15, 2025
87de2f6
refactor
mwojtyczka Jul 15, 2025
75d49ae
Send path as string
ghanse Jul 15, 2025
d377992
Refactor
ghanse Jul 15, 2025
44bf5ef
Fix import format
ghanse Jul 15, 2025
083f3ff
Clarify error messages
ghanse Jul 15, 2025
b642196
Fix task key characters
ghanse Jul 15, 2025
e306c10
Sample test a few notebooks
ghanse Jul 15, 2025
cd4998b
Refactor
ghanse Jul 15, 2025
701aa9a
Parameterize schemas and catalogs
ghanse Jul 15, 2025
2554020
Refactor
ghanse Jul 15, 2025
68ffa9b
Format
ghanse Jul 15, 2025
9607bb3
Fix test
ghanse Jul 15, 2025
634bc22
Use make_catalog
ghanse Jul 16, 2025
a7bb0cd
Update demos and tests
ghanse Jul 16, 2025
967fde4
Fix tests
ghanse Jul 16, 2025
278c90b
Fix tests
ghanse Jul 16, 2025
2b25173
Fix tests
ghanse Jul 16, 2025
ce0282e
Merge branch 'main' into test_demos
mwojtyczka Jul 17, 2025
9ca4a38
Merge branch 'main' into test_demos
mwojtyczka Jul 18, 2025
6762e36
Merge branch 'main' into test_demos
mwojtyczka Jul 22, 2025
e4c4f07
Merge branch 'main' into test_demos
mwojtyczka Jul 22, 2025
1bd3034
Merge branch 'refs/heads/main' into test_demos
ghanse Jul 25, 2025
205370a
Fix tests
ghanse Jul 25, 2025
a476d24
Merge remote-tracking branch 'origin/test_demos' into test_demos
ghanse Jul 25, 2025
f43ec33
Fix demos & tests
ghanse Jul 25, 2025
5a65502
Add test for DLT pipeline demo
ghanse Jul 25, 2025
73fd104
Fix DLT pipeline test
ghanse Jul 25, 2025
dd5e5a1
Fix DLT pipeline test
ghanse Jul 25, 2025
b3041bf
Merge branch 'main' into test_demos
ghanse Jul 25, 2025
d340dd5
Add test for dqx_demo_tool
ghanse Jul 25, 2025
ef0ed8d
Handle whl folder as parameter
ghanse Jul 26, 2025
2eb6510
Fix installation test
ghanse Jul 26, 2025
f184f04
Fix demo tests
ghanse Jul 26, 2025
75de17f
Fix test
ghanse Jul 26, 2025
67b6737
Test commit
ghanse Jul 26, 2025
e1139fd
Fix tool demo path parameter
ghanse Jul 26, 2025
8fc496f
Add product info
ghanse Jul 26, 2025
3a190ff
Add product info
ghanse Jul 26, 2025
0c281b8
Add product info
ghanse Jul 26, 2025
eac0b40
Add product info
ghanse Jul 26, 2025
f4ab58d
Add product info
ghanse Jul 26, 2025
220d9ff
Add product info
ghanse Jul 26, 2025
396f44d
Update prompts extension
ghanse Jul 27, 2025
ebae8dc
Fix demo to run without catalog and schema creation
ghanse Jul 27, 2025
4094d40
Update dashboard link
ghanse Jul 27, 2025
87b46db
Update PR template
ghanse Jul 27, 2025
23b6f52
Merge branch 'main' into test_demos
ghanse Jul 28, 2025
d12b7b1
Run demos from the open branch
ghanse Jul 28, 2025
639eb10
Fix tests
ghanse Jul 28, 2025
1cd8b25
Fix tests
ghanse Jul 28, 2025
56e39c9
Fix tests
ghanse Jul 28, 2025
22269ae
Fix tests
ghanse Jul 28, 2025
778543d
Fix tests
ghanse Jul 28, 2025
9d659c7
Fix PII detection demo
ghanse Jul 28, 2025
ca6f386
Fix PII detection demo
ghanse Jul 28, 2025
74305be
Fix PII detection demo
ghanse Jul 28, 2025
f95423f
Fix PII detection demo
ghanse Jul 28, 2025
3e9c771
Use waiter for pipeline updates
ghanse Jul 29, 2025
551c627
Fix DLT demo execution
ghanse Jul 29, 2025
55024ca
Run DLT demo from current PR branch
ghanse Jul 29, 2025
1d01f91
Merge branch 'main' into test_demos
mwojtyczka Jul 29, 2025
dadd36a
Dynamic retrieval of Git URL and branch
ghanse Jul 29, 2025
323eba5
Fix Git URL for nightly and acceptance tests
ghanse Jul 29, 2025
e131fa5
Fmt
ghanse Jul 29, 2025
95ad291
Merge branch 'main' into test_demos
mwojtyczka Jul 30, 2025
5699dd3
Comment for acceptance actions env var
ghanse Jul 30, 2025
16e64cb
Add test for asset bundle demo
ghanse Aug 20, 2025
fd229c0
Merge remote-tracking branch 'refs/remotes/origin/main' into test_demos
ghanse Aug 20, 2025
5fc8bd0
Remove os import
ghanse Aug 20, 2025
106f99e
Update nightly actions
ghanse Aug 20, 2025
5d6831e
Fix actions
ghanse Aug 20, 2025
07e9683
Fix nightly actions
ghanse Aug 20, 2025
7de7979
Login
ghanse Aug 20, 2025
4900c52
Raise stderr output on failure
ghanse Aug 20, 2025
dc62010
Add host
ghanse Aug 20, 2025
4b69ac8
Remove auth
ghanse Aug 20, 2025
96e4f3f
Run from the correct directory
ghanse Aug 20, 2025
0ccb4ee
Update DAB path
ghanse Aug 20, 2025
cee08d8
Refactor
ghanse Aug 20, 2025
4d18c7b
Refactor
ghanse Aug 20, 2025
4fa50d1
Run DABs test with branch library version
ghanse Aug 20, 2025
d9094ee
Update bundle config
ghanse Aug 20, 2025
5b530bf
Fix DABs deployment
ghanse Aug 20, 2025
7dbe8d1
Parameterize the demo catalog and schema
ghanse Aug 20, 2025
f9be6e8
Remove create catalog and schema statements
ghanse Aug 20, 2025
96158e9
Update sample data
ghanse Aug 20, 2025
1670855
Auto-approve commands
ghanse Aug 20, 2025
0f10413
Don't destroy bundle in tests
ghanse Aug 20, 2025
7e22e40
Add target environments for each cloud provider
ghanse Aug 21, 2025
d09fc40
Refactor test
ghanse Aug 21, 2025
5a6467e
Fix test
ghanse Aug 21, 2025
bf369ba
Use a default target
ghanse Aug 21, 2025
88092e8
Fmt
ghanse Aug 21, 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
36 changes: 36 additions & 0 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,24 @@ jobs:
- name: Install hatch
run: pip install hatch==1.9.4

- name: Install Databricks CLI
run: |
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
databricks --version

- name: Azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ secrets.ARM_CLIENT_ID }}
tenant-id: ${{ secrets.ARM_TENANT_ID }}
allow-no-subscriptions: true

- name: Set env vars for Azure CLI auth
run: |
val=$(az keyvault secret show --id "${{ secrets.VAULT_URI }}/secrets/DATABRICKS-HOST" --query value -o tsv)
echo "DATABRICKS_HOST=$val" >> $GITHUB_ENV
echo "DATABRICKS_AUTH_TYPE=azure-cli" >> $GITHUB_ENV

- name: Run e2e tests
uses: databrickslabs/sandbox/acceptance@acceptance/v0.4.4
with:
Expand Down Expand Up @@ -161,6 +179,24 @@ jobs:
- name: Install hatch
run: pip install hatch==1.9.4

- name: Install Databricks CLI
run: |
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
databricks --version

- name: Azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ secrets.ARM_CLIENT_ID }}
tenant-id: ${{ secrets.ARM_TENANT_ID }}
allow-no-subscriptions: true

- name: Set env vars for Azure CLI auth
run: |
val=$(az keyvault secret show --id "${{ secrets.VAULT_URI }}/secrets/DATABRICKS-HOST" --query value -o tsv)
echo "DATABRICKS_HOST=$val" >> $GITHUB_ENV
echo "DATABRICKS_AUTH_TYPE=azure-cli" >> $GITHUB_ENV

- name: Run e2e tests on serverless cluster
uses: databrickslabs/sandbox/acceptance@acceptance/v0.4.4
with:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,24 @@ jobs:
- name: Install hatch
run: pip install hatch==1.9.4

- name: Install Databricks CLI
run: |
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
databricks --version

- name: Azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ secrets.ARM_CLIENT_ID }}
tenant-id: ${{ secrets.ARM_TENANT_ID }}
allow-no-subscriptions: true

- name: Set env vars for Azure CLI auth
run: |
val=$(az keyvault secret show --id "${{ secrets.VAULT_URI }}/secrets/DATABRICKS-HOST" --query value -o tsv)
echo "DATABRICKS_HOST=$val" >> $GITHUB_ENV
echo "DATABRICKS_AUTH_TYPE=azure-cli" >> $GITHUB_ENV

- name: Run e2e tests
uses: databrickslabs/sandbox/acceptance@acceptance/v0.4.4
with:
Expand Down Expand Up @@ -150,6 +168,24 @@ jobs:
- name: Install hatch
run: pip install hatch==1.9.4

- name: Install Databricks CLI
run: |
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
databricks --version

- name: Azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ secrets.ARM_CLIENT_ID }}
tenant-id: ${{ secrets.ARM_TENANT_ID }}
allow-no-subscriptions: true

- name: Set env vars for Azure CLI auth
run: |
val=$(az keyvault secret show --id "${{ secrets.VAULT_URI }}/secrets/DATABRICKS-HOST" --query value -o tsv)
echo "DATABRICKS_HOST=$val" >> $GITHUB_ENV
echo "DATABRICKS_AUTH_TYPE=azure-cli" >> $GITHUB_ENV

- name: Run e2e tests on serverless cluster
uses: databrickslabs/sandbox/acceptance@acceptance/v0.4.4
with:
Expand Down
24 changes: 16 additions & 8 deletions demos/dqx_demo_asset_bundle/databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ variables: # Sets the default value of several notebook parameters
sensor_rules_file:
description: Name of the DQX rules file for the sensor dataset
default: sensor_data_quality_rules.yml
library_ref:
description: PyPi package name for installing DQX
default: databricks-labs-dqx

resources:
jobs:
dqx_demo_job:
name: "[${workspace.current_user.userName}] DQX Demo Job"
tasks:
- task_key: dqx_demo_notebook
job_cluster_key: dqx_demo_cluster
libraries:
- pypi:
package: "${var.library_ref}"
notebook_task:
notebook_path: ./dqx_demo_notebook.py
base_parameters: # Parameters are passed to the notebook; Default values are set in the `variables` section
Expand All @@ -29,12 +36,13 @@ resources:
maintenance_rules_file: "${var.maintenance_rules_file}"
sensor_rules_file: "${var.sensor_rules_file}"
source: WORKSPACE
environment_key: Default
job_clusters:
- job_cluster_key: dqx_demo_cluster
Comment thread
mwojtyczka marked this conversation as resolved.
new_cluster:
num_workers: 1
node_type_id: Standard_DS3_v2
spark_version: 15.4.x-scala2.12
data_security_mode: SINGLE_USER

queue:
enabled: true
environments:
- environment_key: Default
spec:
client: "2"
dependencies:
- databricks-labs-dqx
enabled: true
13 changes: 4 additions & 9 deletions demos/dqx_demo_asset_bundle/dqx_demo_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
print(f"Selected Catalog for Demo Dataset: {database}")
print(f"Selected Schema for Demo Dataset: {schema}")

spark.sql(f"CREATE CATALOG IF NOT EXISTS {database}")
spark.sql(f"USE CATALOG {database}")
spark.sql(f"CREATE SCHEMA IF NOT EXISTS {schema}")
spark.sql(f"USE SCHEMA {schema}")

sensor_table = f"{database}.{schema}.sensor_data"
maintenance_table = f"{database}.{schema}.maintenance_data"

Expand Down Expand Up @@ -228,7 +223,7 @@
"SEN-001",
"MCH-001",
"temperature",
735,
735.0,
datetime.strptime("2025-04-29 14:32:00", "%Y-%m-%d %H:%M:%S"),
datetime.strptime("2025-04-01", "%Y-%m-%d").date(),
80,
Expand Down Expand Up @@ -282,7 +277,7 @@
"SEN-002",
"MCH-001",
"temperature",
735,
735.0,
datetime.strptime("2026-04-29 14:32:00", "%Y-%m-%d %H:%M:%S"),
datetime.strptime("2025-04-01", "%Y-%m-%d").date(),
80,
Expand Down Expand Up @@ -337,7 +332,7 @@
"SEN004",
"MCH-001",
"temperature",
724,
724.0,
datetime.strptime("2025-04-28 14:32:00", "%Y-%m-%d %H:%M:%S"),
datetime.strptime("2025-04-30", "%Y-%m-%d").date(),
85,
Expand All @@ -351,7 +346,7 @@
"SEN004",
"MCH-001",
"temperature",
724,
724.0,
datetime.strptime("2025-04-28 14:32:00", "%Y-%m-%d %H:%M:%S"),
datetime.strptime("2025-04-30", "%Y-%m-%d").date(),
85,
Expand Down
29 changes: 29 additions & 0 deletions tests/e2e/test_run_demos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import logging
import shutil
import subprocess

from datetime import timedelta
from pathlib import Path
Expand Down Expand Up @@ -229,6 +231,33 @@ def test_run_dqx_streaming_demo_diy(make_notebook, make_job, tmp_path, library_r
logging.info(f"Job run {run.run_id} completed successfully for dqx_streaming_demo")


def test_run_dqx_demo_asset_bundle(make_schema, library_ref):
cli_path = shutil.which("databricks")
Comment thread
mwojtyczka marked this conversation as resolved.
path = Path(__file__).parent.parent.parent / "demos" / "dqx_demo_asset_bundle"
catalog = "main"
schema = make_schema(catalog_name=catalog).name

try:
subprocess.run([cli_path, "bundle", "validate"], check=True, capture_output=True, cwd=path)
subprocess.run(
[
cli_path,
"bundle",
"deploy",
f'--var="library_ref={library_ref}"',
f'--var="demo_catalog={catalog}"',
f'--var="demo_schema={schema}"',
"--auto-approve",
],
check=True,
capture_output=True,
cwd=path,
)
subprocess.run([cli_path, "bundle", "run", "dqx_demo_job"], check=True, capture_output=True, cwd=path)
except subprocess.CalledProcessError as ex:
raise AssertionError(ex.stderr) from ex


def validate_run_status(run: Run, client: WorkspaceClient) -> None:
"""
Validates that a job task run completed successfully.
Expand Down