Running Python in Fabric¶
Publish the Python packages once, then keep editing and building your project. The Fabric Environment supplies Weaver to hosted Spark work; it is separate from the Lakehouse and catalogue bindings in your workspace configuration.
The first Python task creates Environment/Weaver.Environment and publishes it before Build. Use this page when setting up that runtime or changing its packages. The incremental extension uses this same published Environment and Landing binding.
Bind the runtime you will use¶
A complete configuration for the Landing journey is:
workspace: Parcel Development
environment: Weaver
catalogue: Warehouse/Catalogue
targets:
Lakehouse/Landing: Landing
Use your actual workspace and the bindings written by Initialise. environment selects the Fabric Environment to attach; it does not create or publish it. For development/production mappings of the whole project, use Workspace and environment mappings.
Local Check needs no Fabric runtime. Desktop Lakehouse Build, Load and Test use hosted Spark, including when their source is Spark SQL. Build checks the hosted runtime before mutation; not calling authored read() does not remove that prerequisite. Load imports your installed Table and Folder code; Test imports or executes installed validations.
Publish the matching packages¶
Use the same Weaver release locally and in Fabric. From the Landing project root:
weaver fabric environment publish \
--path Environment/Weaver.Environment \
--workspace-config workspace-config.yml
Publication creates or updates the selected Environment, adds the installed Weaver release to its package requirements and waits for Fabric to finish publishing, which typically takes five to seven minutes. An unchanged definition that is already published is reported without publishing again.
If an Environment was created in the Fabric portal and has no local definition, publication can instead use that existing Environment as its authority:
Run that command from the same project root so the workspace is discovered from its configuration. Fabric Environment definition owns local-directory shape, libraries and existing-Environment authority. A Notebook already in Fabric needs the matching package in its attached runtime, not another remote Spark session.
Keep the runtime and project changes separate¶
Republish after changing Environment libraries or the Weaver package mode/version. Editing a Python Table, Folder, Test or Assumption does not itself require republication: Check and Build install project changes. Adding a Spark SQL transformation follows the same project loop.
Build checks matching Weaver version, supported plan format, writer version and required executor capabilities before mutation.
Return to the first pipeline, or use the development cycle for repeated edits. Session and runtime behaviour and Environment CLI own the exact runtime and publication interfaces.