Synapse Migration
MicrosoftOfficialPublished by Microsoft
- Skill
- Workflow
- Software development
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The synapse-migration skill provides a structured, phased workflow for transitioning Synapse Analytics workspaces to Microsoft Fabric. It covers the migration of Spark items, Lake Databases, Linked Services, and Dedicated SQL Pool schema and stored procedures. The skill emphasizes a dependency-ordered approach, requiring gap assessment and explicit approval before conversion. It distinguishes between migrating to a Fabric Lakehouse (schema and code only, no data movement) and a Fabric Warehouse, while providing specific routing for dependent pipeline callers.
What it does
- Discovers and classifies Synapse workspace artifacts.
- Converts Dedicated SQL Pool schema and stored procedures to Spark SQL notebooks or Warehouse objects.
- Migrates Spark items, including notebooks and Spark Job Definitions, to Fabric equivalents.
- Maps Linked Services to Fabric Data Connections or OneLake Shortcuts.
- Manages the migration of approved dependent pipeline callers.
- Validates persisted definitions and artifacts against established contracts.
When to use it
- When migrating a full Synapse workspace to Microsoft Fabric.
- When converting Dedicated SQL Pool schema and procedures to a Lakehouse or Warehouse.
- When porting Spark pools, notebooks, or Spark Job Definitions to Fabric.
- When replacing Synapse Linked Services with Fabric-native connectivity.
Advantages
- Ensures dependency-ordered migration to maintain system integrity.
- Provides clear routing for different workload types (Lakehouse vs. Warehouse).
- Enforces strict validation and approval gates for behavior-changing decisions.
- Supports incremental migration rather than high-risk big-bang cutovers.
- Standardizes the conversion of T-SQL procedures to executable Spark SQL notebooks.
Usage examples
- “Migrate this Dedicated SQL Pool DACPAC to a Fabric Lakehouse and convert the procedures.”
- The agent will assess gaps, obtain approval for procedure-to-notebook mappings, create a migration manifest, convert schema/code artifacts, and validate the results.
- “Migrate this Dedicated SQL Pool to Fabric Warehouse.”
- The agent will assess DDL compatibility, remove unsupported distribution/index declarations, obtain provisioning consent, and prepare for potential data migration.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/synapse-migration/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip synapse-migration.zip -d .agents/skills
Documentation by Microsoft
Telemetry — MANDATORY. Every
api.fabric.microsoft.comcall must carryx-ms-fabric-skill: synapse-migration(az rest:--headers "x-ms-fabric-skill=synapse-migration"), including every LRO poll,fabric_lroand retry. Snippets omit it — add it anyway.
OFFLINE LAKEHOUSE ARTIFACT FAST PATH — DECIDE FIRST. For a no-live-call request with complete supplied inputs and contracts, load only the fast path; do not load
migration-planning-reference.md,dedicated-pool-conversion.md, or implementation scripts. Use one generator for artifacts and final-byte hashes, then one verifier. Do not inspect generated files or run post-pass spot checks. For every optional non-null source default, setmissingValueBehaviortoUseSourceDefaultand restore that default before validation. Do not use this path for a Warehouse target; incomplete and large-procedure requests use their own routes.
CRITICAL NOTES
To find workspace details (including its ID) from a workspace name: list all workspaces, then use JMESPath filtering.
To find item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace, then use JMESPath filtering.
Treat a source Dedicated SQL Pool as read-only. Do not run source DDL, DML, stored procedures, or create sample objects.
Dedicated Pool-to-Lakehouse data movement is out of scope. Migrate schema and executable code artifacts only; do not copy source rows or run row-level/business-result equivalence queries. The separate Warehouse route may move data only from a separately approved restored export copy under its own consent gate and restored-source contract.
For Dedicated Pool-to-Lakehouse requests, complete gap assessment, explicit mapping approval, manifest creation, conversion, deployment, and validation in order. Read dedicated-pool-to-lakehouse.md once as the router, then load only the current phase reference.
Stored-procedure
1:1,N:1, andN:Nmappings never apply to views. Views remain schema objects; procedures become traceable Spark SQL notebooks with executable%%sqltransformation cells.Dependent ADF/Synapse callers are conditional scope, not automatic scope. Discover them during assessment, require a separate complete-closure approval, and migrate them only after notebook readiness. Route standalone pipeline requests to
pipeline-migration.Before executing a specialized Dedicated Pool workflow, read the matching contract in dedicated-pool-execution-contracts.md. Its validation, hashing, request-body, resume, and completion-language requirements are mandatory.
Keep Lakehouse and Warehouse paths separate. If the target is unclear, ask before loading path-specific resources. Lakehouse conversion never moves source rows; Warehouse data migration requires its own explicit consent gate and restored-source contract.
For a Fabric Warehouse target, explicitly state that the complete
DISTRIBUTIONandCLUSTERED COLUMNSTORE INDEXdeclarations are removed because Fabric manages distribution, storage, and indexing; a bare mention of either source clause is insufficient.Run setup DDL and CETAS only against the separately approved restored export copy after proving it is not the original production source.
Synapse Analytics to Microsoft Fabric Migration
Core Workflow
Discover the Synapse workspace and classify every source artifact.
Choose targets using workload-routing.md.
Assess gaps before conversion, including runtime, library, connectivity, T-SQL, security, and capacity constraints.
Obtain approval for behavior-changing decisions, target placement, and every stored-procedure-to-notebook mapping.
Create or update
migration-manifest.jsonand persist approval, per-object status, hashes, and checkpoints atomically.Convert and deploy in dependency order, loading only the current phase resource.
Validate persisted definitions and artifacts without executing generated notebooks or pipelines unless a separately approved workflow explicitly requires execution.
Report completed, blocked, skipped, and pending objects without exposing credentials or sensitive values.
For full-workspace orchestration, read migration-orchestrator.md. For a Dedicated Pool-to-Lakehouse migration, use dedicated-pool-to-lakehouse.md as the phase router. For a Warehouse target, load only the matching dw-* resource.
Scope Routing
| Request | Action | Load |
|---|---|---|
| Full Synapse workspace migration | Run phased discovery and migration | migration-orchestrator.md |
| Dedicated SQL Pool schema/code to Lakehouse | Run the strict assessment-to-validation workflow. For guidance-only notebook publication, explicitly state: "The stored procedures were converted from T-SQL to Spark SQL before publication." | dedicated-pool-to-lakehouse.md |
| Guidance-only Dedicated Pool incremental deployment hardening | Answer directly from the focused checklist; do not search scripts or load phase resources. State: "For columns with special characters, enable Delta columnMapping selectively and only with approval." | dedicated-pool-execution-contracts.md |
| Large or complex stored procedure | For a complete offline contract, read only the audit resource once, use one run-local generator and one verifier, do not inspect implementation scripts or generated outputs, and stop after successful verification | dedicated-pool-large-procedure-audit.md |
| Spark pool | Convert configuration and libraries to a Fabric Environment | spark-pool-migration.md |
| Lake Database or HMS | Create or bind the target Lakehouse | lake-database-migration.md or external-hms-migration.md |
| Notebook or Spark Job Definition | Port code, bindings, parameters, and runtime settings | spark-item-migration.md |
| Linked Service | Choose a Fabric Data Connection for external services or a OneLake Shortcut for ADLS Gen2/Blob | connectivity-migration.md |
| Approved dependent procedure callers | Run the internal closure-preserving sub-flow after notebook readback | dedicated-pool-dependent-pipelines.md |
| Standalone pipeline migration | Delegate | pipeline-migration |
| Dedicated SQL Pool to Fabric Warehouse | Run the source extraction, DDL compatibility, approval, optional data, security, and validation route | dw-source-and-extraction.md, then the matching dw-* phase resource |
| Standalone Fabric Warehouse administration | Delegate | sqldw-cli |
| Synapse Link | Use Fabric Mirroring; not covered here | — |
Always report the Lake Database/HMS phase. If none is discovered, mark it NotApplicable (none discovered) while retaining the required target Lakehouse binding.
Load References On Demand
Do not preload all files. Load only the references needed for the current phase:
| Need | Reference |
|---|---|
| Routing, phase order, API audiences, quick examples, troubleshooting, or post-migration handoff | workload-routing.md |
| Dedicated Pool execution variants and response contracts | dedicated-pool-execution-contracts.md |
| Dedicated Pool discovery | dedicated-pool-discovery.md |
| Gap assessment and mapping approval | dedicated-pool-gap-assessment.md |
| Procedure conversion and notebook shape | dedicated-pool-conversion.md |
| Schema/notebook deployment | dedicated-pool-deployment.md |
| Dedicated Pool validation | dedicated-pool-validation.md |
| Runtime/library compatibility | feature-parity.md and library-compatibility.md |
mssparkutils and connector refactoring | utility-api-mapping.md, connector-refactoring.md, and code-patterns.md |
| Capacity planning | capacity-sizing.md |
| Dedicated Pool-to-Warehouse source discovery and extraction | dw-source-and-extraction.md |
| Warehouse DDL compatibility and deployment | dw-ddl-compatibility.md |
| Separately approved Warehouse data migration | dw-data-migration.md |
| Warehouse security and validation | dw-security-validation.md |
| Validation, reporting, and production readiness | validation-testing.md, migration-report.md, and security-governance.md |
Use COMMON-CLI.md only for shared authentication and az rest mechanics not already covered by the phase resource. Use COMMON-CORE.md only for shared Fabric REST patterns.
Must
Preserve every stored-procedure input contract, source default, source decision, and approved target mapping.
Block conversion until gap dispositions, notebook names, dependency grouping, and target workspace placement are explicitly approved.
Use SqlPackage/DMVs for source discovery, Fabric REST for item management, and Fabric Livy statements for Lakehouse schema and Delta execution.
Run the maintained validators required by the selected execution contract; never replace them with ad hoc JSON or cell-shape checks.
Choose the Lakehouse or Warehouse target before loading implementation resources; never apply Warehouse data-movement rules to Lakehouse artifact conversion.
Before persisting any dependent-pipeline source definition, recursively inspect it for secret-bearing or uncertain properties; block the complete selected closure without writing the artifact or mutating a target when any are found.
In every dependent-pipeline response, including guidance-only and pre-approval explanations, state: "Use a
TridentNotebookactivity with exact target identitiestypeProperties.notebookIdandtypeProperties.workspaceId, and pass inputs throughtypeProperties.notebookParameters." Then state: "After deployment, read back each pipeline withPOST /v1/workspaces/{workspaceId}/items/{dataPipelineId}/getDefinitionand validate its canonical hash and structural bindings."For every Linked Service response, first state both replacement classes: Fabric Data Connections for external databases/services and OneLake Shortcuts for ADLS Gen2/Blob storage; then identify which class applies.
Replace
mssparkutilswithnotebookutils, Linked Services with the correct Fabric connection class, andspark.read.synapsesql()with a supported OneLake or JDBC pattern.Externalize workspace and item IDs through parameters or Variable Libraries.
Keep phase status concise, emit bounded heartbeats for long operations, and persist per-object evidence in the manifest.
Prefer
OneLake Shortcuts over copying data.
Fabric Environments for reproducible libraries and Spark settings.
Incremental, dependency-ordered migration over big-bang cutover.
Parameterized notebooks and Variable Libraries for environment promotion.
Lakehouse SQL Endpoint for compatible Serverless SQL Pool read workloads.
Avoid
Do not execute generated notebooks or pipelines as part of artifact migration.
Do not broaden a selected dependent-pipeline closure or route that internal sub-flow to
pipeline-migration.Do not use
sqlcmdagainst the target Fabric Warehouse; use the registered SQL endpoint tooling required by the Warehouse resource.Do not preserve Synapse distribution/storage hints, PolyBase DDL, Linked Service connection strings, or pool-level library installation patterns verbatim.
Do not use target notebooks to orchestrate the migration itself.
Do not hardcode workspace IDs, item IDs, credentials, connection strings, or environment-specific paths.
Examples
Prompt: "Migrate this Dedicated SQL Pool DACPAC to a Fabric Lakehouse and convert the procedures."
Response behavior: Assess gaps first, present and obtain approval for the complete procedure-to-notebook mapping and workspace placement, create the manifest, convert approved schema/code artifacts without moving source rows, validate persisted definitions, and report the resolved Lakehouse and artifact evidence.
Prompt: "Migrate this ADF pipeline to Fabric."
Response behavior: Route to pipeline-migration. Keep it here only when the pipeline is an explicitly approved dependent caller discovered inside an active Dedicated Pool-to-Lakehouse migration.
Prompt: "Migrate this Dedicated SQL Pool to Fabric Warehouse."
Response behavior: Keep this inside synapse-migration, assess DDL compatibility, remove unsupported distribution and columnstore declarations, obtain provisioning consent, and ask separately before any restored-source data migration.
For code transformations and edge cases, load workload-routing.md and the phase-specific resource rather than expanding the main instructions.
Files
- ATTRIBUTION.mdAdded by AutoGineer879 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md14.3 KiB
- apm.yml597 B
- references/dedicated-pool-execution-contracts.md14.5 KiB
- references/workload-routing.md6.0 KiB
- resources/capacity-sizing.md4.1 KiB
- resources/code-patterns.md8.4 KiB
- resources/connectivity-migration.md6.4 KiB
- resources/connector-refactoring.md13.8 KiB
- resources/dedicated-pool-conversion.md39.2 KiB
- resources/dedicated-pool-dependent-pipelines.md23.3 KiB
- resources/dedicated-pool-deployment.md20.0 KiB
- resources/dedicated-pool-discovery.md17.8 KiB
- resources/dedicated-pool-gap-assessment.md17.4 KiB
- resources/dedicated-pool-large-procedure-audit.md24.5 KiB
- resources/dedicated-pool-to-lakehouse.md17.9 KiB
- resources/dedicated-pool-validation.md17.2 KiB
- resources/dw-data-migration.md13.7 KiB
- resources/dw-ddl-compatibility.md9.4 KiB
- resources/dw-security-validation.md15.6 KiB
- resources/dw-source-and-extraction.md8.0 KiB
- resources/external-hms-migration.md20.2 KiB
- resources/feature-parity.md5.4 KiB
- resources/lake-database-migration.md34.8 KiB
- resources/library-compatibility.md7.2 KiB
- resources/migration-gotchas.md16.1 KiB
- resources/migration-orchestrator.md63.0 KiB
- resources/migration-planning-reference.md16.3 KiB
- resources/migration-report.md16.9 KiB
- resources/security-governance.md47.4 KiB
- resources/spark-item-migration.md19.2 KiB
- resources/spark-pool-migration.md16.3 KiB
- resources/utility-api-mapping.md5.4 KiB
- resources/validation-testing.md14.5 KiB
- scripts/Invoke-DedicatedPoolTool.ps1Script941 B
- scripts/dedicated-pool-tool/DedicatedPoolMessageSanitizer.csScript2.1 KiB
- scripts/dedicated-pool-tool/DedicatedPoolTool.csproj346 B
- scripts/dedicated-pool-tool/Program.csScript31.4 KiB
- scripts/dedicated_pool_runtime.pyScript116.9 KiB
- scripts/validate_dedicated_pool_spark.pyScript24.8 KiB
resources/migration-report.md
Migration Report — Synapse → Fabric
Generate a comprehensive post-migration report with clickable links to every migrated item in the Fabric portal.
Fabric Portal URL Patterns
All Fabric portal links use base URL https://app.fabric.microsoft.com.
Workspace Link
https://app.fabric.microsoft.com/groups/{workspaceId}Item Links by Type
| Item Type | Portal URL |
|---|---|
| Lakehouse | https://app.fabric.microsoft.com/groups/{workspaceId}/lakehouses/{itemId} |
| Notebook | https://app.fabric.microsoft.com/groups/{workspaceId}/synapse/notebooks/{itemId} |
| Spark Job Definition | https://app.fabric.microsoft.com/groups/{workspaceId}/synapse/sparkjobdefinitions/{itemId} |
| Environment | https://app.fabric.microsoft.com/groups/{workspaceId}/environments/{itemId} |
The
workspaceIdanditemIdare the GUIDs returned by the Fabric REST API when creating items.
Collecting Item IDs for the Report
During each migration phase, capture the item id from the Fabric REST API response.
From Item Creation (POST response)
// POST /v1/workspaces/{workspaceId}/items → 201/202
{
"id": "5b218778-e7a5-4d73-8187-f10824047715", // ← capture this
"displayName": "MyNotebook",
"type": "Notebook",
"workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}From Item List (if IDs weren't captured during creation)
GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items?type={itemType}Filter by displayName to find the item ID. Item types: Lakehouse, Notebook, SparkJobDefinition, Environment.
Report Generation Script
Run this after all migration phases are complete. It queries the Fabric workspace and produces a Markdown report with clickable links.
import requests, json
from datetime import datetime, timezone
# --- Configuration ---
FABRIC_TOKEN = "<your-fabric-token>" # az account get-access-token --resource https://api.fabric.microsoft.com
WORKSPACE_ID = "<your-fabric-workspace-id>"
SYNAPSE_WORKSPACE_NAME = "<your-synapse-workspace-name>"
BASE_URL = "https://api.fabric.microsoft.com/v1"
PORTAL_URL = "https://app.fabric.microsoft.com"
headers = {"Authorization": f"Bearer {FABRIC_TOKEN}"}
# --- Collect all items from the Fabric workspace ---
def list_items(item_type=None):
url = f"{BASE_URL}/workspaces/{WORKSPACE_ID}/items"
if item_type:
url += f"?type={item_type}"
items = []
while url:
resp = requests.get(url, headers=headers)
resp.raise_for_status()
data = resp.json()
items.extend(data.get("value", []))
url = data.get("continuationUri")
return items
environments = list_items("Environment")
lakehouses = list_items("Lakehouse")
notebooks = list_items("Notebook")
sjds = list_items("SparkJobDefinition")
# --- URL builders ---
def workspace_url():
return f"{PORTAL_URL}/groups/{WORKSPACE_ID}"
def item_url(item):
itype = item["type"]
iid = item["id"]
type_paths = {
"Lakehouse": f"lakehouses/{iid}",
"Notebook": f"synapse/notebooks/{iid}",
"SparkJobDefinition": f"synapse/sparkjobdefinitions/{iid}",
"Environment": f"environments/{iid}",
}
path = type_paths.get(itype, f"items/{iid}")
return f"{PORTAL_URL}/groups/{WORKSPACE_ID}/{path}"
# --- Build Markdown report ---
lines = []
lines.append("# Synapse → Fabric Migration Report")
lines.append("")
lines.append(f"**Generated**: {datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M UTC')}")
lines.append("")
lines.append(f"**Source**: Synapse workspace `{SYNAPSE_WORKSPACE_NAME}`")
lines.append("")
lines.append(f"**Target**: [Fabric Workspace]({workspace_url()})")
lines.append("")
# Phase 0: Environments
lines.append("---")
lines.append("## Phase 0: Spark Pool → Environment")
lines.append("")
lines.append("| # | Environment Name | Fabric Link | Description | Status |")
lines.append("|---|---|---|---|---|")
for i, env in enumerate(environments, 1):
link = item_url(env)
desc = env.get("description", "")
status = env.get("_status", "✓ Created")
lines.append(f"| {i} | `{env['displayName']}` | [Open in Fabric]({link}) | {desc} | {status} |")
lines.append("")
lines.append(f"**Total Environments**: {len(environments)}")
lines.append("")
# Phase 1: Lakehouses
lines.append("---")
lines.append("## Phase 1: Lake Database → Lakehouse")
lines.append("")
lines.append("| # | Lakehouse Name | Fabric Link | Description | Status |")
lines.append("|---|---|---|---|---|")
for i, lh in enumerate(lakehouses, 1):
link = item_url(lh)
desc = lh.get("description", "")
status = lh.get("_status", "✓ Created")
lines.append(f"| {i} | `{lh['displayName']}` | [Open in Fabric]({link}) | {desc} | {status} |")
lines.append("")
lines.append(f"**Total Lakehouses**: {len(lakehouses)}")
lines.append("")
# Phase 2: Notebooks
lines.append("---")
lines.append("## Phase 2: Notebooks")
lines.append("")
lines.append("| # | Notebook Name | Fabric Link | Description | Status |")
lines.append("|---|---|---|---|---|")
for i, nb in enumerate(notebooks, 1):
link = item_url(nb)
desc = nb.get("description", "")
status = nb.get("_status", "✓ Created")
lines.append(f"| {i} | `{nb['displayName']}` | [Open in Fabric]({link}) | {desc} | {status} |")
lines.append("")
lines.append(f"**Total Notebooks**: {len(notebooks)}")
lines.append("")
# Phase 3: Spark Job Definitions
lines.append("---")
lines.append("## Phase 3: Spark Job Definitions")
lines.append("")
lines.append("| # | SJD Name | Fabric Link | Description | Status |")
lines.append("|---|---|---|---|---|")
for i, sjd in enumerate(sjds, 1):
link = item_url(sjd)
desc = sjd.get("description", "")
status = sjd.get("_status", "✓ Created")
lines.append(f"| {i} | `{sjd['displayName']}` | [Open in Fabric]({link}) | {desc} | {status} |")
lines.append("")
lines.append(f"**Total SJDs**: {len(sjds)}")
lines.append("")
# Migration Warnings — flag issues for post-migration remediation
# `warnings` is populated during the migration phases (see Collecting Warnings below)
# Initialize to empty list if not already set (e.g., when running report standalone)
if 'warnings' not in dir():
warnings = []
if warnings:
lines.append("---")
lines.append("## Migration Warnings")
lines.append("")
lines.append("Items below were migrated successfully but require post-migration action. See the [Troubleshooting Guide](migration-gotchas.md) for resolution steps.")
lines.append("")
lines.append("| # | Item | Flag | Severity | Details | Guide |")
lines.append("|---|---|---|---|---|---|")
for i, w in enumerate(warnings, 1):
lines.append(f"| {i} | `{w['item']}` | `{w['flag']}` | {w['severity']} | {w['details']} | [{w['flag']}](migration-gotchas.md#{w['anchor']}) |")
lines.append("")
lines.append(f"**Total warnings**: {len(warnings)}")
lines.append("")
# Summary
total = len(environments) + len(lakehouses) + len(notebooks) + len(sjds)
lines.append("---")
lines.append("## Summary")
lines.append("")
lines.append("| Phase | Item Type | Count |")
lines.append("|---|---|---|")
lines.append(f"| 0 | Environments | {len(environments)} |")
lines.append(f"| 1 | Lakehouses | {len(lakehouses)} |")
lines.append(f"| 2 | Notebooks | {len(notebooks)} |")
lines.append(f"| 3 | Spark Job Definitions | {len(sjds)} |")
lines.append(f"| **Total** | | **{total}** |")
report = "\n".join(lines)
print(report)
# Optionally save to file
with open("migration_report.md", "w") as f:
f.write(report)
print(f"\nReport saved to migration_report.md")Collecting Warnings During Migration
Build the warnings list during migration phases. Each warning has a flag ID from migration-gotchas.md:
warnings = []
# Flag ID → anchor mapping (for report links)
FLAG_ANCHORS = {
"SYNAPSESQL_NO_EQUIVALENT": "g1-sparkreadsynapsesql--no-direct-fabric-equivalent",
"LIBRARY_VERSION_CONFLICT": "g2-custom-library-version-conflicts-with-fabric-runtime",
"DELTA_PROTOCOL_MISMATCH": "g3-delta-lake-protocol-version-incompatibility",
"SECURITY_MODEL_INCOMPATIBLE": "g4-synapse-security-model--managed-identities--ip-firewall",
"GPU_POOL_UNSUPPORTED": "g5-gpu-pool-migration-blocker",
"DOTNET_SPARK_UNSUPPORTED": "g6-net-for-spark-cf-sjd-blocker",
"NULLABLE_POOL_REFERENCE": "g7-bigdatapool--targetbigdatapool-field-is-null-not-missing",
"SESSION_CONFIG_IGNORED": "g8-notebook-session-configuration-configure",
"SHORTCUT_CONNECTION_FAILED": "g9-shortcut-creation-failures-adls-connection-issues",
}
def flag_warning(item_name, flag_id, severity, details):
"""Call during migration when an edge case is detected."""
warnings.append({
"item": item_name,
"flag": flag_id,
"severity": severity,
"details": details,
"anchor": FLAG_ANCHORS.get(flag_id, flag_id.lower()),
})
# --- Example: Phase 0 — flag GPU pools ---
for pool in synapse_pools:
if pool["properties"].get("nodeSizeFamily") == "HardwareAcceleratedGPU":
flag_warning(pool["name"], "GPU_POOL_UNSUPPORTED", "High",
"GPU pool — no Fabric equivalent")
# --- Example: Phase 2 — flag code patterns during notebook audit ---
for nb_name, patterns in audit.items():
if "synapsesql" in patterns:
flag_warning(nb_name, "SYNAPSESQL_NO_EQUIVALENT", "High",
"Uses spark.read.synapsesql() — replace with JDBC or shortcut")
if "LinkedServiceBasedTokenProvider" in patterns:
flag_warning(nb_name, "SECURITY_MODEL_INCOMPATIBLE", "Medium",
"Uses LinkedServiceBasedTokenProvider — replace with ClientCredsTokenProvider")
if "%%configure" in patterns or "spark.synapse." in str(patterns):
flag_warning(nb_name, "SESSION_CONFIG_IGNORED", "Low",
"Has Synapse-specific %%configure keys — remove spark.synapse.* keys")
# --- Example: Phase 3 — flag .NET SJDs ---
for sjd in synapse_sjds:
lang = sjd["properties"].get("language", "")
if lang.lower() in ("dotnet", "csharp"):
flag_warning(sjd["name"], "DOTNET_SPARK_UNSUPPORTED", "High",
f".NET SJD (language={lang}) — rewrite in Python or Scala")Report Output Example
The script produces a Markdown file like this:
# Synapse → Fabric Migration Report
**Generated**: 2026-04-24 15:30 UTC
**Source**: Synapse workspace `my-synapse-ws`
**Target**: [Fabric Workspace](https://app.fabric.microsoft.com/groups/a1b2c3d4-e5f6-7890-abcd-ef1234567890)
---
## Phase 0: Spark Pool → Environment
| # | Environment Name | Fabric Link | Description |
|---|---|---|---|
| 1 | `ETLPool_env` | [Open in Fabric](https://app.fabric.microsoft.com/groups/a1b2c3d4-.../environments/5b218778-...) | Migrated from Synapse Spark pool: ETLPool |
| 2 | `MLPool_env` | [Open in Fabric](https://app.fabric.microsoft.com/groups/a1b2c3d4-.../environments/c3d4e5f6-...) | Migrated from Synapse Spark pool: MLPool |
**Total Environments**: 2
---
## Phase 1: Lake Database → Lakehouse
| # | Lakehouse Name | Fabric Link | Description |
|---|---|---|---|
| 1 | `SilverLakehouse` | [Open in Fabric](https://app.fabric.microsoft.com/groups/a1b2c3d4-.../lakehouses/7890abcd-...) | Migrated from Synapse lake database: silver_db |
**Total Lakehouses**: 1
---
## Phase 1b: Storage Path Shortcuts (Migrate-and-Modernize)
OneLake shortcuts created for ad-hoc `abfss://` storage paths found in notebook/SJD code.
| # | Shortcut Name | Source Storage | Container | Lakehouse | OneLake Path |
|---|---|---|---|---|---|
| 1 | `mystorageaccount_raw` | `mystorageaccount` | `raw` | `SilverLakehouse` | `Files/mystorageaccount_raw` |
| 2 | `mystorageaccount_processed` | `mystorageaccount` | `processed` | `SilverLakehouse` | `Files/mystorageaccount_processed` |
**Total shortcuts**: 2
---
## Phase 2: Notebooks
| # | Notebook Name | Fabric Link | Description |
|---|---|---|---|
| 1 | `bronze_ingest` | [Open in Fabric](https://app.fabric.microsoft.com/groups/a1b2c3d4-.../synapse/notebooks/1234abcd-...) | |
| 2 | `silver_transform` | [Open in Fabric](https://app.fabric.microsoft.com/groups/a1b2c3d4-.../synapse/notebooks/5678efgh-...) | |
| 3 | `gold_aggregate` | [Open in Fabric](https://app.fabric.microsoft.com/groups/a1b2c3d4-.../synapse/notebooks/9012ijkl-...) | |
**Total Notebooks**: 3
---
## Phase 3: Spark Job Definitions
| # | SJD Name | Fabric Link | Description |
|---|---|---|---|
| 1 | `daily_etl_job` | [Open in Fabric](https://app.fabric.microsoft.com/groups/a1b2c3d4-.../synapse/sparkjobdefinitions/mnop3456-...) | |
**Total SJDs**: 1
---
## Migration Warnings
Items below were migrated successfully but require post-migration action. See the [Troubleshooting Guide](migration-gotchas.md) for resolution steps.
| # | Item | Flag | Severity | Details | Guide |
|---|---|---|---|---|---|
| 1 | `bronze_ingest` | `SYNAPSESQL_NO_EQUIVALENT` | High | Uses spark.read.synapsesql() — replace with JDBC or shortcut | [G1](migration-gotchas.md#g1-sparkreadsynapsesql--no-direct-fabric-equivalent) |
| 2 | `silver_transform` | `SECURITY_MODEL_INCOMPATIBLE` | Medium | Uses LinkedServiceBasedTokenProvider — replace with ClientCredsTokenProvider | [G4](migration-gotchas.md#g4-synapse-security-model--managed-identities--ip-firewall) |
| 3 | `gold_aggregate` | `SESSION_CONFIG_IGNORED` | Low | Has Synapse-specific %%configure keys — remove spark.synapse.* keys | [G7](migration-gotchas.md#g7-notebook-session-configuration-configure) |
**Total warnings**: 3
---
## Summary
| Phase | Item Type | Count |
|---|---|---|
| 0 | Environments | 2 |
| 1 | Lakehouses | 1 |
| 2 | Notebooks | 3 |
| 3 | Spark Job Definitions | 1 |
| **Total** | | **7** |Incremental Report — Track During Migration
If you prefer to build the report incrementally as each item is migrated (rather than querying after the fact), maintain a tracking list during each phase:
# Initialize at the start of migration
migration_log = []
def log_migrated_item(phase, synapse_name, fabric_item, status="success", notes=""):
"""Call after each successful Fabric item creation."""
migration_log.append({
"phase": phase,
"synapse_name": synapse_name,
"fabric_name": fabric_item["displayName"],
"fabric_id": fabric_item["id"],
"fabric_type": fabric_item["type"],
"fabric_url": f"https://app.fabric.microsoft.com/groups/{WORKSPACE_ID}/{_type_path(fabric_item)}",
"status": status,
"notes": notes,
})
def _type_path(item):
paths = {
"Lakehouse": f"lakehouses/{item['id']}",
"Notebook": f"synapse/notebooks/{item['id']}",
"SparkJobDefinition": f"synapse/sparkjobdefinitions/{item['id']}",
"Environment": f"environments/{item['id']}",
}
return paths.get(item["type"], f"items/{item['id']}")
# Usage after creating a notebook:
# log_migrated_item(2, "bronze_ingest", fabric_response_json, notes="lift-and-shift, no refactoring")Then at the end, generate the report from migration_log:
import json
# Save as JSON for programmatic use
with open("migration_log.json", "w") as f:
json.dump(migration_log, f, indent=2)
# Generate Markdown from log
for entry in migration_log:
status_icon = "✅" if entry["status"] == "success" else "❌"
print(f"| {status_icon} | `{entry['synapse_name']}` → `{entry['fabric_name']}` | [Open]({entry['fabric_url']}) | {entry['notes']} |")Extended Report — With Synapse Source Links
To include links back to the Synapse source items for comparison:
| Item Type | Synapse Studio URL Pattern |
|---|---|
| Notebook | https://web.azuresynapse.net/en/authoring/analyze/notebooks/{notebookName}?workspace=/subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Synapse/workspaces/{ws} |
| SJD | https://web.azuresynapse.net/en/authoring/analyze/sparkJobDefinitions/{sjdName}?workspace=... |
| Spark Pool | https://web.azuresynapse.net/en/management/sparkPools/{poolName}?workspace=... |
| Lake Database | https://web.azuresynapse.net/en/authoring/analyze/databases/{dbName}?workspace=... |
def synapse_item_url(item_type, item_name, sub_id, rg, ws_name):
"""Build a Synapse Studio URL for the source item."""
base = "https://web.azuresynapse.net/en"
ws_path = f"/subscriptions/{sub_id}/resourceGroups/{rg}/providers/Microsoft.Synapse/workspaces/{ws_name}"
type_paths = {
"Notebook": f"/authoring/analyze/notebooks/{item_name}",
"SparkJobDefinition": f"/authoring/analyze/sparkJobDefinitions/{item_name}",
"SparkPool": f"/management/sparkPools/{item_name}",
"Database": f"/authoring/analyze/databases/{item_name}",
}
return f"{base}{type_paths.get(item_type, '')}{f'?workspace={ws_path}'}"This allows the report to include side-by-side links:
| Synapse Item | Fabric Item | Status |
|---|---|---|
| [bronze_ingest (Synapse)](https://web.azuresynapse.net/en/authoring/...) | [bronze_ingest (Fabric)](https://app.fabric.microsoft.com/groups/.../synapse/notebooks/...) | ✅ Migrated |Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
What our scanner noticed· Low risk
- Instructions that use the network
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills-for-fabric · skills/synapse-migration · commit f8fac11
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Also distributed in
- microsoft/skills-for-fabric
AutoGineer is not affiliated with or endorsed by Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download synapse-migration.zip