Data migration configuration reference

This page documents the workflow YAML and Worker TOML settings for Data Migration. For platform-specific prerequisites, auth methods, extraction strategies, and data type mappings, see the per-platform pages linked from Data migration.

For SnowConvert AI CLI commands that generate and submit these configs, see Manual Migration with SnowConvert AI CLI: Data migration.

Workflow configuration reference

The Data Migration Workflow configuration file is a YAML file. The CLI and Snowflake AIM Agent for Data Warehouses accept .yaml or .yml files.

Note

Names that require quoting (or brackets) must be manually quoted. For example: tableName: "\"MyCaseSensitiveTable\"".

Top-level object

PropertyTypeRequiredDescription
schemaVersionStringVersion of the configuration schema (for example, "1.0.0"). Accepts major, major.minor, or major.minor.patch. Defaults to "1.0.0" when omitted.
tablesTableConfiguration[]YesAn array of table-specific configurations defining which tables to migrate and how. Must contain at least one entry.
defaultTableConfigurationTableConfigurationShared settings inherited by all tables in the tables array. Table-specific values override these defaults.
affinityStringAn affinity group string. Ensures that only Orchestrator and Worker instances with a matching affinity process this workflow.

When defaultTableConfiguration is present, each object in tables is merged with those defaults: shared fields apply to every table unless the same field is set again on a specific table entry.

TableConfiguration model

Defines the settings for migrating a single table.

PropertyTypeRequiredDescription
sourceSourceTargetIdentifierIdentifies the source table.
targetSourceTargetIdentifierIdentifies the target table in Snowflake.
columnNamesToPartitionByString[]Columns used to partition data during extraction.
extractionExtractionStrategyHow data is extracted from the source database.
synchronizationSynchronizationStrategySettings for incremental synchronization.
columnTypeMappingsColumnTypeMappingType conversions applied during migration.
columnNameMappingsColumnNameMappingColumn renaming mappings.
primaryKeyColumnsString[]Primary key columns. Required for trackModifications or trackDeletions under the watermark synchronization strategy. Can be omitted and inferred automatically at runtime.
targetPartitionSizeMbIntegerTarget partition size in MB. Mutually exclusive with targetPartitionSizeRows. Must be greater than 0. When both are omitted, the orchestrator picks sizes automatically. See Partition size.
targetPartitionSizeRowsIntegerTarget partition size in rows. Mutually exclusive with targetPartitionSizeMb. Must be greater than 0. When both are omitted, the orchestrator picks sizes automatically. See Partition size.
whereClauseCriteriaStringSQL-like filter to select a subset of rows (for example, "is_deleted = 0").
loadSegmentationLoadSegmentationSplits a single COPY INTO into multiple parallel statements, each targeting a subset of staged files. Useful when many files are staged for one partition (common with Redshift UNLOAD). See Load segmentation.
queryModifiersQueryModifiersOptional SQL hints appended to source queries to reduce locking on busy source tables. Default is unset (no hints). See Anti-locking and query modifiers.

QueryModifiers model

PropertyTypeDescription
objectModifierStringText appended after the source table in the FROM clause (for example " WITH (NOLOCK)" on SQL Server).
selectModifierStringToken inserted immediately after SELECT (for example an Oracle optimizer hint). Use "NONE" to disable Oracle’s automatic parallel hint.

SourceTargetIdentifier model

PropertyTypeRequiredDescription
databaseNameStringSource or target database name.
schemaNameStringSchema containing the table.
tableNameStringTable to migrate.

Additional target properties

The following optional fields apply only to the target object.

PropertyTypeRequiredDescription
tableTypeString"native" for a standard Snowflake table (default) or "iceberg" for an Apache Iceberg™ table.
icebergConfigObjectFor Iceberg targetsRequired when tableType is "iceberg". See Iceberg configuration.

Iceberg configuration (target.icebergConfig)

Used when target.tableType is "iceberg". Account setup follows Snowflake’s Apache Iceberg™ tables documentation.

PropertyTypeRequiredDescription
catalogStringDefault SNOWFLAKE for Snowflake-managed Iceberg. Use a catalog integration name for externally cataloged tables.
externalVolumeStringFor catalog SNOWFLAKESnowflake external volume for Iceberg data and metadata.
baseLocationPrefixStringOptional path prefix for BASE_LOCATION.
catalogTableNameStringFor external catalogFully qualified name in the external catalog.
catalogSyncStringOptional catalog integration to sync Snowflake-managed metadata back to an external catalog.
sourceDataStageStringStage path starting with @ pointing at existing Parquet files.
migrationStrategyStringOne of catalog_link, convert_to_managed, or copy_files.

Partition size

Partition size is controlled at the TableConfiguration level with two flat, mutually exclusive fields: targetPartitionSizeMb and targetPartitionSizeRows. When both are omitted, the orchestrator uses auto sizing.

FormDescription
Both omitted (default)Auto. The orchestrator chooses partition sizes from the source platform, extraction strategy, and table size.
targetPartitionSizeMb: NEach partition targets about N megabytes of data. Must be greater than 0.
targetPartitionSizeRows: NEach partition targets N rows, regardless of data size. Must be greater than 0.

Specify at most one of the two fields; setting both on the same table is a configuration error.

Load segmentation

When a large number of files are staged for a single partition (common with Redshift UNLOAD), the orchestrator can split the COPY INTO into multiple parallel statements, each targeting a subset of files. All resulting statements fan in to the same successor task.

PropertyTypeRequiredDescription
targetSegmentSizeMbIntegerYesTarget total file size (in MB) per COPY INTO segment. Must be greater than 0.

When loadSegmentation is omitted, a single COPY INTO loads all files in the partition (the default). Files larger than the target size get their own segment, and Snowflake’s 1,000-file FILES limit is enforced per statement.

    loadSegmentation:
      targetSegmentSizeMb: 5000

ExtractionStrategy model

FieldTypeRequiredDescription
strategyString ("regular", "unload", "write_nos", "dbms_cloud", "tpt")regular (default): Worker pulls data over the source connection. unload (Redshift only): Redshift UNLOAD writes Parquet to S3. write_nos (Teradata only): Teradata WRITE_NOS writes to cloud storage. dbms_cloud (Oracle only): Oracle DBMS_CLOUD.EXPORT_DATA writes Parquet to object storage. tpt (Teradata only): Worker runs TPT EXPORT via tbuild.
externalStageStringSee descriptionRequired when strategy is unload, write_nos, or dbms_cloud. Snowflake external stage whose URL matches the bucket or container used for the server-side export. Not required for regular or tpt.

See Extraction strategies for YAML examples and platform availability.

SynchronizationStrategy model

FieldTypeRequiredDescription
strategyString ("none", "checksum", "watermark")Synchronization method. "none" (default) re-extracts fully on every run.
checksumExpressionStringchecksum only. Custom SQL aggregate expression that returns a single value per partition (for example a row-version column or MAX(last_modified)). Only partitions whose value changed since the last run are cleared and re-extracted. When omitted, the default per-column hash is used.
watermarkColumnStringwatermark onlyMonotonically increasing column name.
trackModificationsBooleanwatermark only. If true, uses the primary key to deduplicate modified rows after COPY INTO. Requires primaryKeyColumns.
trackDeletionsBooleanwatermark only. If true, extracts a full primary-key snapshot of each source partition on every incremental run and deletes target rows absent from the snapshot before loading new rows. Requires primaryKeyColumns. Independent of trackModifications; the two can be combined.

Note

Oracle: synchronization.strategy checksum is not supported. Use none or watermark on Oracle projects.

Affinity

By specifying an affinity for a workflow, you indicate that specific Workers should execute that workflow. Matching rules:

  • A task without affinity is picked up by any Worker.
  • A Worker without affinity picks up any task.
  • A task with a given affinity is not picked up by a Worker with a different affinity.

Extraction strategies

Each table can set extraction.strategy (or inherit from defaultTableConfiguration.extraction). Worker TOML holds connection and platform-specific options (UNLOAD credentials, WRITE_NOS location, TPT tuning).

StrategyPlatformsWhen to use
regular (default)AllMost tables. Worker pulls data over ODBC, BCP, Npgsql, or Teradata drivers, then uploads to the Snowflake internal stage.
unloadRedshift onlyLarge tables. Redshift writes Parquet to S3; Snowflake loads from an external stage. See Migrating Data from Amazon Redshift.
write_nosTeradata onlyServer-side export to S3, Azure Blob, or GCS plus Snowflake external stage. See Migrating Data from Teradata.
dbms_cloudOracle onlyServer-side export from Oracle to object storage via DBMS_CLOUD.EXPORT_DATA plus a Snowflake external stage. See Migrating Data from Oracle.
tptTeradata onlyLarge bulk loads via Teradata Parallel Transporter on the Worker. See Migrating Data from Teradata.

Regular (default):

tables:
  - source:
      databaseName: MY_DB
      schemaName: sales
      tableName: orders
    target:
      databaseName: TARGET_DB
      schemaName: sales
      tableName: orders
    columnNamesToPartitionBy:
      - order_id

Redshift unload:

    extraction:
      strategy: unload
      externalStage: TARGET_DB.PUBLIC.S3_EXTERNAL_STAGE

Teradata write_nos:

    extraction:
      strategy: write_nos
      externalStage: TARGET_DB.SALES.MY_CLOUD_STAGE

Oracle dbms_cloud:

    extraction:
      strategy: dbms_cloud
      externalStage: TARGET_DB.DATA_MIGRATION.ORA_EXPORT_STAGE

Teradata tpt:

    extraction:
      strategy: tpt

Worker configuration

The Worker configuration file uses TOML format. For cloud data migration, set selected_task_source to "snowflake_stored_procedure" and provide a matching [task_source.snowflake_stored_procedure] section.

SectionPropertyTypeDescription
Top levelselected_task_sourceStringRequired. Use "snowflake_stored_procedure".
[task_source.snowflake_stored_procedure]connection_nameStringSnowflake connection name for task-queue stored procedures, or "@SPCS_CONNECTION" on SPCS.
[application]max_parallel_tasksIntegerMaximum parallel tasks (threads).
[application]task_fetch_intervalIntegerSeconds between idle polls for new tasks.
[application]lease_refresh_intervalIntegerOptional. Seconds between task lease renewals (default 120).
[application]affinityStringOptional. Worker affinity; must align with workflow affinity when used.
[application]snowflake_database_for_metadataStringOptional. Task-queue database (default SNOWCONVERT_AI).
[application]local_results_directoryStringOptional. Base directory for exported Parquet/CSV before upload.
[connections.source.*](per engine)ObjectSource database connection. Typically one active source section.
[connections.target.snowflake_connection_name]connection_nameStringSnowflake profile for data sessions (loads).

Example minimal Worker config:

selected_task_source = "snowflake_stored_procedure"

[task_source.snowflake_stored_procedure]
connection_name = "my-snowflake"

[application]
max_parallel_tasks = 4
task_fetch_interval = 30

[connections.source.sqlserver]
username = "username"
password = "password"
database = "database_name"
host = "127.0.0.1"
port = 1433

[connections.target.snowflake_connection_name]
connection_name = "my-snowflake"

Platform-specific [connections.source.*] examples live on each Migrating Data from … page.

Anti-locking and query modifiers

User-configured anti-locking hints are off by default. Unless you set queryModifiers, AIM DMV runs plain source queries. Modifiers apply to source queries only, never the Snowflake target.

Per-platform behavior

PlatformDefault behaviorHow to customize
TeradataLOCKING ROW FOR ACCESS added automatically on every source scanNot configurable
SQL ServerNo automatic hintSet objectModifier: " WITH (NOLOCK)" on defaultTableConfiguration or per table
OracleAutomatic PARALLEL optimizer hint on large tablesOverride with selectModifier, or set selectModifier: "NONE" to disable
Amazon RedshiftNo automatic hintOpt-in pass-through via queryModifiers
PostgreSQLNo automatic hintOpt-in pass-through via queryModifiers

Pros and cons

ProsSource reads no longer block on or wait for locks held by production writers, so migration isn’t stalled by long-running source transactions. On Oracle, the parallel hint can speed large-table scans.
ConsWITH (NOLOCK) (and equivalent read-uncommitted hints) allow dirty reads: scans can see uncommitted rows that later roll back, so migration can copy data that never committed. Many DBAs disallow NOLOCK. Custom modifier strings are passed through verbatim, so an invalid hint can cause source query errors.
RecommendationLeave hints off unless source locking is actually blocking your workflow. When you do enable them, prefer running against a quiesced or low-write window.

Workflow example

Set a default on defaultTableConfiguration and override per table when needed:

defaultTableConfiguration:
  queryModifiers:
    objectModifier: " WITH (NOLOCK)"
tables:
  - source:
      databaseName: MY_DB
      schemaName: sales
      tableName: orders
    target:
      databaseName: TARGET_DB
      schemaName: sales
      tableName: orders
    queryModifiers:
      objectModifier: " WITH (NOLOCK)"

Worker TOML example

You can also set query modifiers in Worker TOML under the source connection:

[connections.source.sqlserver.query_modifiers]
object_modifier = " WITH (NOLOCK)"
select_modifier = ""

Warning

WITH (NOLOCK) uses read-uncommitted semantics. Scans can read uncommitted rows that later roll back, so migrated data may not match what ultimately committed on the source.