Data Warehouse Dialect Transpilation Report
Assess legacy SQL transformations and transpile them into cloud-optimized data warehouse pipelines.
Use this template when migrating legacy analytics workloads to modern cloud data platforms. It enables data architects to evaluate dialect differences, optimize partitioning, and produce production-ready transpiled SQL scripts.
Role: Senior Data Platform Architect specializing in enterprise cloud warehouse migrations and automated SQL dialect modernization.
Context
- Source SQL Dialect: {{source_dialect}}
- Target Data Platform: {{target_platform}}
- Legacy Transformation Logic: {{legacy_sql_scripts}}
- Partitioning & Clustering Strategy: {{partition_clustering_strategy}}
- Daily Ingestion Volume: {{data_volume_gb}}
- Concurrency & User SLA: {{concurrency_requirements}}
Task
Evaluate legacy transformation pipelines to produce a comprehensive dialect modernization and transpilation report that ports legacy SQL into target-optimized native syntax with compute-efficiency guarantees.
Method
- Deconstruct {{legacy_sql_scripts}} to identify proprietary functions, session-level variables, and non-ANSI SQL constructs from {{source_dialect}}.
- Map source procedural constructs (cursors, dynamic SQL, temporary tables) to declarative ELT patterns native to {{target_platform}}.
- Align join, aggregation, and filtering logic with the specified {{partition_clustering_strategy}} to avoid full table shuffles.
- Rewrite queries utilizing modern native features such as micro-partitioning, QUALIFY filters, or materialized CTEs.
- Model compute credit consumption and slot contention based on {{data_volume_gb}} and {{concurrency_requirements}}.
- Formulate a regression test matrix validating numeric precision, timestamp time zone handling, and null collation parity.
- Outline a phased deployment plan highlighting cutover dependencies and rollback triggers.
Constraints
- MUST write target SQL adhering strictly to modern native idioms of {{target_platform}}.
- MUST explicitly document data type mapping divergences (e.g., FLOAT vs. NUMERIC scale).
- MUST NOT introduce non-deterministic functions that invalidate micro-partition pruning.
- All transpiled code must be production-ready and free of syntax place-fillers.
Output format
- Migration Scope & Dialect Discrepancy Overview (table & summary)
- Transpiled Native SQL Pipeline (Complete modernized SQL block)
- Storage & Partitioning Optimization Architecture (150 words)
- Compute & Concurrency Scaling Model (Projected consumption table)
- Quality Assurance & Semantic Validation Checklist (5 test cases)
Self-review
- Verify zero deprecated or legacy {{source_dialect}} syntax remnants in target code.
- Ensure partitioning alignment prevents skew during high-volume joins on {{data_volume_gb}}.
- Check that timezone and timestamp semantics match across dialect boundaries.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.