Skip to content

Connect a managed Fabric source

Extend the existing Parcel project from Power BI-only operation into a Catalogue-managed Fabric estate. Add a Warehouse, then use Weaver.Source to connect its data to a model. The walkthrough below creates a separate model; you can also connect the existing native model and keep its linked Report.

Before you start

Continue the native Parcel project in the same workspace, retaining its configuration and overlays. That starting path has no Catalogue; adding the Warehouse below introduces one. The workspace now needs Fabric capacity that supports Warehouse work, Warehouse create/alter/load and SELECT rights, Catalogue access, and model deployment, refresh and query permissions. Source-backed Import refresh also needs an existing supported service connection with SQL access. Weaver can bind a matching connection; adding a Catalogue does not create credentials or administer gateways.

1. Configure destination and source separately

From the directory containing parcel, extend the project:

weaver initialise \
  --workspace "Parcel Development" \
  --project-folder ./parcel \
  --warehouse Operations \
  --example Parcel
cd parcel
from pathlib import Path

import weaver

project = Path("builtin") / "project"
initialise_result = weaver.initialise(
    project_folder=project,
    workspace='Parcel Development',
    catalogue='Warehouse/Catalogue',
    warehouse='Operations',
    example='Parcel',
)
initialise_result.report()

If your shell is already in the project, use --project-folder . and stay there. A Power BI-only project has no Environment yet, so Initialise asks for one: choose an existing Environment or let it create Weaver. Press Enter to skip the optional Lakehouse, then confirm. If Operations is already in the project, this is a rerun that changes nothing.

Initialise adds the Operations Warehouse with its independent Table and View, their validations, and a separate ParcelWarehouse model. It introduces the required Catalogue and Environment support for the data project. It retains Parcel.SemanticModel, the Report and previously authored files, including any same-name Parcel overlay. New target bindings are added to workspace-config.yml without changing existing physical bindings. This extends the same installation; it does not replace the inline Delivery partition or change the original model’s meaning.

Open PowerBI/Parcel/ParcelWarehouse.tmdl:

model Model
    culture: en-US
    defaultMode: import
    annotation 'Weaver.BaseSemanticModels' = Parcel

table CurrentStatus
    annotation 'Weaver.Source' = Warehouse/Operations/Parcel.CurrentStatus

The additional model composes the native Parcel foundation, so existing modelling policy still has its original Delivery/Depot tables to refine. Weaver.Source asks Build to generate this model’s CurrentStatus table from the managed Warehouse View. Its Import partition and columns are generated from the resolved source metadata. This is an additional model: it does not substitute a Warehouse partition into the native Delivery table. Author from TMDL explains source generation in detail.

The project’s targets choose physical items. Optional data_sources mappings can independently choose which supported physical source a logical expression reads; see workspace mappings. Neither setting grants SQL access or creates a service connection.

2. Build and load the Warehouse first

weaver check
weaver build --item Warehouse/Operations
weaver load Warehouse/Operations

In a SQL query connected to Operations, inspect the source:

SELECT [Parcel ID], [Status], [Depot]
FROM Parcel.CurrentStatus
ORDER BY [Parcel ID];

Expect P-1001 / In transit / Central and P-1002 / Delivered / South. The Warehouse’s StatusEvent Table and CurrentStatus View remain the same independent pipeline introduced in the Warehouse journey.

3. Create the connection

An Import model over a Fabric Warehouse refreshes through an explicit cloud connection with credentials. Weaver binds an existing one; it does not create credentials. In Fabric, open Settings → Manage connections and gateways → New, choose Cloud and SQL Server, and enter:

  • Server: the Operations Warehouse's SQL connection string (Warehouse Settings → SQL endpoint);
  • Database: Operations;
  • Authentication: OAuth 2.0 with your account, or Workspace identity. Workspace identity needs the workspace to have an identity (workspace Settings → Workspace identity) with Contributor access to the workspace.

If someone else owns a suitable connection, ask them to share it with you instead.

4. Bind and refresh the model

weaver build --item SemanticModel/ParcelWarehouse --bind-data-sources

The command returned:

Terminal output exit 0
Workspace  Parcel Development
Catalogue  Warehouse/Catalogue
Targets
  SemanticModel/ParcelWarehouse


Build

  Check target occupancy                                                                                   0.0s
  Resolve semantic data sources                                                                            0.6s
  Read catalogue                                                                                           9.8s
    Resolve SemanticModel/ParcelWarehouse                                                                  0.0s
    Read Warehouse/Catalogue inventory                                                                   0.3s
  Read target inventories                                                                                  0.3s
  Read semantic sources                                                                                    1.2s
  Prepare bundle                                                                                           0.0s
Install selection
  SemanticModel/ParcelWarehouse
    dependency impacts      1
    selected for build      1

→   Warehouse/Catalogue · Removing superseded catalogue entries · 1 action
✓   Warehouse/Catalogue · Removing superseded catalogue entries · 1 action                               3.4s
→   Warehouse/Catalogue · Reconcile runtime state before physical work · 1 action
✓   Warehouse/Catalogue · Reconcile runtime state before physical work · 1 action                        0.6s
→   SemanticModel/ParcelWarehouse · Deploy semantic definitions · 1 action
✓   SemanticModel/ParcelWarehouse · Deploy semantic definitions · 1 action                                23.3s
→   Warehouse/Catalogue · Publish deployed semantic definitions · 1 action
✓   Warehouse/Catalogue · Publish deployed semantic definitions · 1 action                              24.6s
→   Warehouse/Catalogue · Updating catalogue definitions · 1 action
✓   Warehouse/Catalogue · Updating catalogue definitions · 1 action                                      0.5s
→   Warehouse/Catalogue · Finalising catalogue · 1 action
✓   Warehouse/Catalogue · Finalising catalogue · 1 action                                                0.5s
  Install                                                                                                 52.9s
SemanticModel/ParcelWarehouse data sources bound: [warehouse-endpoint];operations

✓ Build                                                                                                   1m20s

Installation
    6 succeeded
    0 failed
    0 skipped
  Report  [local-path]
  Bundle  891699408c263599e0ee16d53f9416f22760f53e9b3089fffe84c7ebf1716f53

from pathlib import Path

import weaver

project = Path("builtin") / "project"
build_result = weaver.build(
    source=project,
    items=['SemanticModel/ParcelWarehouse'],
    workspace='Parcel Development',
    catalogue='Warehouse/Catalogue',
    bind_data_sources=True,
)
build_result.report()

The command returned:

Notebook output
{'source': '.',
 'items': ['SemanticModel/ParcelWarehouse'],
 'bundle_id': '[bundle-id]',
 'installation': True,
 'bundle_path': None,
 'status': 'succeeded',
 'errors': [],
 'actions': {'total': 5, 'succeeded': 5, 'skipped': 0, 'failed': 0},
 'report_path': '[local-path]'}

Build generated CurrentStatus from the Warehouse View, deployed the model, bound it to the connection whose server and database match, and recorded it in the catalogue. Without a matching connection, Build still deploys but warns no connection has that path, and refresh later fails with "uses a default data connection without explicit connection credentials". If more than one connection reaches the same endpoint, Build refuses and names them; keep one.

Refresh the source and model together:

weaver load Warehouse/Operations SemanticModel/ParcelWarehouse

The command returned:

Terminal output exit 0
Load

  Read catalogue                                                                                           3.1s
Workspace  Parcel Development
Catalogue  Warehouse/Catalogue
Targets
  Warehouse/Operations
  SemanticModel/ParcelWarehouse

  Build run graph                                                                                          0.0s
→   Load Warehouse/Operations/Parcel.StatusEvent
✓   Load Warehouse/Operations/Parcel.StatusEvent  (read 3, +0 ~0 -0 !0)                                  4.4s
→   Load SemanticModel/ParcelWarehouse
✓   Load SemanticModel/ParcelWarehouse                                                                     7.4s
  Execute                                                                                                 11.9s
  Record what the run did                                                                                  0.5s
✓ Load                                                                                                    15.5s

load succeeded: Warehouse/Operations, SemanticModel/ParcelWarehouse

Load summary
    2 succeeded
    0 failed
    0 blocked
  Rows
    read                   3
    inserted               0
    updated                0
    deleted                0
    rejected               0

  Workflow: ada9ebe7e6804230a0354a8b19ad37ec

from pathlib import Path

import weaver

project = Path("builtin") / "project"
load_result = weaver.load(
    items=['Warehouse/Operations', 'SemanticModel/ParcelWarehouse'],
    source=project,
    workspace='Parcel Development',
    catalogue='Warehouse/Catalogue',
)
load_result.report()

The command returned:

Notebook output
weaver.errors.LoadError: Load failed for SemanticModel/ParcelWarehouse: load:SemanticModel/ParcelWarehouse failed: Semantic model refresh [item-id] ended with status 'Failed': We cannot refresh this semantic model because this semantic model uses a default data connection without explicit connection credentials. Please replace the default data connection in the semantic model settings with an explicit cloud or gateway data connection.; (Premium_ASWL_Error, ModelRefresh_ShortMessage_ProcessingError, ModelRefresh_DataSourceErrorLabel) No connection has the path [warehouse-endpoint];operations. Create a connection for it in Fabric, then load again.; Load summary: 1 succeeded, 1 failed

The Warehouse Table loaded before the model refreshed. Open ParcelWarehouse in the service, choose Write DAX queries (or use the Desktop live-connection route), and run:

EVALUATE
CurrentStatus

The model returns the same two rows as the Warehouse View: P-1001 / In transit / Central and P-1002 / Delivered / South.

Adding a Lakehouse works the same way: Initialise retains both pipelines and adds ParcelLakehouse over Landing’s CurrentStatus Table. With Lakehouse and Warehouse selected, separately named Warehouse integration objects also connect the Lakehouse Event Table without replacing StatusEvent or changing the original View. Connect items and dependencies follows that path.

Connect the existing native model

The native Parcel model already has a ParcelStatus table with the same Parcel ID, Status and Depot columns. To connect that model instead of creating a separate variant:

  1. In PowerBI/Parcel/Parcel.SemanticModel/definition/tables/ParcelStatus.tmdl, remove only the partition ParcelStatus = m block and its sample rows. Retain the table and its columns.
  2. Add this declaration to the existing PowerBI/Parcel/Parcel.tmdl overlay. Keep the modelling rules already there.
table ParcelStatus
    annotation 'Weaver.Source' = Warehouse/Operations/Parcel.CurrentStatus

If you followed Connect items and dependencies, use Warehouse/Operations/Parcel.LakehouseCurrentStatus here to continue the Lakehouse-to-Warehouse flow. Both sources have the same columns.

Build the changed model, then refresh it after its source:

weaver build --item SemanticModel/Parcel --bind-data-sources

The command returned:

Terminal output exit 0
Workspace  Parcel Development
Catalogue  Warehouse/Catalogue
Targets
  SemanticModel/Parcel


Build

  Check target occupancy                                                                                   0.0s
  Resolve semantic data sources                                                                            0.4s
  Read catalogue                                                                                           2.8s
    Resolve SemanticModel/Parcel                                                                           0.0s
    Read Warehouse/Catalogue inventory                                                                   0.1s
  Read target inventories                                                                                  0.1s
  Read semantic sources                                                                                    0.5s
  Prepare bundle                                                                                           0.0s
Install selection
  SemanticModel/Parcel
    changed                 1
    selected for build      1

→   Warehouse/Catalogue · Removing superseded catalogue entries · 1 action
✓   Warehouse/Catalogue · Removing superseded catalogue entries · 1 action                               2.0s
→   Warehouse/Catalogue · Reconcile runtime state before physical work · 1 action
✓   Warehouse/Catalogue · Reconcile runtime state before physical work · 1 action                        0.6s
→   SemanticModel/Parcel · Deploy semantic definitions · 1 action
✓   SemanticModel/Parcel · Deploy semantic definitions · 1 action                                         22.1s
→   Warehouse/Catalogue · Publish deployed semantic definitions · 1 action
✓   Warehouse/Catalogue · Publish deployed semantic definitions · 1 action                              23.9s
→   Warehouse/Catalogue · Updating catalogue definitions · 1 action
✓   Warehouse/Catalogue · Updating catalogue definitions · 1 action                                      1.3s
→   Warehouse/Catalogue · Finalising catalogue · 1 action
✓   Warehouse/Catalogue · Finalising catalogue · 1 action                                                0.5s
  Install                                                                                                 50.4s
SemanticModel/Parcel data sources bound: [warehouse-endpoint];operations

✓ Build                                                                                                   56.0s

Installation
    6 succeeded
    0 failed
    0 skipped
  Report  [local-path]
  Bundle  e7c89bef423d5b6ca034168a8d4b81f75af2d66a04232251c3067aef808260f0

from pathlib import Path

import weaver

project = Path("builtin") / "project"
build_result = weaver.build(
    source=project,
    items=['SemanticModel/Parcel'],
    workspace='Parcel Development',
    catalogue='Warehouse/Catalogue',
    bind_data_sources=True,
)
build_result.report()

The command returned:

Notebook output
{'source': '.',
 'items': ['SemanticModel/Parcel'],
 'bundle_id': '[bundle-id]',
 'installation': True,
 'bundle_path': None,
 'status': 'succeeded',
 'errors': [],
 'actions': {'total': 5, 'succeeded': 5, 'skipped': 0, 'failed': 0},
 'report_path': '[local-path]'}

weaver load Warehouse/Operations SemanticModel/Parcel

The command returned:

Terminal output exit 0
Load

  Read catalogue                                                                                           2.9s
Workspace  Parcel Development
Catalogue  Warehouse/Catalogue
Targets
  Warehouse/Operations
  SemanticModel/Parcel

  Build run graph                                                                                          0.0s
→   Load Warehouse/Operations/Parcel.StatusEvent
✓   Load Warehouse/Operations/Parcel.StatusEvent  (read 3, +0 ~0 -0 !0)                                  3.9s
→   Load SemanticModel/Parcel
✓   Load SemanticModel/Parcel                                                                              7.2s
  Execute                                                                                                 11.3s
  Record what the run did                                                                                  0.5s
✓ Load                                                                                                    14.7s

load succeeded: Warehouse/Operations, SemanticModel/Parcel

Load summary
    2 succeeded
    0 failed
    0 blocked
  Rows
    read                   3
    inserted               0
    updated                0
    deleted                0
    rejected               0

  Workflow: 05881cbbd216434fb5638533587c92e4

from pathlib import Path

import weaver

project = Path("builtin") / "project"
load_result = weaver.load(
    items=['Warehouse/Operations', 'SemanticModel/Parcel'],
    source=project,
    workspace='Parcel Development',
    catalogue='Warehouse/Catalogue',
)
load_result.report()

The command returned:

Notebook output
weaver.errors.LoadError: Load failed for SemanticModel/Parcel: load:SemanticModel/Parcel failed: Semantic model refresh [item-id] ended with status 'Failed': We cannot refresh this semantic model because this semantic model uses a default data connection without explicit connection credentials. Please replace the default data connection in the semantic model settings with an explicit cloud or gateway data connection.; (Premium_ASWL_Error, ModelRefresh_ShortMessage_ProcessingError, ModelRefresh_DataSourceErrorLabel) No connection has the path [warehouse-endpoint];operations. Create a connection for it in Fabric, then load again.; Load summary: 1 succeeded, 1 failed

With the sample partition removed, Weaver.Source supplies the Warehouse partition at Build: the deployed ParcelStatus partition now navigates to Parcel.CurrentStatus in Operations. The columns, the Delivery data and the Report's binding to Parcel stay the same.

Compare DAX with source SQL to validate a source-backed model in the same project. Run and inspect the estate combines source Load, model refresh, Test and Health.