> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/build/v1/productize/connect-engine/microsoft-fabric.md).

# Microsoft Fabric

Microsoft Fabric Warehouse is a SaaS T-SQL data warehouse built on OneLake, with Entra-ID-only authentication. Use the `fabric` adapter when your organization already standardizes on Fabric for its lakehouse/warehouse estate. This page covers the connection. For materialization internals, catalog lifecycle, and the full reference, see the [Microsoft Fabric engine manual](https://v2.dataos.info/references/engine-guide/microsoft-fabric) in References.

{% hint style="info" %}
The Fabric adapter is a community contribution with limited community support, and it covers the Fabric **Warehouse** SQL endpoint only, not Fabric Lakehouse, OneLake direct access, Direct Lake mode, or Fabric Spark. Validate against your own Fabric capacity before depending on it for critical workloads.
{% endhint %}

## Before you start

* A Fabric workspace with an assigned capacity, and a Fabric Warehouse item (or the ability for Vulcan to create one via the Fabric REST API).
* An Entra ID app registration (service principal) with a workspace role.
* The workspace's `tenant_id` and `workspace_id`. Fabric has no local Docker equivalent, so local development connects to a real (typically dev-tier) workspace.
* DataOS access: a `roles:id:data-dev`-equivalent role tag, `depot:rw:<fabric-depot-name>` (or `depot:r` for read-only), **Can Use** on Compute/Depots/Secrets, and a git-sync Secret.

## Permissions

Three roles, each with a distinct scope: a Fabric workspace admin, the Vulcan service principal, and a consumer role.

| Grant                                              | Required for                                                         |
| -------------------------------------------------- | -------------------------------------------------------------------- |
| **Contributor** workspace role (service principal) | Running models, creating/dropping warehouses via the Fabric REST API |
| SQL endpoint read/write access                     | Model materialization                                                |
| **Viewer** workspace role (consumer)               | Read-only access to Data Product tables                              |

{% hint style="warning" %}
Fabric authorization is separate from DataOS authorization. A DataOS depot grant alone doesn't give the service principal a Fabric workspace role. Both are required.
{% endhint %}

## Connection options

Connect directly with a service principal, or through a [DataOS Depot](#using-a-depot) (recommended for production).

| Option            | Required | Description                                                   |
| ----------------- | :------: | ------------------------------------------------------------- |
| `type`            |    Yes   | Must be `fabric`                                              |
| `host`            |    Yes   | Fabric Warehouse SQL analytics endpoint                       |
| `tenant_id`       |    Yes   | Azure/Entra tenant UUID                                       |
| `workspace_id`    |    Yes   | Fabric workspace UUID                                         |
| `user`            |    No    | Service principal client ID                                   |
| `password`        |    No    | Service principal client secret                               |
| `database`        |    No    | Target warehouse name                                         |
| `driver`          |    No    | Fabric only supports `pyodbc`                                 |
| `odbc_properties` |    No    | For example `authentication: ActiveDirectoryServicePrincipal` |

### Authentication methods

* **Service principal** (only supported method): register an Entra app registration with workspace access, set `user` to the client ID and `password` to the client secret, plus `tenant_id` and `workspace_id`. Set `driver: pyodbc` and `odbc_properties: {authentication: ActiveDirectoryServicePrincipal}`.
* Always inject the client secret from an environment variable: `password: "{{ env_var('FABRIC_CLIENT_SECRET') }}"`.

## Example

```yaml
gateways:
  fabric:
    connection:
      type: fabric
      host: xxxxx.datawarehouse.fabric.microsoft.com
      driver: pyodbc
      driver_name: "ODBC Driver 18 for SQL Server"
      odbc_properties:
        authentication: ActiveDirectoryServicePrincipal
      user: "{{ env_var('FABRIC_CLIENT_ID') }}"
      password: "{{ env_var('FABRIC_CLIENT_SECRET') }}"
      tenant_id: "{{ env_var('FABRIC_TENANT_ID') }}"
      workspace_id: "{{ env_var('FABRIC_WORKSPACE_ID') }}"
      database: warehouse
```

### Using a Depot

```yaml
gateways:
  default:
    connection:
      type: depot
      address: dataos://<fabric-depot-name>?purpose=rw
```

## Supported model kinds

`FULL`, `SEED`, `VIEW`, `INCREMENTAL_BY_TIME_RANGE`, `INCREMENTAL_BY_UNIQUE_KEY`, `INCREMENTAL_BY_PARTITION`, `INCREMENTAL_UNMANAGED`, `SCD_TYPE_2`, `SCD_TYPE_2_BY_TIME`, `SCD_TYPE_2_BY_COLUMN`, and `EMBEDDED`, inherited from the MSSQL adapter this engine subclasses. Table cloning, and native indexes aren't supported. For how each kind materializes, see the [Microsoft Fabric engine manual](https://v2.dataos.info/references/engine-guide/microsoft-fabric).

> Fabric Warehouse has no explicit transactions and no native indexes: time-range and partition overwrites run as separate `DELETE` + `INSERT` statements, so avoid overlapping schedules (`concurrency_policy: Forbid`). Warehouse creation and deletion run through the async Fabric REST API rather than synchronous DDL.

Once `vulcan info` succeeds, continue to [Assets](/build/v1/productize/assets.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/build/v1/productize/connect-engine/microsoft-fabric.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
