hdinsight-migration

작성자: microsoft

업데이트 확인 — 세션당 한 번 (필수) 이 스킬이 세션에서 처음 사용될 때, 진행 전에 업데이트 확인 스킬을 실행하십시오.

npx skills add https://github.com/microsoft/skills-for-fabric --skill hdinsight-migration

Update Check — ONCE PER SESSION (mandatory) The first time this skill is used in a session, run the check-updates skill before proceeding.

  • GitHub Copilot CLI / VS Code: invoke the check-updates skill.
  • Claude Code / Cowork / Cursor / Windsurf / Codex: compare local vs remote package.json version.
  • Skip if the check was already performed earlier in this session.

CRITICAL NOTES

  1. To find workspace details (including its ID) from a workspace name: list all workspaces, then use JMESPath filtering
  2. 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
  3. HDInsight has no mssparkutils or dbutils equivalent — notebookutils is net-new capability being introduced
  4. HiveContext and SQLContext are legacy Spark 1.x/2.x APIs — Fabric uses Spark 3.x SparkSession exclusively
  5. wasb:// paths are deprecated and require a Storage Account key or SAS — replace with OneLake shortcuts

HDInsight → Microsoft Fabric Migration

Prerequisite Knowledge

Read these companion documents before executing migration tasks:

  • COMMON-CORE.md — Fabric REST API patterns, authentication, token audiences, item discovery
  • COMMON-CLI.mdaz rest, az login, token acquisition, Fabric REST via CLI
  • SPARK-AUTHORING-CORE.md — Notebook deployment, lakehouse creation, Spark job execution

For notebook and Lakehouse creation, see spark-authoring-cli. For Fabric Warehouse DDL/DML authoring, see sqldw-authoring-cli.


Table of Contents

TopicReference
Migration Workload Map§ Migration Workload Map
SparkSession & Context API Changes§ SparkSession API Changes
WASB / ABFS → OneLake Path Migrationpath-migration.md
Hive DDL → Delta Lake / Lakehouse Schemashive-to-delta.md
Oozie → Fabric Pipelines§ Oozie → Fabric Pipelines
Introducing notebookutils§ Introducing notebookutils
Before/After Code Patternscode-patterns.md
Spark Configuration Differences§ Spark Configuration Differences
Must / Prefer / Avoid§ Must / Prefer / Avoid
Authentication & Token AcquisitionCOMMON-CORE.md § Authentication
Lakehouse ManagementSPARK-AUTHORING-CORE.md § Lakehouse Management

Migration Workload Map

HDInsight ComponentFabric TargetNotes
Spark cluster (notebooks, scripts)Fabric Spark (Lakehouse / Notebooks / SJD)No persistent cluster — Starter Pool or Custom Pool provides on-demand Spark
Hive / HiveServer2Lakehouse SQL Endpoint + Lakehouse schemasDelta Lake replaces Hive metastore; schemas provide namespace equivalent
HBaseFabric Warehouse or Azure Cosmos DB (separate from Fabric)HBase has no direct Fabric equivalent — assess workload access patterns
Oozie workflowsFabric Data PipelinesMap Oozie actions to Fabric activities; see § Oozie → Fabric Pipelines
YARN Resource ManagerFabric Spark monitoring (Spark UI, Monitoring Hub)No YARN — Fabric manages compute automatically
AmbariFabric Monitoring Hub + Admin PortalCluster health, capacity, and job monitoring
WASB / ABFS storageOneLake Shortcutsabfss://[email protected]/See path-migration.md
Ranger policiesFabric workspace roles + OneLake data access rolesMap Ranger row/column filters to Lakehouse row-level security
Livy REST serverFabric Livy APICompatible endpoint — see SPARK-AUTHORING-CORE.md

SparkSession & Context API Changes

HDInsight Spark clusters often use legacy Spark 1.x / 2.x API styles. Replace all of these with the unified SparkSession:

Legacy HDInsight PatternFabric Spark 3.x Replacement
from pyspark import SparkContext; sc = SparkContext()Not needed — sc = spark.sparkContext (pre-instantiated)
from pyspark.sql import HiveContext; hc = HiveContext(sc)Not needed — spark session has Hive-compatible SQL support via Delta schemas
from pyspark.sql import SQLContext; sqlc = SQLContext(sc)Not needed — use spark.sql(...) directly
SparkSession.builder.enableHiveSupport().getOrCreate()Not needed in Fabric — spark is pre-built and available
sc.textFile("wasb://[email protected]/path")spark.read.text("abfss://[email protected]/lh.Lakehouse/Files/path")
sqlContext.sql("CREATE TABLE ... STORED AS ORC")See hive-to-delta.md for Delta DDL equivalent

In Fabric notebooks, spark (SparkSession) and sc (SparkContext) are pre-instantiated — do not call SparkContext() or SparkSession.builder...getOrCreate() at the top of migrated notebooks.


Oozie → Fabric Pipelines

Map Oozie workflow actions to Fabric Data Pipeline activities:

Oozie Action TypeFabric Pipeline ActivityNotes
<spark> actionNotebook activity or Spark Job Definition activityPass parameters via notebook cell parameters or SJD arguments
<hive> actionScript activity (SQL) against Lakehouse SQL EndpointConvert HiveQL to Spark SQL or Delta SQL
<shell> actionAzure Function activity or Web activityShell scripts must be refactored; no direct shell execution in Fabric Pipelines
<java> actionAzure Batch activity (external) or refactor to PySparkJava MapReduce jobs must be rewritten
<sqoop> actionCopy Data activity (Fabric Data Factory connector)Sqoop import/export maps to Fabric Copy Data with JDBC source/sink
<coordinator> (time-based schedule)Pipeline schedule triggerSet recurrence in pipeline trigger; supports cron-like expressions
<coordinator> (data-triggered)Storage Event triggerTrigger on OneLake file arrival

Delegate to spark-authoring-cli for notebook and SJD creation after mapping pipeline activities.


Introducing notebookutils

HDInsight Spark had no built-in utility framework equivalent to mssparkutils or dbutils. When migrating to Fabric, introduce notebookutils for common operations:

OperationOld HDInsight Approachnotebookutils Equivalent
List filesdbutils (N/A) / HDFS CLInotebookutils.fs.ls("abfss://...")
Copy fileHDFS API / shutilnotebookutils.fs.cp(src, dest)
Read secretAzure Key Vault REST callnotebookutils.credentials.getSecret(keyVaultUrl, secretName)
Get notebook contextNot availablenotebookutils.runtime.context — returns workspace ID, notebook ID, etc.
Run child notebookNot availablenotebookutils.notebook.run("notebook_name", timeout, {"param": "value"})
Exit notebook with valuesys.exit()notebookutils.notebook.exit("value")
Mount storageWASB config in spark-defaults.confOneLake Shortcut (no runtime mount needed)

Spark Configuration Differences

HDInsight ConceptFabric Spark EquivalentMigration Action
spark-defaults.conf (cluster-wide)Fabric Spark Workspace Settings + Environment itemMove config properties to Environment or use %%configure in notebooks
%%configure magic%%configure magic — identicalNo change needed
YARN queue / resource allocationFabric Spark pool node size and autoscale settingsMap queue SLAs to Custom Pool configuration
Ambari service configs (HDFS, YARN tuning)Not applicable — Fabric manages infrastructureRemove; focus on application-level Spark configs
HDI Spark version (e.g., Spark 2.4)Fabric Runtime 1.3 = Spark 3.5 (latest)Test for deprecated API removals (e.g., HiveContext, RDD-style ML)
Conda environment / bootstrap.shFabric Environment item with custom librariesRecreate conda/pip dependencies in a Fabric Environment
hive-site.xml (metastore connection)Not needed — Delta Lake IS the metastore in FabricRemove metastore config; use Lakehouse schemas for namespace organization

Must / Prefer / Avoid

MUST DO

  • Replace all wasb:// / wasbs:// paths with OneLake abfss:// paths or OneLake Shortcuts — wasb:// requires storage account keys which are not the Fabric-preferred auth model
  • Replace HiveContext, SQLContext, and standalone SparkContext() — use the pre-instantiated spark session in Fabric notebooks
  • Migrate Hive DDL (STORED AS ORC, LOCATION, TBLPROPERTIES) to Delta Lake DDL — see hive-to-delta.md
  • Introduce notebookutils for file system operations, secret retrieval, and child notebook orchestration where HDInsight used custom scripts or direct API calls
  • Replace Oozie XML workflows with Fabric Data Pipelines — see § Oozie → Fabric Pipelines
  • Align library management to Fabric Environments — remove bootstrap.sh, conda envs, and runtime %pip install patterns for production workloads

PREFER

  • OneLake Shortcuts over copying data — mount existing ADLS Gen2 containers as shortcuts to avoid re-ingestion during migration
  • Delta Lake for all tables migrated from Hive ORC/Parquet — ACID guarantees, time travel, and schema enforcement improve data quality
  • Fabric Starter Pool for initial migration validation — no pool configuration overhead, fast session startup
  • Lakehouse schemas (database namespaces) for organizing migrated Hive databases — one schema per Hive database within a single Lakehouse
  • Medallion architecture for restructuring migrated data layers during migration — align Bronze/Silver/Gold with raw Hive → validated Delta → serving Gold patterns

AVOID

  • Do not use SparkContext() or HiveContext() constructors in Fabric notebooks — they conflict with the pre-instantiated spark session and will raise errors
  • Do not use hive-site.xml or external Hive metastore configuration — Fabric's Delta Lake-backed Lakehouse IS the metastore
  • Do not assume YARN queue mappings translate to Fabric pools — re-design resource allocation based on Fabric Spark pool SLAs
  • Do not attempt to run Oozie shell actions or Java MapReduce jobs directly in Fabric — these must be refactored (see § Oozie → Fabric Pipelines)
  • Do not use %sh magic for file system operations in production notebooks — use notebookutils.fs.* for portability and OneLake token-based auth

Examples

See code-patterns.md for full before/after examples. Key quick references:

Legacy context → Fabric pre-instantiated session

# HDInsight (remove entirely)
from pyspark.sql import HiveContext
hc = HiveContext(sc)

# Fabric — use pre-instantiated spark directly
df = spark.sql("SELECT * FROM sales.fact_orders")

WASB path → OneLake path (after shortcut creation)

# HDInsight
df = spark.read.parquet("wasb://[email protected]/orders/")

# Fabric
df = spark.read.parquet("Files/raw/orders/")

Hive DDL → Delta DDL

-- HDInsight
CREATE TABLE sales_db.fact_orders (...) STORED AS ORC LOCATION 'wasb://...';

-- Fabric
CREATE SCHEMA IF NOT EXISTS sales_db;
CREATE TABLE sales_db.fact_orders (...) USING DELTA;

microsoft의 다른 스킬

oss-growth
microsoft
OSS 성장 해커 페르소나
official
microsoft-foundry
microsoft
Foundry 에이전트를 엔드투엔드로 배포, 평가 및 관리: Docker 빌드, ACR 푸시, 호스팅/프롬프트 에이전트 생성, 컨테이너 시작, 배치 평가, 지속적 평가, 프롬프트 최적화 워크플로, agent.yaml, 트레이스에서 데이터셋 큐레이션. 용도: Foundry에 에이전트 배포, 호스팅 에이전트, 에이전트 생성, 에이전트 호출, 에이전트 평가, 배치 평가 실행, 지속적 평가, 지속적 모니터링, 지속적 평가 상태, 프롬프트 최적화, 프롬프트 개선, 프롬프트 최적화 도구, 에이전트 지침 최적화, 에이전트 개선...
officialdevelopmentdevops
azure-ai
microsoft
Azure AI: Search, Speech, OpenAI, Document Intelligence에 사용됩니다. 검색, 벡터/하이브리드 검색, 음성-텍스트 변환, 텍스트-음성 변환, 전사, OCR을 지원합니다. 사용 시점: AI Search, 쿼리 검색, 벡터 검색, 하이브리드 검색, 의미 검색, 음성-텍스트 변환, 텍스트-음성 변환, 전사, OCR, 텍스트를 음성으로 변환.
officialdevelopmentapi
azure-deploy
microsoft
이미 준비된 애플리케이션에 대해 기존 .azure/deployment-plan.md 및 인프라 파일이 있는 경우 Azure 배포를 실행합니다. 사용자가 새 애플리케이션 생성을 요청할 때는 이 스킬을 사용하지 말고 azure-prepare를 사용하세요. 이 스킬은 azd up, azd deploy, terraform apply, az deployment 명령을 내장된 오류 복구 기능과 함께 실행합니다. azure-prepare의 .azure/deployment-plan.md와 azure-validate의 검증 상태가 필요합니다. 사용 시점: "run azd up", "run azd deploy", "execute deployment",...
officialdevopsaws
azure-storage
microsoft
Azure Storage Services는 Blob Storage, File Shares, Queue Storage, Table Storage, Data Lake를 포함합니다. 스토리지 액세스 계층(hot, cool, cold, archive), 각 계층 사용 시기 및 계층 비교에 대한 질문에 답변합니다. 객체 스토리지, SMB 파일 공유, 비동기 메시징, NoSQL 키-값, 빅데이터 분석을 제공합니다. 수명 주기 관리를 포함합니다. 사용 용도: blob 스토리지, 파일 공유, 큐 스토리지, 테이블 스토리지, 데이터 레이크, 파일 업로드, blob 다운로드, 스토리지 계정, 액세스 계층,...
officialdevelopmentdatabase
azure-diagnostics
microsoft
Azure에서 AppLens, Azure Monitor, 리소스 상태 및 안전한 트라이지를 사용하여 Azure 프로덕션 문제를 디버그합니다. 사용 시기: 프로덕션 문제 디버그, 앱 서비스 문제 해결, 앱 서비스 높은 CPU, 앱 서비스 배포 실패, 컨테이너 앱 문제 해결, 함수 문제 해결, AKS 문제 해결, kubectl 연결 불가, kube-system/CoreDNS 오류, pod 보류 중, crashloop, 노드 준비 안 됨, 업그레이드 실패, 로그 분석, KQL, 인사이트, 이미지 풀 실패, 콜드 스타트 문제, 상태 프로브 실패,...
officialdevopsdevelopment
azure-prepare
microsoft
Azure 앱을 배포용으로 준비합니다(인프라 Bicep/Terraform, azure.yaml, Dockerfiles). 생성/현대화 또는 생성+배포에 사용하며, 크로스 클라우드 마이그레이션에는 사용하지 않습니다(azure-cloud-migrate 사용). 다음에는 사용하지 마십시오: copilot-sdk 앱(azure-hosted-copilot-sdk 사용). 사용 시점: "앱 생성", "웹 앱 빌드", "API 생성", "서버리스 HTTP API 생성", "프론트엔드 생성", "백엔드 생성", "서비스 빌드", "애플리케이션 현대화", "애플리케이션 업데이트", "인증 추가", "캐싱 추가", "Azure에 호스팅", "생성 및...
officialdevelopmentdevops
azure-validate
microsoft
Azure 배포 전 준비 상태 검증. 구성, 인프라(Bicep 또는 Terraform), RBAC 역할 할당, 관리 ID 권한, 사전 요구 사항에 대한 심층 점검을 실행합니다. 사용 시점: 내 앱 검증, 배포 준비 상태 확인, 사전 점검 실행, 구성 확인, 배포 가능 여부 확인, azure.yaml 검증, Bicep 검증, 배포 전 테스트, 배포 오류 문제 해결, Azure Functions 검증, 함수 앱 검증, 서버리스 검증...
officialdevopstesting