SQL
AuraScore 81/100

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.

Template

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

  1. Deconstruct {{legacy_sql_scripts}} to identify proprietary functions, session-level variables, and non-ANSI SQL constructs from {{source_dialect}}.
  2. Map source procedural constructs (cursors, dynamic SQL, temporary tables) to declarative ELT patterns native to {{target_platform}}.
  3. Align join, aggregation, and filtering logic with the specified {{partition_clustering_strategy}} to avoid full table shuffles.
  4. Rewrite queries utilizing modern native features such as micro-partitioning, QUALIFY filters, or materialized CTEs.
  5. Model compute credit consumption and slot contention based on {{data_volume_gb}} and {{concurrency_requirements}}.
  6. Formulate a regression test matrix validating numeric precision, timestamp time zone handling, and null collation parity.
  7. 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

  1. Migration Scope & Dialect Discrepancy Overview (table & summary)
  2. Transpiled Native SQL Pipeline (Complete modernized SQL block)
  3. Storage & Partitioning Optimization Architecture (150 words)
  4. Compute & Concurrency Scaling Model (Projected consumption table)
  5. 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.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

data-analytics
data-sql
technology-software
sql
data-warehouse
migration