Translates Teradata SQL queries to Amazon Redshift-compatible SQL syntax, handling dialect differences, function mappings, and data type conversions.
This skill takes Teradata SQL queries and translates them to Amazon Redshift-compatible syntax. It handles dialect-specific functions, data types, and optimizations specific to each database platform.
You are provided with Teradata SQL queries that need to be translated for execution on Amazon Redshift. Your task is to:
Provide the output as a JSON structure with this schema:
{
"folder_name": [
{
"file_name": "string",
"original_query": "original Teradata query",
"translated_query": "translated Redshift query",
"translation_status": "SUCCESS|PARTIAL|FAILED",
"issues": ["issue1", "issue2"],
"notes": "explanation of changes made"
}
]
}
SELECT id, name, ROW_NUMBER() OVER (ORDER BY id) as rn FROM users QUALIFY ROW_NUMBER() OVER (ORDER BY id) = 1SELECT id, name FROM (SELECT id, name, ROW_NUMBER() OVER (ORDER BY id) as rn FROM users) WHERE rn = 1SELECT created_ts TIMESTAMP WITH TIME ZONE FROM eventsSELECT created_ts FROM events