BTEQ scripts, stored procedures, and Teradata SQL parsed structurally. Converted to Snowflake SQL with native QUALIFY support. COLLECT STATISTICS, MERGE INTO, and PRIMARY INDEX logic fully translated.
Upload a BTEQ script, get converted code →Snowflake supports QUALIFY as a first-class SQL clause. Teradata's QUALIFY ROW_NUMBER(), RANK(), and DENSE_RANK() patterns transfer directly—no subquery wrapping, no rewrite. The analytical intent stays readable and performant.
BTEQ's .LOGON, .IF/.THEN, .GOTO control flow and embedded SQL are parsed and converted to Snowflake stored procedures and SnowSQL scripts. .LABEL and .QUIT logic becomes structured exception handling with Snowflake Scripting.
Teradata's proprietary bulk-loading utilities—FastLoad, MultiLoad, FastExport, TPump—are replaced by Snowflake's COPY INTO for batch loads and Snowpipe for continuous ingestion. No proprietary channel drivers or appliance firmware required.
A BTEQ script using COLLECT STATISTICS and QUALIFY for deduplication—converted to Snowflake SQL where QUALIFY is preserved natively and statistics are managed automatically.
.LOGON tdserver/dbc,dbc;
COLLECT STATISTICS ON customer_orders
COLUMN (customer_id);
CREATE VOLATILE TABLE latest_orders AS (
SELECT customer_id, order_date, amount,
order_status, region
FROM customer_orders
WHERE order_date >= DATE - 365
QUALIFY ROW_NUMBER() OVER (
PARTITION BY customer_id
ORDER BY order_date DESC
) = 1
) WITH DATA ON COMMIT PRESERVE ROWS;
SELECT region,
COUNT(*) AS customer_count,
SUM(amount) AS total_revenue,
AVG(amount) AS avg_order_value
FROM latest_orders
GROUP BY region
ORDER BY total_revenue DESC;
.LOGOFF;
.QUIT;
-- BTEQ → Snowflake SQL
-- COLLECT STATISTICS: Snowflake manages
-- statistics automatically (no action needed)
CREATE TEMPORARY TABLE latest_orders AS
SELECT customer_id, order_date, amount,
order_status, region
FROM customer_orders
WHERE order_date >= DATEADD(DAY, -365,
CURRENT_DATE())
QUALIFY ROW_NUMBER() OVER (
PARTITION BY customer_id
ORDER BY order_date DESC
) = 1;
SELECT region,
COUNT(*) AS customer_count,
SUM(amount) AS total_revenue,
AVG(amount) AS avg_order_value
FROM latest_orders
GROUP BY region
ORDER BY total_revenue DESC;
BTEQ control flow removed. QUALIFY preserved natively in Snowflake. VOLATILE TABLE becomes TEMPORARY TABLE. DATE arithmetic mapped to DATEADD. COLLECT STATISTICS removed—Snowflake manages optimizer statistics automatically.
| Teradata Component | Snowflake Equivalent | Notes |
|---|---|---|
| BTEQ script | SnowSQL / stored procedure | .LOGON/.LOGOFF removed, SQL extracted and converted |
| QUALIFY clause | QUALIFY (native) | Snowflake supports QUALIFY natively—no rewrite |
| COLLECT STATISTICS | Automatic (not needed) | Snowflake manages optimizer statistics internally |
| PRIMARY INDEX | Clustering key | Data co-location via CLUSTER BY for large tables |
| FastLoad | COPY INTO / Snowpipe | Batch or continuous ingestion from stage |
| MultiLoad | MERGE INTO | Upsert and conditional update patterns |
| Stored Procedure | Snowflake Scripting | JavaScript or SQL-based stored procedures |
| Macro | Stored procedure + parameters | Reusable parameterized SQL blocks |
| SET table | SELECT DISTINCT / MERGE | Unique-row enforcement via deduplication |
| MERGE INTO | MERGE INTO (native) | WHEN MATCHED / NOT MATCHED fully preserved |
| Temporal table | Time Travel + CHANGES | Snowflake Time Travel for historical queries |
| TPump | Snowpipe Streaming | Near-real-time continuous ingestion |
Data Matching compares Teradata output against Snowflake output—row by row, column by column. In the case study below, all BTEQ pipelines were validated with full production backtesting across 4,200 scripts.
See how Data Matching works →4,200 BTEQ scripts converted to Snowflake SQL. 1,500 QUALIFY clauses preserved natively without subquery wrapping. FastLoad and MultiLoad jobs replaced with COPY INTO and Snowpipe. PRIMARY INDEX strategies mapped to clustering keys. Teradata appliance decommissioned within 120 days.
Read the full case study →Upload a BTEQ script or Teradata SQL file. Get parsed lineage, Snowflake SQL code, and a validation report.