vitessio/vitess · error
no tables to move
Error message
no tables to move
What it means
MoveTables was asked to move tables but the resulting table list is empty: the caller did not pass --tables, allTables was false, and there is no fallback list of tables to use. Without an explicit or wildcard table set, the workflow has nothing to copy so wrangler aborts before creating any streams.
Source
Thrown at go/vt/wrangler/materializer.go:189
}
} else {
if len(strings.TrimSpace(tableSpecs)) > 0 {
tables = strings.Split(tableSpecs, ",")
}
ksTables, err := wr.getKeyspaceTables(ctx, sourceKeyspace, wr.sourceTs)
if err != nil {
return err
}
if len(tables) > 0 {
err = wr.validateSourceTablesExist(sourceKeyspace, ksTables, tables)
if err != nil {
return err
}
} else {
if allTables {
tables = ksTables
} else {
return errors.New("no tables to move")
}
}
var excludeTablesList []string
excludeTables = strings.TrimSpace(excludeTables)
if excludeTables != "" {
excludeTablesList = strings.Split(excludeTables, ",")
err = wr.validateSourceTablesExist(sourceKeyspace, ksTables, excludeTablesList)
if err != nil {
return err
}
}
var tables2 []string
for _, t := range tables {
if shouldInclude(t, excludeTablesList) {
tables2 = append(tables2, t)
}
}
tables = tables2View on GitHub (pinned to 01a25a7d17)
Solutions
- Pass an explicit table list: --tables t1,t2,t3
- Use --all-tables to move every table in the source keyspace
- Check the command/script that composes the table list for empty output
Example fix
# before vtctldclient MoveTables --target-keyspace customer create --workflow mt1 --source-keyspace orig --tables "" # after vtctldclient MoveTables --target-keyspace customer create --workflow mt1 --source-keyspace orig --tables users,orders
Defensive patterns
Strategy: validation
Validate before calling
# shell check before invoking MoveTables if [ -z "$TABLES" ] && [ "$ALL_TABLES" != "true" ]; then echo "error: provide --tables or --all-tables"; exit 1 fi
Try / catch
err := wr.MoveTables(ctx, opts)
if err != nil && strings.Contains(err.Error(), "no tables to move") {
// surface a config error to the caller with the empty table list
} Prevention
- Always pass explicit --tables or --all-tables
- Validate dynamically built table lists are non-empty before invoking
- Test automation scripts with a dry run before production migrations
When it happens
Trigger: Invoking MoveTables (via vtctldclient MoveTables create) without --tables and without an --all-tables / include-tables option such that tables ends up empty and allTables is false.
Common situations: Typo'd or empty --tables flag; scripting that builds the table list dynamically and passes an empty string; users confusing MoveTables on an unsharded keyspace where ksTables were not populated.
Related errors
- both atomic copy and partial mode cannot be specified for th
- --s3-backup-storage-bucket required
- direct DDL is disabled
- online DDL is disabled
- --batch-size requires 'direct' ddl_strategy
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/f343c22635633ac1.
Report an issue: GitHub.