SnowConvert AI - Teradata Conversion Settings

일반 변환 설정

일반 결과 설정

일반 결과 설정 하위 페이지

  1. 종속성이 누락된 오브젝트에 설명 추가: 사용자가 종속성이 누락된 노드에 대해 설명할지 여부를 나타내는 플래그입니다.

  2. EWI 설명(오류, 경고 및 문제) 생성 비활성: 변환된 코드에 설명(오류, 경고 및 문제)이 생성되지 않을지 여부를 나타내는 플래그입니다. 기본값은 false입니다

  3. 저장 프로시서의 SQL 문을 위한 XML 태그 생성: 저장 프로시저의 SQL 문 SELECT, INSERT, CREATE, DELETE, UPDATE, DROP, MERGE 를 변환된 코드에 태그할지 여부를 표시하는 플래그입니다. 이 기능은 마이그레이션된 코드에서 문을 쉽게 식별하는 데 사용됩니다. 이러한 문을 XML 과 유사한 태그로 감싸면 다른 프로그램에서 빠르게 찾아서 추출할 수 있습니다. 장식된 코드는 다음과 같습니다.

    //<SQL_DELETE
    EXEC(DELETE FROM SB_EDP_SANDBOX_LAB.PUBLIC.USER_LIST,[])
    //SQL_DELETE!>
    
    Copy
  4. 기간 데이터 타입 정의 및 사용을 시작 및 종료 데이터 시간 필드로 분리: 이 플래그는 도구가 PERIOD 데이터 타입의 사용을 원래 기간 시작 및 종료 값을 보유하는 2개의 개별 DATETIME 필드로 마이그레이션해야 함을 나타내는 데 사용되며, 이 플래그 SSC-EWI-TD0053 를 사용하여 기간 필드 또는 함수를 마이그레이션할 때마다 이 변경 사항에 대해 경고하는 메시지가 추가됩니다.

    입력 코드:

    CREATE TABLE myTable(
       col1 PERIOD(DATE),
       col2 VARCHAR(50),
       col3 PERIOD(TIMESTAMP)
    );
    
    Copy

    출력 코드:

    CREATE OR REPLACE TABLE myTable (
       col1 VARCHAR(24) !!!RESOLVE EWI!!! /*** SSC-EWI-TD0053 - SNOWFLAKE DOES NOT SUPPORT THE PERIOD DATATYPE, ALL PERIODS ARE HANDLED AS VARCHAR INSTEAD ***/!!!,
       col2 VARCHAR(50),
       col3 VARCHAR(58) !!!RESOLVE EWI!!! /*** SSC-EWI-TD0053 - SNOWFLAKE DOES NOT SUPPORT THE PERIOD DATATYPE, ALL PERIODS ARE HANDLED AS VARCHAR INSTEAD ***/!!!
    )
    COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
    ;
    
    Copy
  5. Set encoding of the input files: Check General Conversion Settings for more details.

  6. Use COLLATE for Case Specification: This flag indicates whether to use COLLATE or UPPER to preserve Case Specification functionality, e.g. CASESPECIFIC or NOT CASESPECIFIC. By default, it is turned off, meaning that the UPPER function will be used to emulate case insensitivity (NOT CASESPECIFIC). To learn more about how Case Specification is handled by SnowConvert AI check here.

참고

지원되는 모든 언어에 적용되는 설정을 검토하려면 다음 문서를 참조하십시오.

세션 모드 설정

이 설정 하위 페이지는 입력 코드의 세션 모드를 표시하는 데 사용됩니다.

세션 모드 설정 하위 페이지

SnowConvert AI handles Teradata code in both TERA and ANSI modes. Currently, this is limited to the default case specification of character data and how it affects comparisons. By default, the Session Mode is TERA.

You can learn more about how SnowConvert AI handles and converts code depending on the session mode, check here.

DB 오브젝트 이름 설정

DB 오브젝트 이름 설정 페이지

  1. 스키마: 문자열 값은 적용할 사용자 지정 스키마 이름을 지정합니다. 지정하지 않으면 원래 데이터베이스 이름이 사용됩니다. 예: DB1.myCustomSchema.Table1.

  2. 데이터베이스: 문자열 값은 적용할 사용자 지정 데이터베이스 이름을 지정합니다. 예: MyCustomDB.PUBLIC.Table1.

  3. 기본값: 위의 설정 중 어느 것도 오브젝트 이름에 사용되지 않습니다.

코드 설정 준비하기

코드 설정 페이지 준비

Description

Prepare my code: Flag to indicate whether the input code should be processed before parsing and transformation. This can be useful to improve the parsing process. By default, it’s set to FALSE.

Splits the input code top-level objects into multiple files. The containing folders would be organized as follows:

└───A new folder named ''[input_folder_name]_Processed''
    └───Top-level object type
        └───Schema name
Copy

Example

Input

├───in
│       DDL_Macros.sql
│       DDL_Procedures.sql
│       DDL_Tables.sql
Copy

Output

Assume that the name of the files is the name of the top-level objects in the input files.


├───in_Processed
    ├───macro
    │   └───MY_DATABASE
    │           MY_FIRST_MACRO.sql
    │           ANOTHER_MACRO.sql
    │
    ├───procedure
    │   └───MY_DATABASE
    │           A_PROCEDURE.sql
    │           ANOTHER_PROCEDURE.sql
    │           YET_ANOTHER_PROCEDURE.sql
    │
    └───table
        └───MY_DATABASE
                MY_TABLE.sql
                ADDITIONAL_TABLE.sql
                THIRD_TABLE.sql
Copy

Inside the “schema name” folder, there should be as many files as top-level objects in the input code. Also, it is possible to have copies of some files when multiple same-type top-level objects have the same name. In this case, the file names will be enumerated in ascending order.

Only files with the “.sql”, “.ddl” and “.dml” extensions will be considered for splitting. Other kinds of files like “.bteq” scripts will be copied into the preprocessed folder and will be categorized depending on the script extension but they won’t be modified by the Split Task.

Requirements

To identify top-level objects, a tag must be included in a comment before their declaration. Our Extraction scripts generate these tags.

The tag should follow the next format:

<sc-top_level_object_type>top_level_object_name</sc-top_level_object_type>
Copy

You can follow the next example:

/* <sc-table> MY_DATABASE.MY_TABLE</sc-table> */
CREATE TABLE "MY_DATABASE"."MY_TABLE" (
    "MY_COLUMN" INTEGER
) ;
Copy

형식 변환 설정

형식 변환 설정 페이지

  1. 문자에서 숫자로의 기본 스케일: CHARACTER 를 대략적인 숫자로 변환하는 정수 값입니다(기본값: 10).

  2. 기본 TIMESTAMP 형식: TIMESTAMP 형식의 문자열 값(기본값: “YYYY/MM/DD HH:MI:SS”).

  3. 기본 DATE 형식: DATE 형식의 문자열 값(기본값: “YYYY/MM/DD”).

  4. 소스 TIMEZONE: TIMEZONE 형식의 문자열 값(기본값: “GMT-5”).

  5. 기본 TIME 형식: TIME 형식의 문자열 값(기본값: “HH:MI:SS”).

BTEQ 의 대상 언어, 프로시저/매크로

BTEQ 대상 언어 설정 페이지

Bteq 및 Mload 스크립트 파일을 변환할 대상 언어를 지정합니다. 현재 지원되는 값은 SnowScriptPython 입니다. 기본값은 Python 로 설정됩니다.

프로시저/매크로 대상 언어 설정 페이지

저장 프로시저 및 매크로를 변환할 대상 언어를 지정하는 문자열 값입니다. 현재 지원되는 사이트: SnowScriptJavaScript. 기본값은 SnowScript 로 설정됩니다.

Reset Settings: The reset settings option appears on every page. If you’ve made changes, you can reset SnowConvert AI to its original default settings.