correlation_inference
sqllocks_spindle.schema.inference.correlation_inference
¶
Detect cross-column correlations and upgrade strategies to formula/correlated/computed.
Scans columns within each table for known pairs and triples (cost+price, tax+subtotal, quantity*unit_price=total, etc.) and replaces basic generation strategies with correlated, formula, or computed strategies so the generated data is internally consistent.
Classes¶
CorrelationInferrer
¶
Detect cross-column correlations and upgrade generation strategies.
Runs after column classification so that semantic labels are available. Only modifies columns that still carry basic (non-correlated) strategies, preserving any earlier inference work (e.g. TemporalPatternInferrer).