How do you test data quality in a Microsoft Fabric Warehouse?

Connect to the warehouse's SQL connection string with an Entra ID service principal or managed identity, profile every table, generate tests from the profile, and run them as T-SQL on a schedule or after each load. DataOps TestGen does this through its Microsoft OneLake connection, read-only, and adds freshness, volume, and schema monitors. Fabric Warehouse doesn't accept SQL logins.

Key points

  • A Fabric Warehouse and a lakehouse SQL analytics endpoint both accept connections over TDS on TCP port 1433 through the workspace's SQL connection string, and both reject SQL authentication, per Microsoft Learn checked November 2026.
  • DataOps TestGen has connected to Microsoft OneLake, including warehouse data, through the Fabric SQL analytics endpoint since version 5.92.1 on August 27, 2026, in open source and Enterprise.
  • TestGen needs an Entra ID service principal or managed identity with Contributor or higher on the Fabric workspace, and for a service principal, the Fabric tenant setting that lets service principals use Fabric APIs.
  • Since May 2026, a Fabric connection without an Initial Catalog lands in master, so name the warehouse in the connection, per Microsoft's Warehouse Connectivity page.
  • TestGen profiles 55 characteristics per column, generates tests from 34 test types, and runs only SELECT statements; results stay in TestGen's own database on your infrastructure.

A Fabric Warehouse is T-SQL on OneLake: tables you create and load with SQL, stored as Delta. Testing it looks a lot like testing SQL Server, with two differences: you sign in with Entra ID, and you pay for the queries in Fabric capacity.

The Fabric and OneLake setup answer covers lakehouses and medallion layouts. This page is the warehouse view.

Connect

From Microsoft’s Warehouse Connectivity page, checked November 3, 2026:

SettingValue
ServerThe workspace’s SQL connection string
Protocol and portTDS over TCP 1433
AuthenticationMicrosoft Entra user or service principal; SQL authentication isn’t supported
DatabaseThe warehouse name. Since May 2026, leaving it out connects you to master
MARSNot supported; leave it off

For an unattended tool, use a service principal or managed identity. The service principal walkthrough has Microsoft’s steps.

What to test

Layer of the warehouseTests that earn their place
Staging tablesRow counts against the source, required columns, valid codes
DimensionsUnique business keys, no duplicate rows, no placeholder values
FactsEvery foreign key found in its dimension, amounts in range, dates recent
Aggregates and reportsTotals that balance against the facts they summarize

Fabric’s type rules matter here too. Warehouse tables store datetime2 and time with at most six fractional digits, varchar instead of nvarchar, and no money type (data types), so tests copied from a SQL Server suite can need new thresholds.

When gold is a Fabric Warehouse

One medallion layout in Fabric keeps bronze and silver in a lakehouse, where Spark or dataflows land and clean the data, and builds gold in a Warehouse with T-SQL. TestGen reads both through the Fabric SQL analytics endpoint, so give each layer its own table group and its own job:

LayerWhere it livesWhat its tests check
BronzeLakehouseThe load arrived: freshness, row counts, schema changes
SilverLakehouseCleaning worked: required values, valid codes, no duplicates, patterns
GoldWarehouseThe model is right: unique dimension keys, every fact key found in its dimension, totals that balance against silver

The gold checks that matter most are the cross-table ones: Reference Match from facts to dimensions, and Aggregate Balance from gold totals back to silver. You configure those; data profiling generates the single-table tests. Run the gold suite from the pipeline right after the Warehouse load, so a failure stops the reports that read it. The OneLake medallion post covers the lakehouse layers in detail.

How DataOps TestGen does it

TestGen reads Fabric through its Microsoft OneLake connection, which uses the Fabric SQL analytics endpoint. TestGen’s docs say that endpoint takes its schema and data from the underlying lakehouse or warehouse. The Access Requirements are an Entra ID service principal or managed identity, Contributor or higher on the workspace, and for a service principal the tenant setting “Service principals can use Fabric APIs.”

  1. Add a Microsoft OneLake connection with the SQL connection string, the warehouse name, and the principal’s credentials. Click Test Connection.
  2. Create a table group for each schema you want to test.
  3. Run data profiling: 55 characteristics per column and 32 hygiene detectors.
  4. Generate tests from 34 test types. Add Reference Match for fact-to-dimension keys and Aggregate Balance for totals.
  5. Turn on freshness, volume, and schema monitors.

TestGen only runs SELECT statements. To run tests right after a load, call TestGen’s REST API from the Fabric or Data Factory pipeline and fail the pipeline on failed tests, as the Data Factory answer shows.

Open source is free for one user, one connection, and one project. Start at the Microsoft Fabric install page.

Frequently asked questions

Short answers to the follow-up questions people ask next.

Is testing a Fabric Warehouse different from testing a lakehouse?

The connection is the same: TDS through the workspace's SQL connection string, with Entra ID. The difference is what's inside. A warehouse holds tables you load with T-SQL, often the gold layer, while a lakehouse endpoint is a read-only view of Delta tables that trails the lakehouse after a Spark write, normally by under a minute, per Microsoft.

Can I use a SQL login to connect a tool to Fabric Warehouse?

No. Microsoft's Warehouse Connectivity page lists SQL authentication as not supported. The SQL connection string accepts Microsoft Entra user identities and service principals. For an unattended tool such as DataOps TestGen, use a service principal or a managed identity.

Which tests make sense on a Fabric Warehouse?

Start with what a profile generates: required values, uniqueness and duplicate rows on keys, valid values, ranges, and date recency. Then add reference checks between facts and dimensions, and aggregate checks that gold totals match silver. Monitors on freshness and volume catch the load that didn't run.

Does testing consume Fabric capacity?

Yes. Every query TestGen sends runs on the warehouse and uses the workspace's Fabric capacity, like any other T-SQL query. Schedule data profiling and test runs after loads rather than continuously, and size monitor schedules at about twice the rate your data changes, as TestGen's monitor docs suggest.

Try it on your own data

DataOps TestGen is free and open source. Profile a table and generate its tests this afternoon.