Migration QA — Architecture Flow

SQL Server → Snowflake  ·  MCP Agent Orchestration  ·  Semantic RAG (sentence-transformers)  ·  CI/CD via Jenkins

Phase 0 — MCP Agent Config Generation
One-time per new app · Amazon Q + MCP tools
📂
docs/
XLSX mapping docs
MD architecture
Migration findings
Test scenarios
🤖 MCP Agent — mcp/server.py
📑
index_docs
sentence-transformers
all-MiniLM-L6-v2
500-char chunks
pickle index
.md .yaml .xlsx .docx
🔍
search_docs
cosine similarity
top-N chunks
RAG context
for Q planner
⚙️
generate_yaml
writes configs/apps/
<app>.yaml
runs pytest
validation inline
▶️
run_script
pytest:: prefix
or python script
returns stdout
max 8000 chars
👤
Human Review
Verify table pairs
exclude list
known_differences
business rule SQL

✅ commit YAML
📄
App YAML
configs/apps/
sample_app.yaml
sample_app1.yaml

Zero code changes
per new app
Approved YAML triggers pipeline
Phase 1 — Automated Validation Pipeline
Every commit / scheduled · SQL Server → Snowflake
⚙️
Jenkins CI/CD
push / schedule

pytest tests/
--app sample_app
--flow migrate_sql
_to_snowflake
--env dev
--sendEmail
🔧
Config Resolution
load_runtime_config()

app YAML +
check_profiles.yaml

flow → env →
source/target →
checks → rules
🔌
DB Connectors
build_client()

🗄 SQL Server
Windows Auth

❄️ Snowflake
Service Account
🔍
Table Discovery
MetadataDiscovery

Explicit mappings
or
INFORMATION_SCHEMA

include / exclude
→ TablePair list
Validation Engine
MigrationRunner
per table pair
Row Count Schema Min/Max Checksum Constraints Null Check ETL Rules Lookup Type Conv
known_differences
fail → warn
📊
Reports
JSON report
HTML report

reports/<app>_
<flow>_<env>

pass/fail/warn
per table
📧
Email Report
email_utils.py
SMTP relay
<smtp-server-host>

HTML summary
+ attachments
Infrastructure & Auth
🗄 SQL Server — Source
<sql-server-host>
Windows Auth / ODBC
On-premise
❄️ Snowflake — Target
<snowflake-account>
Read-only role per app
Dedicated warehouse

Env Promotion:
Dev → Test
--flow promote_snowflake
🔐 Auth Strategy
Local: externalbrowser (SSO)
Jenkins: keypair auth
Private key in Jenkins
Credentials Store
No creds in YAML
🤖 MCP Server
mcp/server.py
sentence-transformers
all-MiniLM-L6-v2
TF-IDF fallback if model unavailable
pickle index · no API key
📦 Apps
sample_app — App One
sample_app1 — App Two

Add app = one YAML
Zero code changes
Amazon Q / MCP
MCP Tools
Semantic RAG
Human Review
Jenkins CI/CD
Config Layer
DB Connectors
Discovery
Validation
Reports
Email