Command Line Interface
Integrate SnowConvert for Oracle into your CI/CD process with the CLI version of the tool.

Quick start

To execute a conversion with the SnowConvert CLI you have to have an active license. Currently, the licenses for the CLI are different than the UI, but if you already have a license for the UI you should be able to reuse the same license key. In the section below we show how to install a license key.
There are several Command Line Arguments documented below, but the main ones are -i for the input folder and -o for the output folder.

Install a license

To install a license key just execute SnowConvert CLI program with the -l argument and the license key.
1
$: snowct-oracle -l P-ABCD-12345-EFGHI
Copied!

Check license status

To install a license key just execute SnowConvert CLI program with just the -l and no other arguments.
1
$: snowct-oracle -l
Copied!

Migrate a folder

To migrate a folder just execute SnowConvert CLI program with the -i <INPUT FOLDER> and -o <OUTPUT FOLDER> arguments.
1
$: snowct-oracle -i ~/Documents/Workspace/Code -o ~/Documents/Workspace/Output
Copied!

CLI Arguments

Basic Conversion

-i, --input <PATH> (Required)

The path to the folder or file containing the input source code.

-o, --output <PATH> (Required)

The path to the output folder where the converted code and reports will be stored.

-a, --assessmentmode

Flag to indicate whether or not to generate only Assessments files. By default, it's set to FALSE.

-e, --encoding <CODE PAGE>

The encoding code page number is used for parsing the source files. We only accept encodings supported by .NET Core. Here are the ones supported at the moment:
Code Page
Name
Display Name
1200
utf-16
Unicode
1201
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

-m, --comments

Flag to indicate if the user wants to comment nodes that have missing dependencies.

Object Name Customization

-s, --customschema <SCHEMA_NAME>

String value specifying the custom schema name to apply. If not specified, either PUBLIC or the original database name will be used. Example: DB1.MyCustomSchema.Table1.
If you provide this parameter with a schema name NONE --customschema none, the converted code will keep the original schema defined in the source code.

-d, --database <DB_NAME>

String value specifying the custom database name to apply. Example: MyCustomDB.PUBLIC.Table1.

Format Conversion

--CharacterToApproximateNumber <NUMBER>

An integer value for the CHARACTER to Approximate Number transformation (Default: 10).

--DefaultDateFormat <STRING>

String value for the Default DATE format (Default: "YYYY/MM/DD").

--DefaultTimeFormat <STRING>

String value for the Default TIME format (Default: "HH:MI:SS").

--DefaultTimestampFormat <STRING>

String value for the Default TIMESTAMP format (Default: "YYYY/MM/DD HH:MI:SS").

--DefaultTimezoneFormat <STRING>

String value for the Default TIMEZONE format (Default: "GMT-5").

License and Help

-l, --license [<LICENSE_KEY>]

Shows the license information. If it's followed by a license key, it will attempt to download and install such a license. For example:
    Showing license status snowct-oracle -l
    Installing a license snowct-oracle -l 12345-ASDFG-67890

--terms

Show license terms information.

--help

Display the help information.

Other features

--disableSynonym

Flag to indicate whether or not Synonyms should be transformed. By default it's set to TRUE.

--disablePackagesAsSchemas

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:
1
// Oracle Input
2
3
CREATE OR REPLACE PACKAGE emp_mgmt AS
4
PROCEDURE remove_emp (employee_id NUMBER );
5
END emp_mgmt;
6
7
CREATE OR REPLACE PACKAGE BODY emp_mgmt AS
8
PROCEDURE remove_emp (employee_id NUMBER) IS
9
BEGIN
10
DELETE FROM employees
11
WHERE employees.employee_id = remove_emp.employee_id;
12
tot_emps := tot_emps - 1;
13
END;
14
END emp_mgmt;
15
16
// Transformation by default
17
18
CREATE SCHEMA IF NOT EXISTS emp_mgmt;
19
...
20
CREATE OR REPLACE PROCEDURE emp_mgmt.remove_emp (employee_id FLOAT)
21
...
22
23
// Transformation with disablePackagesAsSchemas flag
24
25
CREATE OR REPLACE PROCEDURE EMP_MGMT_REMOVE_EMP (employee_id FLOAT)
26
...
Copied!

--sysdateAsCurrentTimestamp

Flag to indicate whether Sysdate should be transformed to CurrentDate or CurrentTimestamp.
This will also affect all DATE columns that will be transformed to TIMESTAMP.
Learn more about how you can get access to the SnowConvert for Oracle Command Line Interface tool by filling out the form on our Snowflake Migrations Info page.
Last modified 18d ago