Skip to content

Dependencies

Weaver normally discovers dependencies from authored imports and relation references. These relationships connect the documents that produce data to the documents that read it, so you do not maintain a separate graph by hand.

You can declare Dependencies on a document when you need deliberate control. Your declaration replaces inference; it does not add to the relationships Weaver discovered. An explicit empty list therefore means that the document has no managed dependencies.

Spark SQL data documents are the exception to inference-first authoring: you still declare Dependencies explicitly, including an empty declaration when the document depends on no managed object. Weaver can extract relation references from Spark SQL, but the current document contract still requires the explicit field.

Document dependencies

A document dependency says that one Weaver document reads another. Weaver can infer these relationships from supported Python imports and SQL relation references without executing the authored code.

Within a logical item, dependencies establish the document graph. Build uses that graph to install producers before consumers and to find downstream documents affected by a changed declaration. Load uses the installed form of the graph to order selected data-producing work.

Design background: Load dependencies treats every dependency as coupling: reuse and consistent logic come with paths for upstream change and failure to propagate. Weaver records dependencies to order Build and Load work, but you still decide whether a dependency is valuable and appropriately scoped.

Physical relation names can point outside the managed project estate. Weaver preserves such references; Build-time project inference uses logical relationships to identify managed producers.

Item dependencies

When a relationship crosses logical items, it also creates an item dependency. Item dependencies determine a valid order for a multi-item Build and for item-wide Load work when both items are selected.

Items may read one another. Cyclic data dependencies use a deterministic order: Load runs each selected member once per invocation, not repeatedly to convergence. A dependency that closes a cycle can read results from an earlier run. Health suppresses relative load-time comparisons within the cycle but still carries failed, Pending and overdue states. See Cycles.

Weaver still needs a physical mutation action plan free of circular waits; tolerating data cycles does not make an impossible installation sequence executable.

Document and item graphs answer different questions. The document graph identifies the affected and ordered work. The item graph ensures that physical item boundaries are crossed in a valid order.

Logical Shortcuts carry managed relationships across items

A logical Shortcut gives a consumer a local logical name for data owned by another item. Dependencies that resolve through it still point to the source document, while the Shortcut remains an installation step between source and consumer:

source document → logical Shortcut → consuming document

That extra step lets Build materialise the Shortcut after its source and before consumers. It also lets Load preserve the managed producer-consumer order across physical engines when both sides are in scope.

Physical addresses do not establish Build-time dependencies between separate projects. For Health, Load and Test, Weaver can connect physical Shortcuts to managed sources recorded in the catalogues you supply. See Work across teams’ catalogues.

Semantic model dependencies

A model’s managed source declarations connect its Tables to Lakehouse or Warehouse data. The graph reaches from source loads to the model refresh, so you do not need a separate schedule that guesses when the source has finished.

You declare the logical source Table with Weaver.Source. Build installs that lineage; estate-wide Load places selected source work before the model refresh. DAX validations can compare the result with source SQL, and Health uses the same edges to detect stale models or validations. See Connect a semantic model to source data.

A linked Report depends on its resolved model for deployment. It has no independent data Load. An external source without a managed declaration is outside the installed dependency graph.

Dependencies do not widen selection

Dependencies order and affect work inside the requested boundary; they do not silently add another logical item to an operation.

For Build, selecting an item can rebuild changed documents and affected descendants in that item, while dependent documents in an unselected item remain unchanged. Select every item whose installed state you want to change.

For an item-wide Load, Weaver orders the selected loadable documents using the installed graph. An upstream object in an unselected item is not added to the run. Plain named Load is an operator override without expansion or dependency ordering. --ancestors and --descendants deliberately expand original seeds, independently, within requested items and order that selected graph. Their union does not recursively add the siblings of newly reached descendants. See Run part of an estate.

Test uses dependencies to understand what each validation reads and whether a previous result is stale. Dependencies do not turn data producers into additional Test work.

See Shared selection and identity for exact inference forms, declaration syntax and operation-specific selection rules. How Weaver works explains where each graph enters the lifecycle.