> ## Documentation Index
> Fetch the complete documentation index at: https://docs.get3rd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Fabric

> Sync your 3RD visibility, citation, competitor and sentiment data into a mirrored database in your Microsoft Fabric workspace every day.

The Microsoft Fabric integration writes 3RD's **Export API datasets** into a mirrored database in your Fabric workspace and refreshes them every day. Query them from the mirrored database's SQL analytics endpoint, in notebooks, or in Power BI next to the rest of your marketing data.

It runs on the same data as the [Export API](https://docs.get3rd.com/api-reference/introduction.md), so the numbers match the API and the 3RD dashboard.

> [!NOTE]
>
> The sync is available on plans that include the Export API.

## How it works

3RD uses Fabric **open mirroring**. You create a mirrored database. 3RD writes files to that database's landing zone in OneLake, and Fabric turns them into Delta tables within a few minutes. Replication runs on your capacity at no extra compute cost, and mirrored storage is free up to your capacity's allowance.

## What you need

* A Fabric workspace on a running capacity (F SKU or trial).
* Someone who can create an **app registration** in Microsoft Entra ID.
* A **Fabric administrator** to allow service principals, if your tenant doesn't already.
* The owner or admin role in your 3RD organization.

## Set it up

**1. Register an app in Microsoft Entra ID**

In the Azure portal, go to **Microsoft Entra ID → App registrations → New registration** and create an app, for example `3RD sync`. On its **Certificates & secrets** page, create a **client secret**.

Note three values: the **Directory (tenant) ID** and **Application (client) ID** from the app's **Overview** page, and the secret's **Value**. You can't see the secret's value again after you leave the page.

**2. Let service principals use Fabric**

A Fabric administrator opens **Admin portal → Tenant settings → Developer settings** and turns on **Service principals can use Fabric APIs**. They can turn it on for the whole tenant or for a security group; with a group, add your app to it.

**3. Create a mirrored database**

In your workspace, select **New item → Mirrored database** and choose **open mirroring**. Name it, for example `3RD`, and create it. On its **Home** page, copy the **landing zone URL**.

**4. Give the app access to the workspace**

In the workspace, open **Manage access**, add your app by name, and give it the **Contributor** role.

**5. Connect in 3RD**

Go to **Brand → Integrations**, and under **Reporting** open **Microsoft Fabric**. Paste the landing zone URL, tenant ID, application ID and client secret, then click **Connect**.

**6. Test the connection**

Click **Test connection**. 3RD signs in as your app and writes and deletes a test file in the landing zone. When the test passes, 3RD starts loading your history. If it fails, the message tells you which step to fix. See [Troubleshooting](#troubleshooting).

> [!TIP]
>
> Under **What to sync**, untick any tables or brands you don't want. Changes apply from the next sync.

## Security

* **Your app, your control.** 3RD signs in as the app registration you created. Delete its secret or remove it from the workspace, and 3RD loses access.
* **Encrypted secret.** 3RD stores the client secret encrypted and only ever shows its last four characters.
* **Write-only.** 3RD writes files to the mirrored database's landing zone. It doesn't read your other data.

To rotate the secret, create a new one on the app registration, click **Change details** in 3RD, paste it and save, then delete the old secret.

## Tables

Each dataset becomes one table in the mirrored database. Column names are the Export API field names in upper case; see the [Export API reference](https://docs.get3rd.com/api-reference/introduction.md) for what each field means.

| Table | Source | One row per |
| - | - | - |
| `BRANDS` | `/brands` | Brand |
| `VISIBILITY_DAILY` | `/visibility` | Date × model × provider × market |
| `CITATIONS_DAILY` | `/citations` | Date × cited URL |
| `COMPETITORS_DAILY` | `/competitors` | Date × competitor |
| `CITATION_SHARE_DAILY` | `/citation-share` | Date × cited URL |
| `RECOMMENDED_RATE_DAILY` | `/recommended-rate` | Date × brand or competitor |
| `SENTIMENT_DAILY` | `/sentiment` | Date |
| `THIRD_SYNC_RUNS` | — | Sync run, with rows written and status |

Every table also has `ROW_KEY`, the key Fabric uses to update a row. Every dated table has `BRAND_ID`, which joins to `BRANDS.ID`, and `_SYNCED_AT`, the time the row was written.

## How the sync works

* **Daily refresh.** Each run reloads the **last 7 days**, because AI answers for recent days can still arrive. Rows for those days are updated in place.
* **Rows aren't deleted.** If a row for a reloaded day no longer exists in 3RD, for example because every answer behind it was removed, it stays in Fabric. This is rare. **Reload history** doesn't remove such rows either.
* **History.** The first sync goes back as far as your plan's Export API history allows, up to two years. See [Pagination and history](https://docs.get3rd.com/api-reference/pagination.md).
* **New columns.** When 3RD adds a field to the Export API, Fabric can't add a column to an open-mirroring table in place. 3RD drops that table and loads it again with its whole history on the next sync, so the table is briefly missing.
* **Sync now.** Click **Sync now** in settings to run a sync outside the daily schedule, or **Reload history** to load your whole history again.

Check freshness from the SQL analytics endpoint:

```sql theme={null}
SELECT DATASET, MAX(FINISHED_AT) AS last_success
FROM THIRD_SYNC_RUNS
WHERE STATUS = 'success'
GROUP BY DATASET;
```

## Example query

Weekly visibility per AI model for one brand:

```sql theme={null}
SELECT
  DATETRUNC(week, v.DATE) AS week,
  v.MODEL_ID,
  SUM(v.VISIBLE_COUNT) * 100.0 / NULLIF(SUM(v.TOTAL_PROMPTS), 0) AS visibility_rate
FROM VISIBILITY_DAILY v
JOIN BRANDS b ON b.ID = v.BRAND_ID
WHERE b.NAME = 'Acme'
GROUP BY DATETRUNC(week, v.DATE), v.MODEL_ID
ORDER BY week, v.MODEL_ID;
```

Sum the counts and divide, rather than averaging `VISIBILITY_RATE`: a day with more answers should weigh more.

## Manage the connection

* **Change details.** Update the client secret, the app or the landing zone in settings. Test the connection again afterwards.
* **Disconnect.** Click **Disconnect**. 3RD deletes its copy of the secret and stops syncing. Your mirrored database and its tables stay. Delete the client secret in Microsoft Entra ID, and remove the app from the workspace if nothing else uses it.
* **Plan changes.** If your plan no longer includes the Export API, syncing stops and your tables stay as they were.

## Troubleshooting

| Message in 3RD | What to check |
| - | - |
| Sign-in rejected | The application (client) ID, and that you pasted the secret's **Value**, not its ID, and it hasn't expired. |
| Tenant, workspace or mirrored database not found | The tenant ID, and that the landing zone URL is the one on the mirrored database's Home page. |
| The app can't write to the workspace | The app is a **Contributor** on the workspace, and **Service principals can use Fabric APIs** is on for it. |
| Fabric couldn't take the data | The workspace's capacity is running, not paused. |

If 3RD shows a successful sync but a table is missing or stale in Fabric, open the mirrored database's **Monitor replication** page. It shows each table's status and any error.

## Related

* [Export API](https://docs.get3rd.com/api-reference/introduction.md) — the endpoints and fields behind the tables
* [Snowflake](https://docs.get3rd.com/integrations/snowflake.md) — the same data in Snowflake
* [Looker Studio connector](https://docs.get3rd.com/integrations/looker-studio.md) — the same data in Looker Studio
* [Metrics at a glance](https://docs.get3rd.com/metrics/overview.md) — what each metric means


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.