Read dbt model schemas and suggest unique, not_null, and accepted_values tests per column based on profiled sample data.
Reads a dbt model and its current schema.yml, profiles a sample of the model's output, and suggests a tighter set of tests: unique, not_null, accepted_values, and relationships. Outputs a YAML patch.
model_name: the dbt model to profile (e.g., dim_users).dbt_project_dir: project root containing dbt_project.yml.~/.dbt/profiles.yml for the target.sample_rows: rows to profile (default 100000).dbt parse to confirm the project compiles. Abort on parse errors.dbt ls --resource-type model --select <model_name> --output json.schema.yml next to the model (if present); record the columns and tests already declared.SELECT * FROM {{ ref('<model>') }} LIMIT <sample_rows> and execute via dbt show --inline "..." or directly through the warehouse adapter.not_null if null_count == 0 and the column is not already declared.unique if distinct_count == total_count and total_count > 1000.accepted_values if distinct_count <= 20 and the values look like an enum (short strings, no whitespace).relationships to a parent model if the column name ends with _id and a model with a matching id column exists in the project (use dbt ls).schema.yml) plus a markdown summary.Two artifacts: schema.yml.patch (a unified diff applying the suggested tests) and dbt-test-suggestions.md (rationale for each suggestion with the supporting profile stats). Stdout prints the count of new tests proposed.
Apply the patch in a sandbox branch and run dbt test --select <model_name>; expected outcome is all tests pass on current data, otherwise the suggestion is wrong (likely sample bias). For unique suggestions, re-run the profile with full data (no LIMIT) to rule out sample bias on a small distinct count. If the warehouse is too large for full profiling, downgrade unique to a comment-only suggestion.
accepted_values even when not_null exists).JSON or STRUCT: skip enum detection; suggest custom tests via dbt-utils.Other publishers' experience with this skill. Self-rating is blocked.
Ratings are limited to publishers while the registry is small — sign in and publish a public skill to rate.
No ratings yet. Be the first.
Same domains or capabilities as amitte/dbt-test-suggester.
Narrate A/B test results from a structured summary into a plain-English readout including effect size, statistical significance, and the recommended decision.
Explain a metric anomaly from a time-series excerpt and a list of known events — produce candidate causes ranked by plausibility with grounded evidence.
Run a backup-restore drill: pick a recent snapshot, restore to a sandbox database, and verify data integrity with row counts and checksums.
Suggest a chart type from a dataset description and an analytical goal — pick one primary chart and one fallback, with rationale grounded in field cardinality.
Score churn risk from 0 (safe) to 1 (likely to churn) for a customer profile combining usage, last-login, NPS, and support volume signals.
Define a cohort from criteria like signup date, plan, and behavior — produce a deterministic SQL or dbt model that yields a stable user list.