Skip to content

A first Warehouse Table and View

Keep the transformation as a T-SQL SELECT. A metadata comment tells Weaver which Table to maintain; Build generates its load work, and Load applies the rows and records the result. Here, three parcel events feed a View showing each parcel's latest status.

You need Weaver installed and a Fabric workspace on running capacity where you can create Warehouses. The example uses a workspace called Parcel Development; substitute your own. Use a disposable workspace for the tutorials: Build owns the Warehouses it manages and removes objects you did not declare there.

Give the SQL a home

Initialise the Parcel example:

weaver initialise \
  --workspace "Parcel Development" \
  --project-folder ./parcel \
  --catalogue Catalogue \
  --environment Weaver \
  --warehouse Operations \
  --example Parcel
cd parcel

The command returned:

Terminal output exit 0
Set up a Weaver project.

Lakehouse (optional)
Use a Lakehouse for files and Python/Delta tables.
Press Enter if this project does not need one.
Examples: Landing, Bronze
Lakehouse:

Project

  Project folder  ./parcel
  Workspace       Parcel Development
  Catalogue       Catalogue
  Environment     Weaver
  Lakehouse       None
  Warehouse       Operations
  Example         Parcel
  Semantic Model  None

1. Continue
2. Change an answer
3. Cancel
Choose [1/2/3]: 1
Publishing a Fabric Environment can take about 5 minutes.
Publish the Environment now? [y/N]: n

Setting up the Weaver project

  Checking the workspace                                                                                   0.3s
  Reading the Environment                                                                                  0.0s
  Checking the project files                                                                               0.1s
  Creating the Catalogue Catalogue                                                                        11.6s
  Creating the Warehouse Operations                                                                        5.1s
  Writing the project files                                                                                0.0s
  Creating the Environment Weaver                                                                         21.2s
✓ Setting up the Weaver project                                                                           38.4s

  Catalogue    Catalogue   created
  Environment  Weaver      created
  Warehouse    Operations  created
  Environment publication: deferred

Weaver project ready in [local-path]/parcel.

Next:

  cd [local-path]/parcel

Environment publication deferred.
Publish it before the first load that runs Python.

  weaver fabric environment publish --path Environment/Weaver.Environment
  weaver workflow full

Or run individually:
  weaver build
  weaver load
  weaver test
  weaver health

You can set this up again with:

  weaver initialise --workspace 'Parcel Development' --project-folder ./parcel --catalogue Catalogue --environment Weaver --warehouse Operations --example Parcel --non-interactive

from pathlib import Path

import weaver

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

The command returned:

Notebook output
{'project_folder': '[notebook-resources]/project',
 'workspace': 'Parcel Development',
 'resources': [{'role': 'Catalogue', 'name': 'Catalogue', 'status': 'existing', 'action': None},
               {'role': 'Environment', 'name': 'Weaver', 'status': 'existing', 'action': None},
               {'role': 'Warehouse', 'name': 'Operations', 'status': 'existing', 'action': None}],
 'files': ['.weaver-initialise.json',
           'Environment/Weaver.Environment/.platform',
           'Environment/Weaver.Environment/Libraries/PublicLibraries/environment.yml',
           'Environment/Weaver.Environment/Setting/Sparkcompute.yml',
           'PowerBI/.gitkeep',
           'README.md',
           'Warehouse/Operations/Parcel.CurrentStatus.sql',
           'Warehouse/Operations/Parcel.LakehouseCurrentStatus.sql',
           'Warehouse/Operations/Parcel.StatusEvent.sql',
           'Warehouse/Operations/assumptions/Parcel.StatusIsKnown.sql',
           'Warehouse/Operations/shortcuts.yml',
           'Warehouse/Operations/tests/Parcel.CurrentStatusMatches.sql',
           'workflow.yml',
           'workspace-config.yml'],
 'example': {'generated': True, 'name': 'Parcel'},
 'example_added': True,
 'environment_publication': 'deferred',
 'environment_definition': 'imported',
 'dry_run': False,
 'next_commands': ['weaver workflow full',
                   'weaver build',
                   'weaver load',
                   'weaver test',
                   'weaver health']}

The Terminal wizard asks one question you did not answer on the command line: press Enter to skip the Lakehouse, choose 1 to continue, and answer n to publishing the Environment. A Warehouse-only project runs no Python in Fabric, so it needs no published Environment yet, even though the closing hint mentions one.

Initialise created the Catalogue and Operations Warehouses and wrote the SQL Table, View and validations below. Run every later command from the parcel folder. Open the generated files as you read; you do not need to copy them.

See the generated workspace bindings
workspace-config.yml
workspace: Parcel Development
environment: Weaver
catalogue: Warehouse/Catalogue

targets:
  Warehouse/Operations: Operations

Warehouse/Operations is the logical item your project names; Operations is the physical Warehouse it deploys to. catalogue is the Warehouse where Weaver records what it installed and ran.

Inspect the event Table

Open Warehouse/Operations/Parcel.StatusEvent.sql:

/*
Table ID: Parcel.StatusEvent

Description: One row per parcel status event.

Lineage: A deterministic carrier feed represented by this example.

Primary key: Parcel ID, Event sequence

Schema:
  Parcel ID: varchar(20)
  Event sequence: int
  Status: varchar(30)
  Depot: varchar(50)
*/
select v.[Parcel ID]
     , v.[Event sequence]
     , v.[Status]
     , v.[Depot]
from (values
    ('P-1001', 1, 'Accepted', 'North'),
    ('P-1001', 2, 'In transit', 'Central'),
    ('P-1002', 1, 'Delivered', 'South')
) as v ([Parcel ID], [Event sequence], [Status], [Depot]);

The key identifies one event. Keep the SQL as a SELECT; the declaration describes the Table that should receive it.

Read the latest event through a View

Open Warehouse/Operations/Parcel.CurrentStatus.sql:

/*
View ID: Parcel.CurrentStatus

Description: The latest recorded status for each parcel.

Lineage: Parcel status events ordered by event sequence.
*/
with ranked as (
    select [Parcel ID]
         , [Status]
         , [Depot]
         , row_number() over (
               partition by [Parcel ID]
               order by [Event sequence] desc
           ) as [Event rank]
    from [Parcel].[StatusEvent]
)
select [Parcel ID]
     , [Status]
     , [Depot]
from ranked
where [Event rank] = 1;

The View reads the event Table and keeps the most recent row for each parcel.

Install the definitions, then load the rows

Check the project locally first. It reads the declarations and their dependencies without contacting Fabric:

weaver check

The command returned:

Terminal output exit 0
Project valid.

Build installs the definitions. Because Build owns Operations, keep data you cannot recreate in a separate item; target ownership explains why.

weaver build --item Warehouse/Operations

The command returned:

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


Build

  Check target occupancy                                                                                   0.0s
  Resolve semantic data sources                                                                            0.0s
  Read catalogue                                                                                           0.0s
    Read Warehouse/Operations inventory                                                                    0.8s
    Read Warehouse/Catalogue inventory                                                                     0.2s
  Read target inventories                                                                                  1.1s
  Read semantic sources                                                                                    0.0s
  Prepare bundle                                                                                           0.5s
Install selection
  Warehouse/Operations
    new                     13
    selected for build      13

→   Warehouse/Catalogue · Creating schemas · 1 action
→   Warehouse/Operations · Creating schemas · 2 actions
→   Warehouse/Operations · Building objects · 1 action
✓   Warehouse/Catalogue · Creating schemas · 1 action                                                      0.0s
→   Warehouse/Catalogue · Building objects · 24 actions
✓   Warehouse/Operations · Creating schemas · 2 actions                                                    0.7s
✓   Warehouse/Operations · Building objects · 1 action                                                     4.9s
→   Warehouse/Operations · Building objects · 1 action
✓   Warehouse/Operations · Building objects · 1 action                                                     0.0s
✓   Warehouse/Catalogue · Building objects · 24 actions                                                   10.9s
→   Warehouse/Operations · Creating shortcuts · 1 action
✓   Warehouse/Operations · Creating shortcuts · 1 action                                                   0.2s
→   Warehouse/Operations · Installing load and test artefacts · 5 actions
✓   Warehouse/Operations · Installing load and test artefacts · 5 actions                                  0.3s
→   Warehouse/Catalogue · Recording created Views · 1 action
✓   Warehouse/Catalogue · Recording created Views · 1 action                                               3.5s
→   Warehouse/Catalogue · Updating catalogue definitions · 1 action
✓   Warehouse/Catalogue · Updating catalogue definitions · 1 action                                        8.3s
→   Warehouse/Catalogue · Finalising catalogue · 1 action
✓   Warehouse/Catalogue · Finalising catalogue · 1 action                                                  0.7s
  Install                                                                                                 24.1s
✓ Build                                                                                                   28.9s

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

from pathlib import Path

import weaver

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

The command returned:

Notebook output
{'source': '[local-path]/parcel',
 'items': ['Warehouse/Operations'],
 'bundle_id': '[bundle-id]',
 'installation': True,
 'bundle_path': None,
 'status': 'succeeded',
 'errors': [],
 'actions': {'total': 6, 'succeeded': 6, 'skipped': 0, 'failed': 0},
 'report_path': '/tmp/weaver-build-report-jmhymk4f/install-report.yml'}

Load the event rows:

weaver load Warehouse/Operations

The command returned:

Terminal output exit 0
Load

  Read catalogue                                                                                           3.5s
Workspace  Parcel Development
Catalogue  Warehouse/Catalogue
Targets
  Warehouse/Operations

  Build run graph                                                                                          0.0s
→   Load Warehouse/Operations/Parcel.StatusEvent
✓   Load Warehouse/Operations/Parcel.StatusEvent  (read 3, +3 ~0 -0 !0)                                    4.9s
  Execute                                                                                                  5.0s
  Record what the run did                                                                                  0.7s
✓ Load                                                                                                     9.2s

load succeeded: Warehouse/Operations

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

  Workflow: 117a9e4b54d34e759857595f1a0ac3a8

from pathlib import Path

import weaver

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

The command returned:

Notebook output
{'requested': ['Warehouse/Operations'],
 'status': 'succeeded',
 'dry_run': False,
 'fault_tolerant': False,
 'reload': False,
 'ignore_stability_threshold': False,
 'workspace': 'Parcel Development',
 'workflow_id': '[id]',
 'started_at': '2026-10-17T02:35:29.216539+00:00',
 'finished_at': '2026-10-17T02:35:34.022013+00:00',
 'order': ['load:Warehouse/Operations/Parcel.StatusEvent'],
 'edges': [],
 'nodes': [{'node_id': 'load:Warehouse/Operations/Parcel.StatusEvent',
   'logical_id': 'Warehouse/Operations/Parcel.StatusEvent',
   'physical_target': 'Warehouse/Operations',
   'primitive_kind': 'warehouse_procedure',
   'dispatch_location': 'Warehouse/Operations/[_].[Load Parcel.StatusEvent]',
   'status': 'succeeded',
   'executed': True,
   'started_at': '2026-10-17T02:35:30.769015+00:00',
   'finished_at': '2026-10-17T02:35:34.017702+00:00',
   'rows': {'succeeded': True,
    'rows_read': 3,
    'rows_inserted': 0,
    'rows_updated': 0,
    'rows_deleted': 0,
    'rows_rejected': 0,
    'error_message': None,
    'bookmark_datetime': '2026-10-17T02:35:30.897737+00:00',
    'is_static_skip': False,
    'is_refusal': False},
   'messages': []}],
 'messages': []}

Run the two generated validations, then read Health, Weaver's summary of what is installed and what ran:

weaver test Warehouse/Operations

The command returned:

Terminal output exit 0
Test

  Read catalogue                                                                                           3.0s
Workspace  Parcel Development
Catalogue  Warehouse/Catalogue
Targets
  Warehouse/Operations

  Build run graph                                                                                          0.0s
→   Test Warehouse/Operations/Parcel.CurrentStatusMatches
→   Test Warehouse/Operations/Parcel.StatusIsKnown
✓   Test Warehouse/Operations/Parcel.StatusIsKnown                                                         1.7s
✓   Test Warehouse/Operations/Parcel.CurrentStatusMatches                                                  7.7s
  Execute                                                                                                  7.9s
  Record what the run did                                                                                  0.9s
✓ Test                                                                                                    11.8s

test passed

Test summary
    2 passed
    0 failed
  Workflow: 487b69ed9b984916b74bdc7e3243fcd7

from pathlib import Path

import weaver

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

The command returned:

Notebook output
{'status': 'passed',
 'nodes': [{'logical_id': 'Warehouse/Operations/Parcel.CurrentStatusMatches',
            'kind': 'test',
            'physical_target': 'Warehouse/Operations',
            'primitive_kind': 'warehouse_procedure',
            'dispatch_location': 'Warehouse/Operations/[_].[Load Parcel.CurrentStatusMatches]',
            'status': 'passed',
            'executed': True,
            'messages': [],
            'started_at': '2026-10-17T07:26:13.615758+00:00',
            'finished_at': '2026-10-17T07:26:18.358925+00:00',
            'missing_count': 0,
            'unexpected_count': 0,
            'failure_count': 0,
            'error_message': None},
           {'logical_id': 'Warehouse/Operations/Parcel.StatusIsKnown',
            'kind': 'assumption',
            'physical_target': 'Warehouse/Operations',
            'primitive_kind': 'warehouse_procedure',
            'dispatch_location': 'Warehouse/Operations/[_].[Load Parcel.StatusIsKnown]',
            'status': 'passed',
            'executed': True,
            'messages': [],
            'started_at': '2026-10-17T07:26:13.618396+00:00',
            'finished_at': '2026-10-17T07:26:14.944292+00:00',
            'violation_count': 0,
            'error_message': None}],
 'totals': {'planned': 2,
            'executed': 2,
            'passed': 2,
            'failed': 0,
            'invalid': 0,
            'missing_count': 0,
            'unexpected_count': 0,
            'violation_count': 0},
 'workflow_id': '[run-id]',
 'started_at': '2026-10-17T07:26:13.475160+00:00',
 'finished_at': '2026-10-17T07:26:18.798465+00:00'}

weaver health --item Warehouse/Operations

The command returned:

Terminal output exit 0
Health

  Read catalogue                                                                                           3.7s
  Check installed items                                                                                    0.1s
  Read installed objects                                                                                   0.6s
✓ Health                                                                                                   4.5s

Weaver Health  Green

Load    Green
  Last load activity   0h 0m ago
  1 succeeded

Tests   Green
  2 succeeded

Build   Green
  Installed estate consistent (10 objects)

Slowest loads
  Warehouse/Operations/Parcel.StatusEvent     4.9s

Largest changes
  Warehouse/Operations/Parcel.StatusEvent     read 3  +3 ~0 -0 !0

1
2
3
4
5
6
7
import weaver
health_result = weaver.health(
    items=['Warehouse/Operations'],
    workspace='Parcel Development',
    catalogue='Warehouse/Catalogue',
)
health_result.report()

The command returned:

Notebook output
{'format_version': 3,
 'generated_at': '2026-10-17T07:26:18.814923+00:00',
 'as_of': '2026-10-16T07:26:18.814923+00:00',
 'status': 'green',
 'targets': ['Warehouse/Operations'],
 'sections': {'load': {'status': 'green',
                       'subjects': 9,
                       'counts': {'succeeded': 9},
                       'findings': []},
              'tests': {'status': 'green',
                        'subjects': 2,
                        'counts': {'succeeded': 2},
                        'findings': []},
              'build': {'status': 'green', 'subjects': 20, 'counts': {}, 'findings': []}},
 'current_load': {'workflow_ids': ['[run-id]'],
                  'started_at': '2026-10-16T16:53:41.564253+00:00',
                  'completed_at': '2026-10-16T16:54:00.580059+00:00',
                  'counts': {'succeeded': 9}},
 'load_activity': [{'object_id': 'Warehouse/Operations/Parcel.Daily',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:45.134094+00:00',
                    'completed_at': '2026-10-16T16:53:46.630224+00:00',
                    'duration_ms': 1496,
                    'rows_read': 1,
                    'rows_inserted': 1,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Parcel.Events',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:43.841515+00:00',
                    'completed_at': '2026-10-16T16:53:45.133378+00:00',
                    'duration_ms': 1291,
                    'rows_read': 1,
                    'rows_inserted': 1,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Parcel.LakehouseCurrentStatus',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:58.872352+00:00',
                    'completed_at': '2026-10-16T16:54:00.580059+00:00',
                    'duration_ms': 1707,
                    'rows_read': 2,
                    'rows_inserted': 2,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Parcel.LiveStatus',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:41.564857+00:00',
                    'completed_at': '2026-10-16T16:53:46.973535+00:00',
                    'duration_ms': 5408,
                    'rows_read': 1,
                    'rows_inserted': 1,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Parcel.RawEvents',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:41.564253+00:00',
                    'completed_at': '2026-10-16T16:53:43.841173+00:00',
                    'duration_ms': 2276,
                    'rows_read': 1,
                    'rows_inserted': 1,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Parcel.StatusEvent',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:41.564999+00:00',
                    'completed_at': '2026-10-16T16:53:44.280522+00:00',
                    'duration_ms': 2715,
                    'rows_read': 3,
                    'rows_inserted': 3,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Parcel.Summary',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:46.631862+00:00',
                    'completed_at': '2026-10-16T16:53:47.936424+00:00',
                    'duration_ms': 1304,
                    'rows_read': 1,
                    'rows_inserted': 1,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Reference.Depot',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:41.565295+00:00',
                    'completed_at': '2026-10-16T16:53:43.823659+00:00',
                    'duration_ms': 2258,
                    'rows_read': 1,
                    'rows_inserted': 1,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False},
                   {'object_id': 'Warehouse/Operations/Reference.Service',
                    'target': 'Warehouse/Operations',
                    'workflow_id': '[run-id]',
                    'started_at': '2026-10-16T16:53:43.827082+00:00',
                    'completed_at': '2026-10-16T16:53:45.104187+00:00',
                    'duration_ms': 1277,
                    'rows_read': 1,
                    'rows_inserted': 1,
                    'rows_updated': 0,
                    'rows_deleted': 0,
                    'rows_rejected': 0,
                    'is_reload': False,
                    'is_static_skip': False}]}

In the Fabric portal, open the Operations Warehouse, choose New SQL query and read the View:

select [Parcel ID], [Status], [Depot]
from [Parcel].[CurrentStatus]
order by [Parcel ID];
Parcel ID Status Depot
P-1001 In transit Central
P-1002 Delivered South

P-1001 has two events; the View keeps the later one.

What happened around the SELECT

Build created the physical Table, generated its loading procedure and installed the dependent View. The SQL reference supplied the dependency; Lineage is descriptive. Load staged the query result, matched keys and reconciled changed values according to the Table’s policy. It also recorded the row changes and processing state for Health. You wrote neither an INSERT/MERGE procedure nor a second load-order definition.

The View now gives you one row per parcel. Testing Warehouse data explains the two validations you just ran and shows what a failing one looks like.

If you edit either SQL document, Check and Build install the changed definition before another Load. The development cycle covers that loop; Table reference owns the exact authoring and load contract.