# Microsoft Fabric

Microsoft Fabric is a unified analytics platform that combines data warehousing and analytics services. As a development environment in Paradime, Microsoft Fabric enables dbt™️ development from Paradime's **Code IDE**.

{% hint style="warning" %}
**IP RESTRICTIONS**

Make sure to allow traffic from one of the Paradime IPs in your firewall depending on the data location selected.

👉 See also: [Paradime IP addresses](https://docs.paradime.io/app-help/developers/ip-restrictions).
{% endhint %}

### Authentication Methods

Microsoft Fabric uses Microsoft Entra ID (formerly Azure AD) as its primary authentication system. Set `authentication` to one of these values:

* `ActiveDirectoryPassword` - Microsoft Entra ID username and Password
* `ServicePrincipal` - Service Principal Authentication

### Setup Instructions

1. Click **Settings** in the top menu bar of the Paradime interface to access **Account Settings**
2. In the left sidebar, click "**Connections**"
3. Click "**Add New**" next to the Code IDE section
4. Select "**Microsoft Fabric**"
5. In the **Profile Configuration** field, add the following parameters based on your authentication method. Reference the [**Profile Fields Reference**](#profile-fields-reference) section below for additional context and configurations:

{% tabs %}
{% tab title="Microsoft Entra ID username and Password" %}

#### Microsoft Entra ID username and Password

```yaml
driver: 'ODBC Driver 18 for SQL Server'    # ODBC driver name
server: fabric.analytics.com             # Server hostname
port: 1433                              # Default port
database: analytics_db                   # Database name
schema: reporting                        # Schema name
authentication: ActiveDirectoryPassword  # Password authentication
user: user@company.com                   # User email
password: your_password                  # User password
```

{% endtab %}

{% tab title="Service Principal" %}

#### Service Principal

**Configuration Parameters**

```yaml
driver: 'ODBC Driver 18 for SQL Server'    # ODBC Driver for SQL Server
server: fabric.analytics.com               # Server hostname or IP address
port: 1433                                 # Server port number
database: analytics_db                     # Database name
schema: reporting                          # Schema name
authentication: ServicePrincipal           # Authentication method
tenant_id: your_tenant_id                  # Microsoft Entra tenant ID
client_id: your_client_id                  # Application (client) ID
client_secret: your_client_secret          # Client secret value
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
After adding the configuration, ensure it's properly formatted using a YAML formatter like [YAML Formatter](https://jsonformatter.org/yaml-formatter).
{% endhint %}

6. Provide a dbt™ **Profile Name** (This should match with the profile name set in your `dbt_project.yml`).
7. In the **Target** field, enter "**dev**". This is the default target your dbt project will use for development work.
8. The "**Schema**" field is pre-configured, but you can change it to specify the schema where dbt will build objects.
9. The "**Threads**" value is pre-configured to 1, but you can adjust this number to specify how many parallel operations your dbt project can run.

***

### Example Profile Configuration

<figure><img src="https://2337193041-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHET0AD04uHMgdeLAjptq%2Fuploads%2Ff9e1WhsZt3TwxJtarUYc%2Fimage.png?alt=media&#x26;token=69a91946-21eb-4bb2-a055-cd6b74b3ab09" alt=""><figcaption><p>Profile configuration example is for "Microsoft Entra ID username and Password"</p></figcaption></figure>

***

### Schema Authorization

When creating schemas in Microsoft Fabric, you can control who owns them. Here's what you need to know:

* Schema ownership is defined using the [AUTHORIZATION Argument](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-schema-transact-sql?view=sql-server-ver16#arguments). The syntax follows this pattern:

```sql
CREATE SCHEMA [schema_name] AUTHORIZATION [schema_authorization]
```

* Useful for managing permissions in Microsoft Entra ID environments
* Recommended when working with group-based permissions

***

### Profile Fields Reference

<table><thead><tr><th width="178">Field</th><th width="192">Description</th><th width="147">Example</th><th width="128">Default</th><th width="121">Required</th></tr></thead><tbody><tr><td>driver</td><td>OBDC driver</td><td><code>ODBC Driver 18 for SQL Server</code></td><td><code>ODBC Driver 18 for SQL Server</code></td><td>✅</td></tr><tr><td>host</td><td>SQL analytics endpoint</td><td><code>localhost</code></td><td>None</td><td>❌</td></tr><tr><td>port</td><td>Server port number</td><td><code>1433</code></td><td><code>1433</code></td><td>✅</td></tr><tr><td>database</td><td>Database name</td><td><code>analytics_db</code></td><td>None</td><td>✅</td></tr><tr><td>schema</td><td>Schema name.<br><br>This is configured in the UI "Schema" field</td><td><code>dbo</code></td><td><code>dbo</code></td><td>✅</td></tr><tr><td>authentication</td><td>Authentication method</td><td><code>sql</code></td><td><code>sql</code></td><td>✅</td></tr><tr><td>retries</td><td>Number of connections retry attempts</td><td><code>1</code></td><td><code>1</code></td><td>❌</td></tr><tr><td>encrypt</td><td>Enable connection encryption</td><td><code>true</code></td><td><code>true</code></td><td>❌</td></tr><tr><td>trust_cert</td><td>Trust server certificate</td><td><code>false</code></td><td><code>false</code></td><td>❌</td></tr><tr><td>login_timeout</td><td>Connection timeout in seconds</td><td><code>0</code></td><td><code>0</code></td><td>❌</td></tr><tr><td>query_timeout</td><td>Query timeout in seconds</td><td><code>0</code></td><td><code>0</code></td><td>❌</td></tr><tr><td>schema_authorization</td><td>Schema owner principal</td><td>db_owner</td><td>None</td><td>❌</td></tr><tr><td>UID</td><td>Username for authentication (when required)</td><td>fabric_user</td><td>None</td><td>❌</td></tr><tr><td>PWD</td><td>Password for authentication (when required)</td><td>your_password</td><td>None</td><td>❌</td></tr><tr><td>tenant_id</td><td>Microsoft Entra ID tenant ID (for service principal)</td><td>your_tenant_id</td><td>None</td><td>❌</td></tr><tr><td>client_id</td><td>Microsoft Entra service principal client ID</td><td>your_client_id</td><td>None</td><td>❌</td></tr><tr><td>client_secret</td><td>Microsoft Entra service principal client secret</td><td>your_client_secret</td><td>None</td><td>❌</td></tr></tbody></table>
