SnowConvert is a software that understands Oracle SQL and PL/SQL, and performs the following conversions:
Oracle SQL to Snowflake SQL
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.
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.)
Here's an example of the conversion of a simple CREATE TABLE statement.
The source code (a simple CREATE TABLE):
CREATE TABLE "MySchema"."MyTable"("COL1" NUMBER,"COL2" NUMBER,"COL3" NUMBER GENERATED ALWAYS AS (COL1 * COL2) VIRTUAL,"COL4" LONG,"COL5" CLOB,"COL6" ROWID,"COL7" NVARCHAR2(10),"COL8" RAW(255),CONSTRAINT "PK" PRIMARY KEY ("COL1"));
The Converted Snowflake SQL Code:
CREATE OR REPLACE TABLE MySchema.PUBLIC.MyTable(COL1 NUMBER (38,19),COL2 NUMBER (38,19),COL3 NUMBER (38,19) AS (COL1 * COL2),COL4 VARCHAR /**** WARNING: LONG DATA TYPE "" CONVERTED TO VARCHAR ****/,COL5 VARCHAR /**** WARNING: CLOB DATA TYPE "" CONVERTED TO VARCHAR ****/,COL6 VARCHAR(18) /**** WARNING: ROWID DATA TYPE "" CONVERTED TO VARCHAR(18) ****/,COL7 VARCHAR(10),COL8 BINARY /**** WARNING: RAW DATA TYPE "" CONVERTED TO BINARY ****/,CONSTRAINT PK PRIMARY KEY (COL1));
In this converted SQL you will notice that we are converting many things. A few highlights:
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:
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.
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.