SnowConvert: Oracle Conversion Settings¶
General Conversion Settings¶
Transform Synonyms: Flag to indicate whether or not Synonyms should be transformed. By default, it’s set to true.
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;
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;
$$;
-- 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;
$$;
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;
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;
-- 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;
Transform OUTER JOINS to ANSI Syntax: Flag to indicate whether Outer Joins should be transformed to only ANSI syntax.
Comment objects with missing dependencies: Flag to indicate if the user wants to comment on nodes that have missing dependencies.
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.
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 Page | Name | Display Name |
---|---|---|
Code Page | Name | Display Name |
1200 | utf-16 | Unicode |
1201D | unicodeFFFE | Unicode (Big endian) |
12000 | utf-32 | Unicode (UTF-32) |
12001 | utf-32BE | Unicode (UTF-32 Big endian) |
20127 | us-ascii | US-ASCII |
28591 | iso-8859-1 | Western European (ISO) |
65000 | utf-7 | Unicode (UTF-7). Not available in .NET 5 |
65001 | utf-8 | Unicode (UTF-8). Default encoding |
Note
To review the Settings that apply to all supported languages, go to the following article.
DB Objects Names Settings¶
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.
Database: The string value specifies the custom database name to apply. Example: MyCustomDB.PUBLIC.Table1.
Default: None of the above settings will be used in the object names.
Prepare Code Settings¶
Prepare my code: Flag to indicate whether the input code should be processed before parsing and transformation.
Conversion Rate Settings¶
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¶
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.