Introduction
Welcome to Mobilize.Net SnowConvert for Oracle. Let us be your guide on the road to a successful migration.

What is SnowConvert for Oracle?

SnowConvert is a software that understands Oracle SQL and PL/SQL, and performs the following conversions:
    Oracle SQL to Snowflake SQL
    Oracle PL/SQL to JavaScript embedded in Snowflake SQL

SnowConvert Terminology

Before we get lost in the magic of these code conversions, here a few terms/definitions so you know what we mean when we start dropping them all over the documentation:
    SQL (Structured Query Language): the standard language for storing, manipulating, and retrieving data in most modern database architectures.
    PL/SQL: Procedural Language for SQL. This was created by Oracle, and still used by Oracle as the scripting language for stored procedures in Oracle.
    SnowConvert: the software that converts securely and automatically your Oracle files to the Snowflake cloud data platform.
    Conversion rule or transformation rule: rules that allow SnowConvert to convert from a portion of source code to the expected target code.
    Parse: parse or parsing is an initial process done by SnowConvert to understand the source code, and build up an internal data structure to process the conversion rules.
Let's dive in to the code conversions that Mobilize.Net SnowConvert can perform.

Code Conversions

Oracle SQL to Snowflake SQL

SnowConvert understands the Oracle source code and converts the Data Definition Language (DDL), Data Manipulation Language (DML) and functions in the source code to the corresponding SQL in the target: Snowflake. (PL/SQL is handled a bit differently.)

Example of Oracle SQL to Snowflake SQL

Here's an example of the conversion of a simple CREATE TABLE statement.
The source code (a simple CREATE TABLE):
1
CREATE TABLE "MySchema"."MyTable"
2
(
3
"COL1" NUMBER,
4
"COL2" NUMBER,
5
"COL3" NUMBER GENERATED ALWAYS AS (COL1 * COL2) VIRTUAL,
6
"COL4" LONG,
7
"COL5" CLOB,
8
"COL6" ROWID,
9
"COL7" NVARCHAR2(10),
10
"COL8" RAW(255),
11
CONSTRAINT "PK" PRIMARY KEY ("COL1")
12
);
Copied!
The Converted Snowflake SQL Code:
1
CREATE OR REPLACE TABLE MySchema.PUBLIC.MyTable
2
(
3
COL1 NUMBER (38,19),
4
COL2 NUMBER (38,19),
5
COL3 NUMBER (38,19) AS (COL1 * COL2),
6
COL4 VARCHAR /**** WARNING: LONG DATA TYPE "" CONVERTED TO VARCHAR ****/,
7
COL5 VARCHAR /**** WARNING: CLOB DATA TYPE "" CONVERTED TO VARCHAR ****/,
8
COL6 VARCHAR(18) /**** WARNING: ROWID DATA TYPE "" CONVERTED TO VARCHAR(18) ****/,
9
COL7 VARCHAR(10),
10
COL8 BINARY /**** WARNING: RAW DATA TYPE "" CONVERTED TO BINARY ****/,
11
CONSTRAINT PK PRIMARY KEY (COL1)
12
);
Copied!
In this converted SQL you will notice that we are converting many things. A few highlights:
    Adding PUBLIC Schema by default for all the Table and view names if the user doesn't specify one (see how to specify a Schema).
    CREATE TABLE to CREATE OR REPLACE TABLE
    Data Type Conversions:
      LONG to VARCHAR
      CLOB to VARCHAR
      ROWID to VARCHAR
      NVARCHAR2 to VARCHAR
      RAW to BINARY
    Data Type Attributes: GENERATED ALWAYS AS (COL1 * COL2) VIRTUAL to AS (COL1 * COL2)
For more information about Data types and their equivalent: Data Types
More examples can be found in the rest of the documentation.

Oracle PL/SQL to JavaScript

SnowConvert takes Oracle stored procedures (PL/SQL) and converts them to JavaScript embedded into Snowflake SQL. Oracle's CREATE PROCEDURE and REPLACE PROCEDURE language is replaced by Snowflake's CREATE OR REPLACE PROCEDURE language. JavaScript is called as a scripting language, and all of the inner statements are converted to JavaScript.

Example of Oracle PL/SQL to JavaScript in Snowflake

Coming soon!
And that's it! Mobilize.Net SnowConvert takes the pain and frustration out of changing data platforms. Learn more about SnowConvert for Oracle on the next page.
Last modified 27d ago