Skip to the stories
Microsoft 365 & SharePoint

Project Osmos in Microsoft Fabric: Agentic Data Engineering, Governance and QA Lessons

By Nikola 374 views

Project Osmos builds and validates Fabric data projects from a single task. A Vienna transit test shows where human review, independent QA and careful reruns matter.

Project Osmos in Microsoft Fabric: Agentic Data Engineering, Governance and QA Lessons

Project Osmos shifts a chunk of data engineering work from an interactive coding session to a task that plans, runs and checks a project on Microsoft Fabric Spark. That can save the back-and-forth of asking an assistant for code, running it, pasting errors and trying again. It also changes the review problem: administrators need to inspect the agent’s plan, control what it can write and check its results independently.

A test using Wiener Linien’s full Vienna public transport timetable shows both sides. Osmos built bronze, silver and gold tables, handled a second feed version and recovered from a long-running step. It also produced a flawed route comparison, encountered timestamp issues and hit an unexplained task error after approval. The practical lesson is to treat the task as a junior engineer’s work order: define the contract clearly, keep consequential writes behind a human gate, and verify the data with tests the task cannot edit.

What Osmos does in Fabric

Project Osmos is the codename for Microsoft Fabric’s data engineering agent, which entered public preview at FabCon Europe in Barcelona in September 2026. Instead of generating a code snippet for a person to run, it accepts a project outcome: the sources, transformations, outputs, constraints and validation criteria. It then plans the work, writes and runs notebooks on Fabric Spark, creates Delta tables, checks results against the stated criteria and revises work that fails those checks. Tasks continue running on Fabric after the user closes a local terminal.

Microsoft acquired Seattle startup Osmos in January 2026. Before that acquisition, its technology included an AI Data Wrangler for messy external files, such as nested JSON, irregular CSVs and PDFs, and an AI Data Engineer that generated production PySpark. The preview product described here is the data engineering agent expanded to handle work at project scale.

A task has five basic stages:

  1. Define: Describe the outcome and choose the lakehouse that hosts the task.
  2. Plan: Osmos classifies the project and proposes operating settings for review.
  3. Execute: It creates and refines notebooks and Delta tables on Fabric Spark. Microsoft says it compares implementation options as it works.
  4. Validate: It runs the specified success criteria against the data.
  5. Monitor: The task remains available by its ID from the local coding agent and the Fabric lakehouse.

The selected lakehouse is the default lakehouse for the Spark session. A task can access other sources and destinations the user can access, because it runs using that user’s identity. Osmos is steered through a local coding agent, such as GitHub Copilot CLI, Claude Code or Codex, with Microsoft’s Skills for Fabric plug-in installed. The task appears in the Fabric lakehouse explorer with its specification, status and activity log. People who can access the lakehouse can follow its progress and answer questions.

Osmos is scoped to lakehouses, OneLake, Spark, notebooks and Delta tables. It isn’t intended for quick queries, Power BI report changes or producing a single notebook. Warehouses, T-SQL, Eventhouse, Dataflows Gen2, pipelines and semantic models remain within the regular Fabric skills.

Settings determine how much control the task gets

Before execution, Osmos proposes eight operating settings. They cover read and write permissions; whether outputs are written directly, staged or cloned before promotion; how staged work becomes final; what a rerun does; whether schemas may evolve; artifact type and destination; and how much effort the agent spends comparing possible implementations.

These settings guide the agent, but they do not enforce Fabric access controls. The hard boundary is the user’s Fabric and OneLake permissions. If a user can delete a table, a task running as that user can delete it too. That makes identity and workspace permissions part of the design, not background details.

The Vienna test used a paid Fabric capacity; Trial capacities aren’t supported. It also required a workspace lakehouse, Contributor or higher workspace access, the tenant setting Users can use Copilot and other features powered by Azure OpenAI, and ideally the OpenAI-as-subprocessor setting. Outbound access protection had to be off for the workspace. An initial dry run on F4 prompted a warning that processing the full feed would take time, so the capacity was scaled up to F32.

A real feed makes a demanding test

Wiener Linien publishes its timetable as GTFS open data through data.gv.at under CC BY 4.0. The Mobility Database listed 595 routes across metro, tram and bus. Its validator reported 1 error and 8 warnings in April 2026. The feed is about 40 MB compressed and 500 MB uncompressed, making it large enough for design choices to matter.

The target was a service-level model answering a practical question: how well is each stop and line served, and what changes between timetable versions? Three gold tables were planned:

  • gold_stop_hourly_departures, grouped by feed version, stop, day type and hour, to show service intensity.
  • gold_route_headways, grouped by feed version, route, direction, day type and time band, to report median and 90th-percentile wait between departures.
  • gold_stop_service_span, grouped by feed version, stop and day type, to show first and last departures and whether night service runs.

GTFS makes a useful test because its details can trip up generic code generation. A time such as 25:30:00 belongs to the previous service day even though it occurs at 01:30 the next morning. Weekly service patterns come from calendar.txt, while calendar_dates.txt adds and removes specific dates. Platforms may need to roll up to parent stations to avoid counting a busy interchange as several quiet stops. Daylight saving time complicates the relationship between elapsed seconds and local clock time. Finally, expanding every stop time across every service date multiplies the data volume.

Specify the project before handing it over

The raw feed was landed separately in a notebook, preserving the downloaded archive and extracted files under a folder for each feed_date. That choice kept the evaluation focused on data engineering rather than downloading and gave the reviewer an untouched copy of the input. Each folder represented a feed version, a distinction needed when a later timetable arrived.

The task specification asked Osmos to build three layers. Bronze would create one Delta table per GTFS file, retain all fields as strings and add feed version, source file and ingestion time. Silver would type and validate entities, resolve platforms, represent stop times as seconds since the service-day start, apply calendar exceptions, generate departures with local timestamps and quarantine invalid records with reason codes. Gold would provide hourly stop departures, route headways and service spans.

The validation contract included source-to-bronze row counts, key uniqueness, referential integrity, quarantine counts, reconciliation between gold and silver departures, positive headways and a list of the ten busiest weekday stops for human review. A failed check was supposed to stop the run and prevent gold promotion. Constraints required repeat runs of the same version to avoid duplicates, new versions to leave old versions intact, stable table names and a summary of design choices.

That level of detail matters. Any unstated rule becomes a decision for the agent to infer. The intake process let the user accept recommendations, change settings, request explanations or walk through questions. Walking through them exposed how Osmos had interpreted the task.

Staging and rerun choices

The user set Files/landing to read-only and allowed writes only to bronze, silver, gold and staging tables in the chosen lakehouse. Osmos recommended partitioned bronze and silver writes with gold staged and promoted automatically after validation. The user chose staging with manual promotion, keeping approval in human hands after the candidate outputs and validation results were available.

For promotion, the accepted choice was a Delta data swap scoped to each feed_version partition using replaceWhere. An atomic rename could change the table identity and disrupt references such as shortcuts or a Direct Lake model. Re-running final code against production tables would be non-atomic and would not promote the exact data that had been validated.

Reruns were set to reconcile idempotently using the feed version and natural GTFS keys. A repeated run should leave counts unchanged, while a new version should add its partition without replacing older data. Schema rules varied by layer: bronze could add optional source columns as strings, while silver and gold were locked to protect their downstream contracts. The interface did not offer a per-layer schema choice, so the user entered the rule in free text.

Notebooks were selected as artifacts because they can be reviewed, stored in Git and scheduled later. The destination was the workspace folder osmos/vienna_transit. High reasoning effort was selected to encourage comparison of implementation options, at a higher token cost. In a dry run, the handoff also specified that a notebook publishing failure should stop the task instead of silently saving code elsewhere.

On Windows, the installation instructions had a practical wrinkle: the two Claude Code /plugin commands needed to be run separately. Pasting both together opened a marketplace dialog with the full paste in its source field. After installing the Fabric collection, Claude Code needed a restart so the skills would load; the user then checked that project-osmos was present.

Inspect the handoff and task specification

Before starting, the user asked to see the full handoff: the contract Osmos would receive, followed by its execution plan. It was 4,953 of a stated 9,500 characters. That limit was not in the documentation used for the test, so a detailed project could run into it.

The handoff showed the selected mode and effort, the resources and write targets, and the safety, rerun, schema and approval rules. It also surfaced decisions the user had not been asked to make directly: bronze schema auto-evolution, direct partitioned writes to silver, and a rule to fail once when blocked by ambiguity rather than repeat a question.

After starting, the local agent returned task and operation IDs plus a Fabric link. The IDs were saved under .dataprojects\vienna_transit in the user profile, allowing later follow-ups to resume the same task from another session. In Fabric, the reviewer checked the task’s own specification before execution: did it cover times past 24:00, calendar exceptions and platform rollups? That was an early chance to correct misunderstandings.

The first approval request came too soon. Osmos asked for permission to promote to the production bronze, silver and gold tables before creating any tables or notebooks. The user declined and clarified that approval meant: build everything in staging, publish the four notebooks, run validation against staging, then stop and present results, counts, the busiest-stops list and design choices. No production writes were permitted until that review. The episode shows why an approval prompt is only useful when the person approving can inspect the work first.

During the build, Osmos also proposed inferring parent stations by trimming stop IDs. The source lacked parent_station and location_type fields. Trimming the final ID segment would reduce 4,347 platforms to 1,798 parent groups, but Austrian stop IDs may include an area component at that position. The change could split some stations and alter the stop-level gold tables. The user accepted the proposal after considering that risk.

After about 3.5 hours and more than 700 activities, Osmos reached the manual promotion gate. The initial production table history showed a create-or-replace operation, which was expected because the table did not yet exist. The second feed version would be the real test of partition-safe promotion. Osmos later reported that it replaced only the specified version’s rows, with staging and production matching, while the existing November version retained 201,805,601 rows in silver_departures.

Second version exposes runtime and timestamp problems

To test incremental processing, the user added an archived feed dated 2026-09-08 from the Mobility Database. The archived feeds covered the same service period, from Dec 14, 2025 to Dec 12, 2026, so differences reflected timetable adjustments rather than a new service calendar. The follow-up asked Osmos to process the new version without rewriting existing data, compare the two latest versions and rerun the first version to prove row counts were unchanged.

The first attempt built bronze and most silver staging tables, but silver_departures exceeded Osmos’s one-hour limit for a single step. The task stopped at 20:08 UTC. The next morning, the same task ID resumed with its staging data intact. Before resuming, the local coding agent and user changed the plan: check which tables were complete, build departures in date chunks, replace only each chunk’s date range and continue to stop for approval before promotion.

The task had preserved its state, but recovery planning came from the user and local agent. With weekly chunks, each took about 20 seconds, and the run reached its next approval point at 08:14 UTC. The experience also showed why step size affects steerability: Osmos reads follow-up messages between Spark steps, so a long-running step delays a new instruction.

While reviewing the work, Osmos raised a concern about timestamps. A departure 86,400 seconds into the 2025-12-14 service day appeared as 23:00 on that date, although the corresponding Vienna time was midnight on Dec 15. A UTC Spark session can display a stored instant an hour earlier than local winter time, so the display alone did not prove the data was wrong. The gold tables, it turned out, derived their calculations from seconds since service-day start, not the timestamp fields.

The deeper check found a real daylight-saving bug in production: 14,839 of 201,805,601 November-version departure rows had incorrect timestamps around the clock changes, roughly 0.007%. A correct GTFS conversion measures from noon in Vienna, subtracts 12 hours, then adds the service-time seconds. That differs from simply adding elapsed time to midnight on transition dates.

The new September build had a separate defect. Its code used to_utc_timestamp on local wall-clock values and wrote them as local timestamp columns. All 200,992,885 staged departure rows were wrong. The user required a full rebuild even for chunks with matching row counts, plus spot checks for winter, summer, both clock-change nights and times after midnight. The rebuilt chunks then passed an independent timestamp check with zero mismatches.

The first automated checks had missed these defects. Row counts and keys do not establish that timestamps represent the right instant. One agent’s self-check also searched for specific function names when deciding whether gold used timestamp columns. Its conclusion happened to be correct, but the method was shallow. A useful independent test computes expected instants from the GTFS rule and compares them as instants, avoiding session display settings.

Route comparisons need a stable business key

The feed comparison showed 69 routes whose trips and stops were identical but whose service IDs ended earlier in the newer feed. Sixty-four had fewer weekly departures. For example, route D showed 20,326 weekly departures in the September version and 5,991 in the November version. Route 48A went from 32,407 to 18,687; route 49 from 15,753 to 2,718.

Those figures looked like major service cuts, but the route IDs contained timetable-version information. The lines may have continued under new IDs, counted among 104 routes marked as added. That interpretation had not yet been confirmed. The comparison was keyed on route_id, which GTFS does not guarantee will stay stable between feed versions. A more useful business comparison should match on route_short_name and route_type, retaining both versions’ route IDs for inspection.

The validation rule that unchanged routes should show zero delta was also too weak. Osmos defined unchanged routes by whether their figures changed, making the check circular. Of 820 routes with the same trips and stops, only 751 were classified as unchanged. The user therefore held back promotion of the comparison table and requested a rebuild using a more stable match.

Production fix and the code behind it

After approval, Osmos promoted the September feed tables and applied a targeted timestamp correction to the November production data. The correction updated exactly 14,839 rows across the affected dates. The same correction was then applied to staging after QA found that staging still held the old values. That caught a common consistency trap: fixing production while leaving its staging copy stale means later builds can reintroduce the defect.

The data correction alone was not enough. The published 02_silver_gtfs notebook still used the flawed midnight-based calculation, so rerunning it could restore the wrong values. Osmos developed a private notebook change that calculated from noon in Europe/Vienna, minus 12 hours, plus the GTFS seconds. Its 28-case test across the four clock-change dates returned zero errors, including examples at 26:00 and during the repeated 02:00 hour. The user checked six key cases manually.

The corrected September version contained 200,992,885 departure rows, written in 77 seconds from validated staging data. The November production version had zero timestamp mismatches across all 201,805,601 rows after the fix. The gold tables were not affected because their calculations used elapsed seconds, not the timestamp fields.

One failure remained operationally significant: after the user approved promotion, the task ended with a generic error and no Spark failure in the activity log. Nothing was promoted. Because writes had stayed in staging and approval was recorded in task history, production remained unchanged and the same task could be resumed. The user checked table history directly before continuing. The local skill instructions prevented the agent from resuming after an unexplained error without the user’s go-ahead.

Independent QA needs separate ownership

Osmos’s own validation is useful, but an agent that writes a transformation and its test can repeat the same misunderstanding in both. There is another concern: Osmos acts with the user’s identity. A folder it is asked not to edit does not provide independent protection if the user can edit it.

The test setup kept validation in Git, changed only through reviewed pull requests, and ran it under a service principal in a separate QA workspace. Tests read from raw files and staging shortcuts, while the user had Viewer access in QA. A GitHub Actions workflow signed in as the service principal, deployed a validation notebook through the Fabric REST API, started a RunNotebook job with the requested feed version and waited for its result. Failed checks failed the workflow.

The service principal was registered in Entra ID as sp-vienna-qa. Fabric developer settings had to allow service principals to call public APIs and create workspaces, connections and deployment pipelines. The QA workspace contained a lakehouse with shortcuts to staging tables and the landing files. The service principal needed Contributor access on the source workspace to read through those shortcuts; Fabric workspace roles did not provide a read-only option that also covered Spark table access.

The user considered a Fabric data pipeline but rejected it because notebook activities run under the identity of the person who last modified the pipeline, which can be easy to misconfigure. Starting the notebook job through the API from CI made the service principal identity explicit. Once the first QA run passed, the user’s own QA workspace role was reduced to Viewer, preventing tasks running as that user from changing the tests or their results.

The test ultimately checked about 201 million rows in the September version with zero timestamp mismatches. Before the November correction, it found 14,839 mismatches: 7,054 on 2026-03-29, 6,319 on 2026-10-25, 1,134 on 2026-03-28 and 332 on 2026-10-24. That split showed errors on both the Saturday service day’s after-midnight times and the following Sunday’s early hours.

For Fabric teams evaluating project-scale agents, the Vienna run points to a practical operating model: write down the data contract and rerun rules, inspect the handoff and generated specification, stage consequential outputs, and make approval wait until evidence is available. Keep independent validation under a separate identity, and test domain rules directly rather than relying on counts alone. Osmos can carry substantial work through Fabric Spark, but the quality of the result still depends on the checks and boundaries its operators build around it.

Source: Nikola · data-mozart.com

From the same basket