/dqx:dqx-profile-and-generatefrom dqx
Profiles DataFrames or Unity Catalog tables and generates DQX data quality rule candidates with summary statistics. Covers DQProfiler, DQGenerator, DQDltGenerator, sampling/filter options, and AI-assisted variants.
Ships in dqx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Typical one-shot bootstrap for a new table:
from databricks.labs.dqx.profiler.profiler import DQProfiler
from databricks.labs.dqx.profiler.generator import DQGenerator
from databricks.sdk import WorkspaceClient
ws = WorkspaceClient()
profiler = DQProfiler(ws)
generator = DQGenerator(ws)
df = spark.read.table("catalog.schema.input")
# Step 1 — profile. Returns summary stats + DQProfile candidates per column.
# Three entry points, pick by what you have on hand:
# - profiler.profile(df, ...) — in-memory DataFrame
# - profiler.profile_table(input_config=..., ...) — single Unity Catalog table by InputConfig
# - profiler.profile_tables_for_patterns( — many tables; returns
# patterns=["catalog.schema.*"], ...) dict[table_fqn -> (stats, profiles)]
summary_stats, profiles = profiler.profile(df)
# Step 2 — turn candidates into DQX checks (declarative list[dict]).
checks = generator.generate_dq_rules(profiles) # default criticality="error"
# Step 3 — inspect / edit, then persist. See dqx-storage for save targets.
for c in checks:
print(c)
Profiling is a one-time bootstrap action per dataset. The candidate checks need human review before apply — don't auto-apply the raw output to production data.
DQProfiler.profile(df, columns=None, options=None) — columns is a top-level kwarg limiting the profiled columns; the following optional keys are set via the options dict:
sample_fraction — float 0–1 (e.g. 0.1 for 10% sample). Use on large tables.sample_seed — int; pair with sample_fraction for reproducible runs.limit — absolute row cap (e.g. 1_000_000).filter — SQL string applied before profiling ("event_date >= '2026-01-01'").criticality — default for every generated rule ("error" or "warn", default "error").summary_stats, profiles = profiler.profile(
df,
columns=["order_id", "total_amount", "country_code"],
options={"sample_fraction": 0.1, "sample_seed": 42, "criticality": "warn"},
)
from databricks.labs.dqx.profiler.dlt_generator import DQDltGenerator
dlt_expectations = DQDltGenerator(ws).generate_dlt_rules(profiles, language="python")
# language can be "python" or "sql"
DQX can generate rules from natural-language requirements via DSPy-backed LLMs — see the companion skills / docs rather than hand-rolling prompts:
databricks labs dqx install # once per workspace
databricks labs dqx profile # all run configs
databricks labs dqx profile --run-config default # one run config
databricks labs dqx profile --run-config default \
--patterns "main.product001.*;main.product002" \
--exclude-patterns "*_output;*_quarantine"
The workflow writes the generated candidates + summary stats to the checks_location on the run config (see dqx-storage).
criticality / bounds before rolling to production._dq_output / _dq_quarantine suffixes; keep the convention.limit or sample_fraction against the current backfill.Canonical docs: https://databrickslabs.github.io/dqx/docs/guide/data_profiling.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub databrickslabs/dqx --plugin dqx5 skills in this plugin
/dqx-apply-checksValidate a PySpark DataFrame or Delta table against a set of DQX quality rules using DQEngine. Use when the user asks to "run data quality checks", "apply DQX rules to a DataFrame/table", "split valid and invalid rows", "quarantine bad records", or "integrate DQX into a streaming pipeline". Covers apply_checks, apply_checks_and_split, the by_metadata variants, and the shape of the result columns.
/dqx-define-checksCreate DQX quality rules (checks) for a PySpark DataFrame or Delta table. Use when the user asks to "add a DQX check", "define a data quality rule", "validate that column X is not null / unique / in a set", or wants checks expressed in YAML/JSON for storage. Covers DQRowRule, DQDatasetRule, DQForEachColRule, built-in check_funcs, filters, user_metadata, custom SQL/Python checks, and the declarative metadata form.
/dqx-end-to-endRun DQX validation end-to-end — read an input table or path, apply checks, and write valid and quarantined rows to output locations — in a single call. Use when the user asks for "apply and save", "quality-check a table and split the output", "DQX on a whole table", "save valid and invalid rows", or wants to drop DQX into a Lakeflow / workflow that runs on a table or path. Covers apply_checks_and_save_in_table, the by_metadata variant, InputConfig / OutputConfig, and incremental streaming mode.
/dqx-storageLoad and save DQX checks (quality rules) to a file, workspace path, Unity Catalog volume, Delta table, Lakebase, or the DQX installation folder. Use when the user asks to "load DQX checks from YAML", "save checks to a Delta table", "read checks from a volume", "share checks across notebooks", or "use the DQX workspace install's default checks location". Covers every *ChecksStorageConfig and the matching load/save calls.
Other plugins' skills for the same job