SnowConvert AI - Teradata Conversion Settings

Configurações gerais de conversão

Configurações gerais de resultados

Subpágina de configurações gerais de resultados

  1. Comment objects with missing dependencies: Sinalizador para indicar se o usuário deseja comentar sobre nós que têm dependências ausentes.

  2. Disable EWI comments generation (errors, warnings and issues): Sinalizador para indicar se os comentários de EWIs (Erros, Avisos e Problemas) não serão gerados no código convertido. O padrão é false

  3. Gere tags XML para instruções SQL em procedimentos armazenados: Sinalizador para indicar se as instruções SQL SELECT, INSERT, CREATE, DELETE, UPDATE, DROP, MERGE em procedimentos armazenados serão marcadas no código convertido. Esse recurso é usado para facilitar a identificação de instruções no código migrado. O fato de envolver essas instruções nessas tags semelhantes a XMLpermite que outros programas as encontrem e extraiam rapidamente. O código decorado tem a seguinte aparência:

    //<SQL_DELETE
    EXEC(DELETE FROM SB_EDP_SANDBOX_LAB.PUBLIC.USER_LIST,[])
    //SQL_DELETE!>
    
    Copy
  4. Separate Period Data-type definitions and usages into begin and end Data-Time fields: Esse sinalizador é usado para indicar que a ferramenta deve migrar qualquer uso do tipo de dados PERIOD como dois campos DATETIME separados que manterão os valores originais de início e fim do período. Sempre que um campo ou função de período for migrado usando esse sinalizador, SSC-EWI-TD0053 serão adicionados para avisar sobre essa alteração.

    Código de entrada:

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

    Código de saída:

    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.

Nota

Para revisar as configurações que se aplicam a todas as linguagens compatíveis, acesse o seguinte artigo SnowConvert AI - General Conversion Settings.

Configurações do modo de sessão

Essa subpágina de configurações é usada para indicar o modo de sessão do código de entrada.

Subpágina de configurações do modo de sessão

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.

Configurações de nomes de objetos DB

Página de configurações de nomes de objetos DB

  1. Schema: O valor da cadeia de caracteres especifica o nome do esquema personalizado a ser aplicado. Se não for especificado, será usado o nome original do banco de dados. Exemplo: DB1.myCustomSchema.Table1.

  2. Database: O valor da cadeia de caracteres especifica o nome do banco de dados personalizado a ser aplicado. Exemplo: MyCustomDB.PUBLIC.Table1.

  3. Default: Nenhuma das configurações acima será usada nos nomes dos objetos.

Preparar configurações de código

Página de configurações de preparação de código

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

Configurações de conversão de formato

Página de configurações de conversão de formato

  1. Escala padrão de caractere para número: Um valor inteiro para a transformação de CHARACTER em número aproximado (Padrão: 10).

  2. Default TIMESTAMP format: Valor da cadeia de caracteres para o formato TIMESTAMP (Padrão: «YYYY/MM/DD HH:MI:SS»).

  3. Formato padrão DATE: Valor da cadeia de caracteres para o formato DATE (Padrão: «YYYY/MM/DD»).

  4. Source TIMEZONE: Valor da cadeia de caracteres para o formato TIMEZONE (Padrão: «GMT-5»).

  5. Default TIME format: Valor de cadeia de caracteres para o formato TIME (Padrão: «HH:MI:SS»).

Linguagem de destino para BTEQ, Procedimentos/Macros

Página de configurações da linguagem de destino BTEQ

Especifica a linguagem de destino para converter os arquivos de script do Bteq e do Mload. Os valores atualmente suportados são SnowScript e Python. O valor padrão é definido como Python.

Página de configurações da linguagem de destino de Procedimentos/Macros

Valor de cadeia de caracteres que especifica a linguagem de destino para converter procedimentos armazenados e macros. As opções atualmente suportadas são: SnowScript e JavaScript. O valor padrão é definido como 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.