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

# Migrate from Sigma

> Convert your Sigma data models and workbook logic into governed Malloy semantic models

Sigma centralizes business logic in **data models** — but in practice, much of the real logic lives in spreadsheet-style formulas scattered across workbooks. Credible reads both, consolidates the duplication, and rebuilds a single governed Malloy model your whole organization can query consistently.

## What Credible Reads

Your Sigma **data models** (Sigma's first-class semantic layer, which supersedes the older datasets), plus the calculated columns and metrics embedded in workbooks — exportable as code (JSON, or YAML via `?format=yaml`). The agent works from that export. Connecting Sigma's **MCP server** (OAuth, permission-inherited) or REST API is optional: it lets the agent search across data models *and* workbook elements to find logic that never made it into the central model, and validate the result.

## What Comes Across

The everyday modeling carries over. Here's how the bigger pieces land — and where they get better:

| In Sigma                        | In Credible                                                                                        |
| ------------------------------- | -------------------------------------------------------------------------------------------------- |
| Data models                     | Malloy **sources**; `import`/`export` curate exposure                                              |
| Columns, metrics, relationships | Carried over as dimensions, measures, and joins                                                    |
| Workbook spreadsheet formulas   | Consolidated into one source of truth — not the same metric redefined differently in each workbook |
| Workbook permissions            | **Fine-grained access control in the model**, versioned and enforced on every surface              |
| Descriptions                    | `#(doc)` / `#(index)`, indexed by the [Context Engine](/how-to/analyzing/overview)                 |
| Workbooks & dashboards          | Rebuilt as [data apps](/how-to/analyzing/data-apps) or [notebooks](/how-to/analyzing/workspaces)   |

## The Migration Flow

Credible [reads](/how-to/migrating/overview) the data model and crawls workbook elements for embedded logic, translates tables to sources and formulas to dimensions/measures, enriches with `#(doc)`/`#(index)` tags, and — where you connect it — validates results against Sigma's query engine.

## What Credible Handles

* **Workbook-embedded logic** is the classic Sigma trap: the true definitions are often spreadsheet formulas duplicated across many workbooks, not the central model. Credible finds them, reconciles the drift, and hoists a single canonical definition into the Malloy source.
* **Spreadsheet-formula semantics** (Excel-like functions, row-level vs. aggregate context) are re-expressed as Malloy dimensions and measures, preserving whether each ran per-row or grouped.
* **External semantic layers** — if a workbook reads dbt Semantic Layer metrics or Snowflake semantic views through Sigma, the logic lives upstream; Credible migrates the [upstream](/how-to/migrating/dbt) [definitions](/how-to/migrating/snowflake), not the passthrough.

## Before & After

A Sigma data model as code:

```json theme={"languages":{"custom":["/languages/motly.tmGrammar.json","/languages/malloy.tmGrammar.json"]}}
{
  "name": "Orders Model",
  "columns": [
    { "name": "Status", "formula": "[ORDERS/order_status]",
      "description": "Current fulfillment status of the order" },
    { "name": "Order Size",
      "formula": "If([Amount] >= 100, \"large\", [Amount] >= 20, \"medium\", \"small\")" }
  ],
  "metrics": [
    { "name": "Total Revenue", "formula": "Sum([Amount])",
      "format": { "type": "currency" } },
    { "name": "Cancelled Orders", "formula": "SumIf(1, [Status] = \"cancelled\")" },
    { "name": "Cancellation Rate",
      "formula": "Divide([Cancelled Orders], Count([Order Id])) * 100",
      "format": { "type": "percent" } }
  ],
  "relationships": [
    { "kind": "many-to-one", "target": { "path": ["SALES","PUBLIC","CUSTOMERS"] },
      "on": "[ORDERS/customer_id] = [CUSTOMERS/customer_id]" }
  ]
}
```

```malloy theme={"languages":{"custom":["/languages/motly.tmGrammar.json","/languages/malloy.tmGrammar.json"]}}
source: orders is conn.table('sales.orders') extend {
  primary_key: order_id
  join_one: customers is conn.table('sales.customers') on customer_id

  dimension:
    #(doc) Current fulfillment status of the order
    #(index)
    status is order_status

    #(doc) Order size bucket derived from amount
    order_size is
      pick 'large' when amount >= 100
      pick 'medium' when amount >= 20
      else 'small'

  measure:
    #(doc) Total revenue in USD
    # currency
    total_revenue is sum(amount)

    #(doc) Orders that were cancelled
    cancelled_orders is count() { where: status = 'cancelled' }

    #(doc) Percentage of orders that were cancelled
    # percent
    cancellation_rate is cancelled_orders / count() * 100

  view:
    #(doc) Monthly revenue trend
    monthly_revenue is {
      group_by: created_at.month
      aggregate: total_revenue
    }
}
```

<Note>
  Sigma's code representation doesn't cover every construct (input tables, Python elements, and some data-source-level metrics live outside it), so Credible supplements the model-as-code export with workbook and element inspection to capture the full picture.
</Note>

**More than a reformat.** Logic that was duplicated across workbooks becomes one governed, AI-discoverable source of truth that serves every surface, not just Sigma. [See what you gain →](/how-to/migrating/overview#more-than-a-reformat)

## Next Steps

<CardGroup cols={2}>
  <Card title="Migration Overview" icon="diagram-project" color="#5C7A93" href="/how-to/migrating/overview">
    The method behind every migration
  </Card>

  <Card title="Metadata & Discovery" icon="tags" color="#94793A" href="/how-to/modeling/metadata-tags">
    Tune your migrated model for AI retrieval
  </Card>
</CardGroup>
