Doctor#
The doctor command analyzes a config file and provides opinionated warnings about potential issues. Unlike validate, which catches hard errors that would prevent execution, doctor warns about things that are technically valid but likely problematic.
edg doctor --config config.edgChecks#
Unreferenced reference datasets#
Warns when a reference: block entry is never referenced by any ref_*() call. The data is loaded into memory but never used.
Unnamed query-type seeds#
Warns when a seed query uses type: query (or query_batch) but has no name. Query-type seeds store their results for later reference, but without a name the results are inaccessible.
Batch sizes that may OOM#
Warns when:
countis set withoutsizeand count exceeds 1,000 - the entire count becomes a single batch, building all rows in memory at oncesizeexceeds 10,000 - very large individual batches that may consume excessive memory
FK cardinality mismatches#
Warns when a seed query uses ref_diff() and its count exceeds the parent dataset size. ref_diff picks unique rows without replacement, so it will exhaust the parent dataset before the child count is reached.
Distribution parameter issues#
Warns about distribution function parameters that may produce unexpected results:
zipf.int(s, ...)wheresis close to 1.0 - produces a nearly uniform distribution, defeating the purpose of using Zipfiannorm(mean, stddev, min, max)wherestddevexceedsmax - min- values cluster at the edges due to clamping rather than forming a bell curve
Output#
Each warning is printed to stdout:
- seed query 3 ("populate_orders"): count (10000) set without size - entire count used as single batch, may OOM
- reference "regions": dataset never referenced by any ref_*() callIf no issues are found:
No issues found.The command always exits with code 0 - warnings are advisory, not errors.
Ignoring warnings#
Use # edg:ignore comments to suppress diagnostics in the editor.
Line-level ignore#
Place # edg:ignore on the line above to suppress all diagnostics on the next line:
# edg:ignore
populate_big(count: 200000)
`INSERT INTO big (id) VALUES ($1)` (uuid_v4())Or inline on the same line:
populate_big(count: 200000) # edg:ignore
`INSERT INTO big (id) VALUES ($1)` (uuid_v4())File-level ignore#
Place # edg:ignore-file anywhere in the file to suppress all doctor warnings. Parse and validation errors are still shown.
# edg:ignore-file
ref unused_regions [
{name: 'us-east-1'}
]Flags#
Global flags --config, --csv-file, and --csv-directory apply. No database connection is required.