How to use the SMA CLI

Installation

Depending on your Operating System, you can review the corresponding installation guide:

Note that the CLI is currently still shared with SnowConvert. You will need to use an access code.

Commands

Summary

Each command can be used with the following syntax:

snowct [command] [arguments]

The available commands are listed below. If you want to check a detailed explanation for a command, you can click on the command.

Command
Alias
Description

install-ac

Install an access code.

show-ac

Show the installed access code(s).

Perform a Teradata conversion/assessment.

Perform an Oracle conversion/assessment.

Perform an SQL Server conversion/assessment.

Perform an Scala conversion/assessment.

Perform a Python conversion/assessment.

-h

Show help.

-v

Show the version of the tool.

--terms

-t

Show terms of use.

Installing an access code

Before converting your code, you need to install an access code. You can do this by specifying the access code, or by specifying the path to the file that contains the access code information (this is useful when installing the access code without an Internet connection or under restrictive firewall settings).

You can use the following command to install the access code by writing the code:

snowct install-access-code <access-code>

This command is equivalent to the previous command:

snowct install-ac <access-code>

If you want to install an access code using a file, you can use the --file / -f option, as shown in the following commands:

snowct install-access-code --file <path-to-file>
snowct install-access-code -f <path-to-file>
snowct install-a --file <path-to-file>
snowct install-ac -f <path-to-file>

If there is an error during the installation of the license, an error will be shown. If you need an access code, you can reach out to sma-support@snowflake.com.

Converting

You can use the following commands to convert your source code. You must provide an input path (where the source code is) and an output path (where the converted code will be placed). There is a different command for each product:

  • SnowConvert Teradata: teradata

  • SnowConvert Oracle: oracle

  • SnowConvert SQL Server: sql-server

  • Snowpark Migration Accelerator (SMA) Scala: scala

  • Snowpark Migration Accelerator (SMA) Python: python

snowct teradata --input <input-path> --output <output-path> <additional-parameters>
snowct oracle --input <input-path> --output <output-path> <additional-parameters>
snowct sql-server --input <input-path> --output <output-path> <additional-parameters>
snowct scala --input <input-path> --output <output-path> <additional-parameters>
snowct python --input <input-path> --output <output-path> <additional-parameters>

In each of these cases, you can use -i instead of --input, or -o instead of --output. For example, instead of writing snowct teradata --input <input-path> --output <output-path> you can write snowct teradata -i <input-path> -o <output-path>.

Each of these commands might also receive additional parameters. In the following links, you can review which additional parameters are available for each product:

Performing an Assessment

When performing an assessment you can use the same commands that you would use for conversion, but you need to add the option --assessment or -a. The commands you would use would look like these:

snowct teradata --input <input-path> --output <output-path> --assessment <additional-parameters>
snowct oracle --input <input-path> --output <output-path> --assessment <additional-parameters>
snowct sql-server --input <input-path> --output <output-path> --assessment <additional-parameters>
snowct scala --input <input-path> --output <output-path> --assessment <additional-parameters>
snowct python --input <input-path> --output <output-path> --assessment <additional-parameters>

In each of theses cases, you can use -i instead of --input, or -o instead of --output, just like with conversions. Each of these commands might also receive additional parameters (check the Converting section).

Checking which access codes are installed

If you want to know which access codes are installed on your computer, you can use the following command:

snowct show-access-code

This command will show the information for each access code that is installed on your computer.

The following commands will instead show the information for the access code that is being used for a specific product:

snowct show-access-code --platform teradata
snowct show-access-code --platform oracle
snowct show-access-code --platform sql-server
snowct show-access-code --platform scala
snowct show-access-code --platform python

You can use -p instead of --platform. You can also use the show-ac command instead of the show-access-code command.

Checking the version of the tool

You can use any of the following commands to check the version of the tool and the version for each code processing engine (SnowConvert Teradata, SnowConvert Oracle, SnowConvert SQL Server, SparkSnowConvert Scala, SparkSnowConvert Python):

snowct --version
snowct -v

Need more help?

If you want to see general help for the CLI, you can use the following commands:

snowct --help
snowct -h

You can get more information about a command by executing this command:

snowct <command> --help

For example, you can execute snowct install-access-code --help to get more information about how to install an access code, or you can execute snowct teradata --help to get more information about how to execute conversions/assessments using SnowConvert Teradata. This will also show information about the additional options that are available for SnowConvert Teradata.

Last updated

#332: [SIT-1562] SQL Readiness

Change request updated