SnowConvert AI - Teradata - COMMON STATEMENTS¶
모든 스크립트 구문에 공통적인 Teradata 스크립트 문을 Snowflake SQL로 변환하기 위한 변환 참조
ERROR HANDLING¶
BTEQ 오류 처리 기능은 Teradata 데이터베이스 오류 코드를 기반으로 합니다. 다음은 사용자가 지정한 Teradata SQL 문에 대한 응답으로 생성되는 표준 오류 코드 및 메시지입니다. BTEQ 사용자는 이러한 메시지를 변경, 수정 또는 삭제할 수 없습니다.
For more information, see the Teradata BTEQ Error Handling documentation.
샘플 소스 패턴¶
기본 BTEQ 오류 처리 예제¶
The error conditions content is relocated in different statements in case ERRORCODE is different to zero, otherwise it can be located as the original code. First, the query above the if statement is relocated within a BEGIN - END block, where in case of an exception it will be caught in the EXCEPTION block. Additionally, the ERRORCODE variable will be changed to the variable declared indicating its SQLCODE with an EWI indicating that the exact number of the SQLCODE is not the same as the ERRORCODE in BTEQ.
Teradata BTEQ¶
Snowflake SQL¶
Known Issues¶
문제가 발견되지 않았습니다.
EXIT 또는 QUIT¶
모든 데이터베이스 세션을 로그오프한 다음 BTEQ 를 종료합니다.
BTEQ 의 실행 중에 발생하는 가장 높은 심각도 값은 명시적으로 인자가 제공되지 않는 한 기본적으로 BTEQ 의 반환 코드 값으로 사용됩니다. (Teradata Basic Query Reference EXIT 또는 QUIT 명령)
샘플 소스 패턴¶
기본 IF 예제¶
Teradata BTEQ¶
Snowflake SQL¶
Known Issues¶
EXIT 또는 QUIT 명령에 입력이 없으며, 기본값으로 ERRORLEVEL을 반환합니다. 그러나 SnowConvert AI는 이를 0을 반환하도록 변환합니다.
관련 EWIs¶
SSC-FDM-TD0013: The Snowflake error code mismatches the original Teradata error code.
GOTO¶
설명¶
BTEQ Goto 명령은 지정된 레이블이 발견될 때까지 모든 중간 BTEQ 명령 및 SQL 문을 건너뛴 다음 평소와 같이 처리를 재개합니다.(Teradata 기본 쿼리 참조 Goto 명령)
샘플 소스 패턴¶
기본 GOTO 예제¶
Snowflake scripting doesn’t have an equivalent statement for Teradata BTEQ Goto command, but fortunately it can be removed from the input code and get an equivalent code, due to the sequence of Goto and Labels commands always in reverse topological order. In other words, the definitions come after their uses. Thus, SnowConvert AI just needs to copy bottom-up all Label section code to its corresponding Goto statements.
Teradata BTEQ¶
Snowflake¶
알려진 문제 ¶
문제가 발견되지 않았습니다.
관련 EWIs¶
SSC-EWI-0001: 소스 코드 줄에 인식할 수 없는 토큰이 있습니다.
SSC-FDM-0027: Removed next statement, not applicable in Snowflake.
SSC-EWI-0073: 보류 중 함수 동등성 검토
SSC-FDM-TD0026: 문 반전으로 인해 GOTO 문이 제거되었습니다.
IF… THEN…¶
설명¶
IF 문은 조건의 유효성을 검사하고 작업이 true일 때 작업을 실행합니다. (Teradata SQL Language Reference IF…THEN…)
샘플 소스 패턴¶
기본 IF 예제¶
Teradata BTEQ¶
Snowflake SQL¶
관련 EWIs¶
관련 EWIs 없음.