Shortcut¶
A Shortcut gives an item-local name to data in another logical or physical Fabric item. Lakehouses materialise OneLake shortcuts; Warehouses materialise T-SQL Views.
Supported declaration files¶
| Owner | File | Supported destination kinds |
|---|---|---|
| Lakehouse | Lakehouse/<Item>/shortcuts.py |
table, folder, schema |
| Warehouse | Warehouse/<Item>/shortcuts.yml |
view |
There is at most one recognised shortcut file at the item root. It has no Weaver metadata block and no free-form executable body.
Lakehouse shortcuts.py¶
Each declaration is a single assignment:
Arguments may be positional in that order or named. shortcut_type, target_type and target are required literal strings and have no defaults; workspace defaults to None. A workspace value is one non-empty name with no surrounding whitespace, forward slash, backslash, dot or colon. Imports and standalone string comments are allowed beside declarations. Other statements, expressions, unpacked arguments and computed values are rejected because Weaver parses this file without executing it.
shortcut_type |
Assignment name | target_type |
Target form |
|---|---|---|---|
table |
Schema__Object |
logical |
Full project identity: Lakehouse/<Item>/Tables/Schema.Object or Warehouse/<Item>/Schema.Object. |
table |
Schema__Object |
physical |
<ItemType>/<FabricItem>/[Tables/]Schema.Object; workspace may name another workspace. |
folder |
Schema__Object |
logical |
Full project Folder identity: Lakehouse/<Item>/Files/Schema.Object. |
folder |
Schema__Object |
physical |
Lakehouse/<FabricItem>/Files/<relative/path>; workspace may name another workspace. |
schema |
Bare destination schema | physical only |
<ItemType>/<FabricItem>/<source-schema>; workspace may name another workspace. |
A physical table or schema source may be a Lakehouse or Warehouse. A folder source must be a Lakehouse because Warehouses have no Files area. A physical target without workspace uses the configured workspace.
workspace is incompatible with every logical target. A schema Shortcut is incompatible with logical, and view is incompatible with a Lakehouse owner.
from weaver import Shortcut
Parcel__Current = Shortcut(
shortcut_type="table",
target_type="logical",
target="Lakehouse/Landing/Tables/Parcel.Current",
)
Parcel__Incoming = Shortcut(
shortcut_type="folder",
target_type="physical",
target="Lakehouse/External/Files/parcel/incoming",
workspace="Logistics Shared",
)
Reference = Shortcut(
shortcut_type="schema",
target_type="physical",
target="Warehouse/Reference/Reference",
workspace="Logistics Shared",
)
Path: Lakehouse/Curated/shortcuts.py.
The deployed runtime shortcuts module is generated by Weaver; authored Python imports an individual destination with from shortcuts import Parcel__Current. Importing a logical shortcut creates a dependency on its logical source. Importing a physical shortcut records an external boundary with no project producer.
Warehouse shortcuts.yml¶
The optional top-level keys are exactly logical and physical. Each section maps a full destination identity owned by this Warehouse to a target string. Both destination and target must be YAML strings. Every destination is a View; there is no kind field or workspace field.
logical:
"Warehouse/Reporting/Parcel.Current": "Lakehouse/Curated/Tables/Parcel.Current"
physical:
"Warehouse/Reporting/Reference.Depot": "Warehouse/Reference/Reference.Depot"
Path: Warehouse/Reporting/shortcuts.yml.
Logical targets are full project document identities and must resolve exactly. Physical View targets use <ItemType>/<FabricItem>/[Tables/]Schema.Object in the configured workspace. Warehouse View shortcuts do not accept a workspace override; shortcuts.yml has no field for one.
Identity, compatibility and dependencies¶
A Table, Folder or View destination is Schema.Object; a schema destination is the bare schema name. Destinations must not duplicate or case-collide with another Shortcut or authored object. Nothing may be declared inside a schema-shortcut namespace. A logical target:
- must resolve, with exact case, to a managed object or Shortcut destination in the same project;
- cannot point into its declaring item;
- adds
source → destinationto the document graph and a cross-item edge to the item graph; - must preserve the Tables/Files namespace for a Lakehouse destination.
Item graphs remain acyclic. Physical targets add no project dependency edge. Metadata references and foreign keys do not turn into Shortcut dependencies.
Operations and managed state¶
- Check parses declarations, identities, target forms, collisions, logical resolution and cycles without contacting Fabric.
- Build selects and materialises changed Shortcuts. A Lakehouse destination becomes a OneLake Table, Folder or schema shortcut; a Warehouse destination becomes
CREATE OR ALTER VIEW ... AS SELECT * FROM <physical source>. Removed managed destinations are pruned. Unsupported or unresolved physical work fails or is reported during planning/installation rather than becoming a different form. - Load and Test do not create Shortcuts. Installed loads and validations may read them through their local destinations.
_.Shortcut records item scope, shortcut ID, destination schema/object, shortcut and target types, target item/schema/object, optional target workspace and signature. _.Registry certifies the installed destination with role Shortcut and its physical type (Table, Folder, Schema or View). Logical consumers also have _.Dependency rows for their resolved source edges.