Introduction
Welcome to Snowflake SnowConvert for Oracle. Let us be your guide on the road to a successful migration.
Last updated
Welcome to Snowflake SnowConvert for Oracle. Let us be your guide on the road to a successful migration.
Last updated
This is a deprecated version of the SnowConvert documentation, please visit the official site .
SnowConvert is a software that understands , and performs the following conversions:
Oracle SQL to
Oracle PL/SQL to:
embedded in Snowflake SQL
Before we get lost in the magic of these code conversions, here are 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 is still used by Oracle as the scripting language for stored procedures and functions 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 and determine 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 some of the code conversions that Snowflake SnowConvert can perform.
SnowConvert for Oracle takes in Oracle source code in SQL and converts the Data Definition Language (DDL), Data Manipulation Language (DML), and functions in the source code to the corresponding SQL in Snowflake SQL.
Here is an example of the conversion of a simple CREATE TABLE
statement.
The source code:
The migrated Snowflake SQL code:
In this converted SQL you will notice that we are converting many things. A few highlights:
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)
SnowConvert takes Oracle stored procedures and functions (PL/SQL) and converts them to either Snowflake Scripting or JavaScript embedded into Snowflake SQL. Oracle CREATE PROCEDURE
and REPLACE PROCEDURE
syntax is replaced by Snowflake CREATE OR REPLACE PROCEDURE
syntax.
Here is an example of the conversion of a simple CREATE PROCEDURE
in Oracle that does an insert into a table used for logging.
Snowflake Scripting works as an extension to Snowflake SQL, it adds support for procedural logic and this allow us to create Stored Procedures and replicate similar behaviours and statements of Oracle PL/SQL.
In this converted SQL you will notice that we have converted to a new language (JavaScript) embedded into Snowflake SQL. There are more than a few highlights, but suffice it to say that this documentation has all the essentials to understand this kind of conversion.
The line that states // ... Necessary SnowConvert Helpers are inserted here ...
will actually have the SnowConvert JavaScript Helpers. They can be lengthy, so they are removed from this first example.
And that's it! Snowflake SnowConvert takes the pain and frustration out of changing data platforms. Learn more about getting started with SnowConvert for Oracle on the next page.
Adding PUBLIC
Schema by default for all the Table and view names if the user doesn't specify one (see ).
For more information about data types and their equivalent: . More examples can be found in the rest of the documentation.
JavaScript is called as a scripting language, all inner statements are converted to JavaScript. If you want to understand better the JavaScript API check .