SnowConvert AI CLI - Data migration¶
Tip
This page covers SnowConvert AI CLI (scai) commands for data migration. For architecture, prerequisites, and platform guidance using the Snowflake AIM Agent for Data Warehouses, see Data migration. For workflow and Worker field definitions, see Data migration configuration reference.
Use this page when you run data migration from the CLI instead of Snowflake CoCo. Cloud data commands are grouped under scai data migrate …, scai data worker …, and scai data orchestrator ….
Supported source platforms: SQL Server, Amazon Redshift, Teradata, Oracle, and PostgreSQL. Platform-specific auth, extraction strategies, Worker TOML, and data type mappings live on the AIM pages:
Prerequisites¶
Before you run CLI commands, make sure the following are in place:
- SCAI CLI installed and a SnowConvert AI project on disk (
scai init …). - Snowflake connection in
~/.snowflake/config.tomlorconnections.tomlwith a role that can create and administerSNOWCONVERT_AI. - Source connection registered for your dialect (
scai connection add-*). See the platform pages above for Worker TOML shape. - SPCS (optional): Required only for
scai data orchestrator setupandscai data worker setupon Snowflake compute.
Project and connection setup¶
Initialize a project and register source connections from your project directory:
Use scai connection add-oracle, scai connection add-postgresql, scai connection add-redshift, or Teradata equivalents for other dialects. See SCAI Command Reference for all connection options.
After code conversion, extract and deploy before migrating:
Install orchestrator and workers¶
Generate Worker TOML from your project, then deploy on SPCS or run locally:
Edit the generated TOML using examples on your platform page. Full Worker property reference: Data migration configuration reference. To route workflows to a specific Worker pool, set matching affinity on the Worker and the workflow; see Affinity.
Run a migration workflow¶
Generate workflow config¶
Workflow files are YAML (.yaml or .yml). See Data migration configuration reference for the object model. Use --affinity when you need to route the workflow to a specific Worker pool; see Affinity.
Note
To migrate a fixed set of tables, prefer an exact registry filter with IN (...):
scai data migrate generate-config --where "source.objectType = 'table' AND source.canonicalName IN ('dbo.orders', 'dbo.order_items')"
Avoid substring patterns such as source.canonicalName ILIKE '%orders%', which can pull in similarly named tables (for example, ORDERS_ARCHIVE or ORDERS_SWTCH). SnowConvert AI uses the exact canonicalName filter you provide; it doesn’t auto-include partition SWITCH or staging tables. After you generate the config, review the tables: list before you start the migration.
Start orchestrator and workers¶
Submit and monitor workflows¶
Global options such as --json, --log-debug, -c / --connection, --warehouse, and --role apply where the CLI exposes them. Run scai data migrate --help for the full surface.
Command reference¶
| Command | Purpose |
|---|---|
scai data worker generate-config <path> | Generate Worker TOML from the project |
scai data worker start --local <config.toml> | Run a local Worker |
scai data worker start --auto-config [PATH] | Emit a Worker TOML template |
scai data orchestrator setup --compute-pool <POOL> | Create or resume Orchestrator on SPCS |
scai data orchestrator stop | Suspend Orchestrator SPCS service |
scai data worker setup --compute-pool <POOL> | Create Worker SPCS service |
scai data worker stop | Suspend Worker SPCS service |
scai data migrate generate-config | Generate workflow YAML from the project |
scai data migrate create-workflow --config <path> | Submit a migration workflow |
scai data migrate start | Local all-in-one run from the project |
scai data migrate status <WORKFLOW_ID> | Show or watch workflow status |
scai data migrate list | List recent workflows |
scai connection test -l <dialect> -s <profile> --json | Verify source connectivity |
Monitor progress in Snowflake with SNOWCONVERT_AI.DATA_MIGRATION.WORKFLOW, TABLE_PROGRESS_WITH_EXAMPLE_ERROR, and the DATA_MIGRATION_DASHBOARD Streamlit app. See Data migration for observability details.