SnowConvert: Oracle Conversion Settings

General Conversion Settings

General Conversion Settings page

  1. Transform Synonyms: Flag to indicate whether or not Synonyms should be transformed. By default, it’s set to true.

  2. Transform Packages to new Schemas: Flag to indicate whether or not the Packages should be transformed to new Schemas.

    Please check the naming of the procedure enabling and disabling the flag:

CREATE OR REPLACE PACKAGE emp_mgmt AS
PROCEDURE remove_emp (employee_id NUMBER );
END emp_mgmt;

CREATE OR REPLACE PACKAGE BODY emp_mgmt AS 
PROCEDURE remove_emp (employee_id NUMBER) IS 
   BEGIN 
      DELETE FROM employees 
      WHERE employees.employee_id = remove_emp.employee_id; 
      tot_emps := tot_emps - 1; 
   END; 
END emp_mgmt; 
Copy
CREATE SCHEMA IF NOT EXISTS emp_mgmt
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
;

CREATE OR REPLACE PROCEDURE emp_mgmt.remove_emp (employee_id NUMBER(38, 18))
RETURNS VARCHAR
LANGUAGE SQL
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
EXECUTE AS CALLER
AS
$$
   BEGIN
      DELETE FROM
         employees
         WHERE employees.employee_id = remove_emp.employee_id;
         tot_emps :=
                     !!!RESOLVE EWI!!! /*** SSC-EWI-OR0036 - TYPES RESOLUTION ISSUES, ARITHMETIC OPERATION '-' MAY NOT BEHAVE CORRECTLY BETWEEN unknown AND Number ***/!!!
                     tot_emps - 1;
   END;
$$;
Copy
-- Additional Params: --disablePackagesAsSchemas
CREATE OR REPLACE PROCEDURE EMP_MGMT_REMOVE_EMP (employee_id NUMBER(38, 18))
RETURNS VARCHAR
LANGUAGE SQL
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
EXECUTE AS CALLER
AS
$$
   BEGIN
      DELETE FROM
         employees
         WHERE employees.employee_id = remove_emp.employee_id;
         tot_emps :=
                     !!!RESOLVE EWI!!! /*** SSC-EWI-OR0036 - TYPES RESOLUTION ISSUES, ARITHMETIC OPERATION '-' MAY NOT BEHAVE CORRECTLY BETWEEN unknown AND Number ***/!!!
                     tot_emps - 1;
   END;
$$;
Copy
  1. Transform Date as Timestamp:

Flag to indicate whether SYSDATE should be transformed into CURRENT_DATE or CURRENT_TIMESTAMP. This will also affect all DATE columns that will be transformed to TIMESTAMP.

CREATE TABLE DATE_TABLE(
    DATE_COL DATE
);

SELECT SYSDATE FROM DUAL;
Copy
CREATE OR REPLACE TABLE DATE_TABLE (
        DATE_COL TIMESTAMP /*** SSC-FDM-OR0042 - DATE TYPE COLUMN HAS A DIFFERENT BEHAVIOR IN SNOWFLAKE. ***/
    )
    COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
    ;

    SELECT
        CURRENT_TIMESTAMP()
    FROM DUAL;
Copy
-- Additional Params: --disableDateAsTimestamp
CREATE OR REPLACE TABLE DATE_TABLE (
        DATE_COL DATE /*** SSC-FDM-OR0042 - DATE TYPE COLUMN HAS A DIFFERENT BEHAVIOR IN SNOWFLAKE. ***/
    )
    COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
    ;

    SELECT
        CURRENT_DATE()
    FROM DUAL;
Copy
  1. Transform OUTER JOINS to ANSI Syntax: Flag to indicate whether Outer Joins should be transformed to only ANSI syntax.

  2. Comment objects with missing dependencies: Flag to indicate if the user wants to comment on nodes that have missing dependencies.

  3. Disable EWI comments generation (errors, warnings and issues): Flag to indicate whether EWIs comments (Errors, Warnings, and Issues) will not be generated on the converted code. The default is false.

  4. Set encoding of the input files: The encoding code page number is used for parsing the source files. We only accept encodings supported by .NET Core (https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding?view=net-5.0#list-of-encodings). Here are the ones supported at the moment:

Code PageNameDisplay Name
Code PageNameDisplay Name
1200utf-16Unicode
1201DunicodeFFFEUnicode (Big endian)
12000utf-32Unicode (UTF-32)
12001utf-32BEUnicode (UTF-32 Big endian)
20127us-asciiUS-ASCII
28591iso-8859-1Western European (ISO)
65000utf-7Unicode (UTF-7). Not available in .NET 5
65001utf-8Unicode (UTF-8). Default encoding

Note

To review the Settings that apply to all supported languages, go to the following article.

DB Objects Names Settings

DB Objects Names Settings page

  1. Schema: The string value specifies the custom schema name to apply. If not specified, the original database name will be used. Example: DB1.myCustomSchema.Table1.

  2. Database: The string value specifies the custom database name to apply. Example: MyCustomDB.PUBLIC.Table1.

  3. Default: None of the above settings will be used in the object names.

Prepare Code Settings

Prepare Code Settings page

  1. Prepare my code: Flag to indicate whether the input code should be processed before parsing and transformation.

Conversion Rate Settings

Conversion Rate Settings page

On this page, you can choose whether the successfully converted code percentage is calculated using lines of code or using the total number of characters. The character conversion rate is the default option. You can read the entire rate documentation on thedocumentation page.

Stored Procedures Target Languages Settings

Stored Procedures Target Languages Settings page

On this page, you can choose whether stored procedures are migrated to JavaScript embedded in Snow SQL, or to Snowflake Scripting. The default option is Snowflake Scripting.

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

Language: English