Architecture

The app is the VS Code extension running in its own window. It runs several processes on your machine. This page shows what each one does and how they connect.

The parts

The parts of the OneLake Studio app On this machine, the app window, Excel and the command line talk to the Node process: the window over HTTP on 127.0.0.1, Excel over XMLA on 127.0.0.1, the command line over a local pipe. The Node process sends statements to the query server, starts the keep-offline engine, and reads and writes the local catalog, a SQLite file. Both DuckDB engines read through one disk cache from OneLake. The Node process keeps the local catalog current from the Fabric REST API and OneLake. Export to Fabric publishes a Fabric app through the Fabric REST API. This machine App window Tauri, WebView2 Excel PivotTable Command line agents, scripts HTTP, 127.0.0.1 XMLA, 127.0.0.1 local pipe Node process: the extension sign-in · read-only check · names · sync worker Excel's XMLA endpoint · Export to Fabric Quack, control pipe starts reads, writes Query server DuckDB: every tab's SQL Keep-offline engine DuckDB: one thread Local catalog SQLite file: metadata Disk cache the bytes both engines read rows, files sync: listings, metadata OneLake tables, files Fabric REST API workspaces, models Fabric app in a browser Export

Who does what

PartWhat it doesRuns inNetwork
ShellStarts the Node process and opens the window. Remembers the window's size and position. If you start the app twice, it shows the window that is already open.onelake-studio.exe, TauriNone
WindowDraws the tree, tabs, menus, dialogs and status bar. Each tab is the extension's page inside an iframe. It does not have the OneLake token.WebView2, which is Edge127.0.0.1 only
Node processThe extension's code, unchanged. It handles sign-in, blocks anything that writes, turns names into tables, keeps the local catalog up to date, serves Excel, and runs Export to Fabric.node.exe, dist/desktop.jsFabric REST API, OneLake lists and metadata
Local catalogA SQLite file on your machine. It stores all metadata: lists of workspaces, items and tables, table metadata, Delta history, opened models, and what was read. The tree reads it, even before you sign in.A SQLite file, read with node:sqliteNone
Query serverRuns the SQL from every tab. Tabs connect to it with DuckDB's Quack protocol, and share one memory limit and the data already read.DuckDB 2.0, in a separate processOneLake: rows and files
Keep-offline engineDownloads every table of a model set to Keep offline, so it works without internet. Queries never wait for it. It stops when there is nothing left to download.DuckDB, a second process: one thread, 1 GBOneLake
Disk cacheStores the bytes DuckDB reads from OneLake. A file is downloaded again only if it changed. One cache per Microsoft account, used by both DuckDB processes.Files, cache_httpfsNone
Excel's endpointLets Excel PivotTables query a semantic model over XMLA. The queries run on the query server.The Node process, HTTP on 127.0.0.1None
Command lineSends its command to the running app, which answers with its own sign-in, cache and engine. If the app isn't running, the command line starts its own process.bin/cli.mjsThrough the app
Fabric appA model's Pivot, published with Export to Fabric. It runs in the browser after a Fabric sign-in and reads the model's tables there.Fabric, and the browserOneLake

What happens when you run a query

  1. Each semantic model the query names is opened from its local copy. The first time, its definition is read from Fabric.
  2. dax-sql rewrites a query on a model as plain SQL over table names. A query that names no model is left as it is.
  3. The Node process refuses more than one statement and anything that isn't a read, using DuckDB's own parser to tell.
  4. Each table name becomes a view, made from the local catalog, and each file name becomes its abfss:// address. A name that doesn't exist fails here.
  5. The query runs on the query server. Stop cancels only that tab's queries. A result over maxResultRows (200,000 by default) is counted, and only the first rows go to the tab.

The steps in detail

Sync

Lists of what exists come from the local catalog, not from OneLake. The local catalog is one SQLite file per account on your machine. The tree, SHOW ALL TABLES and Go To read it.

The local catalog in detail

The servers

DuckDB runs in a separate process. The Node process checks each statement before sending it: it must only read, and every name must resolve to a table.

The server and Keep offline in detail

Excel's XMLA endpoint

Excel talks to a semantic model using XMLA over HTTP, and the Node process answers. Excel sees the model as one cube: each table is a dimension, each column a hierarchy, and each measure is in [Measures].

Excel (MSOLAP) --XMLA over http://127.0.0.1--> Node process
  Discover -> the model's tables, columns and measures, as a cube
  Execute  -> MDX -> model SQL -> dax-sql -> read-only check -> query server

Open in Excel in detail

Export to Fabric

Export to Fabric is the only feature that writes, and it asks before writing anything. It copies the model's file into the lakehouse's Files/ folder and publishes the app with the Fabric REST API.

Export to Fabric in detail

Ports and tokens

Everything listens on 127.0.0.1 only, and every connection needs a token.

WhoHowProtection
WindowHTTP: events from the app, POST requests backThe token from the first request is kept in an HttpOnly, SameSite=Strict cookie. Requests with a different Host or Origin are refused.
Query serverQuack, on a local portEach server gets a new random session token. Without it, the server runs nothing.
ExcelXMLA over HTTPA token in the address. Requests with an Origin header are refused.
Command lineA local pipeNo network port.

Sign-in uses MSAL with the Azure CLI's public client ID, so no app registration is needed. The token cache is encrypted for your Windows user. DuckDB gets the OneLake token as a storage secret.

In VS Code

The parts are the same, except VS Code is the window and its Microsoft account provider does the sign-in. On one machine, the app, the extension and the command line share the local catalog and the cache.

Design decisions and the full reference