{"record":{"id":"f343c22635633ac1","repo":"vitessio/vitess","slug":"no-tables-to-move","errorCode":null,"errorMessage":"no tables to move","messagePattern":"no tables to move","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/wrangler/materializer.go","lineNumber":189,"sourceCode":"\t\t}\n\t} else {\n\t\tif len(strings.TrimSpace(tableSpecs)) > 0 {\n\t\t\ttables = strings.Split(tableSpecs, \",\")\n\t\t}\n\t\tksTables, err := wr.getKeyspaceTables(ctx, sourceKeyspace, wr.sourceTs)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(tables) > 0 {\n\t\t\terr = wr.validateSourceTablesExist(sourceKeyspace, ksTables, tables)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tif allTables {\n\t\t\t\ttables = ksTables\n\t\t\t} else {\n\t\t\t\treturn errors.New(\"no tables to move\")\n\t\t\t}\n\t\t}\n\t\tvar excludeTablesList []string\n\t\texcludeTables = strings.TrimSpace(excludeTables)\n\t\tif excludeTables != \"\" {\n\t\t\texcludeTablesList = strings.Split(excludeTables, \",\")\n\t\t\terr = wr.validateSourceTablesExist(sourceKeyspace, ksTables, excludeTablesList)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tvar tables2 []string\n\t\tfor _, t := range tables {\n\t\t\tif shouldInclude(t, excludeTablesList) {\n\t\t\t\ttables2 = append(tables2, t)\n\t\t\t}\n\t\t}\n\t\ttables = tables2","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/wrangler/materializer.go#L171-L207","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\nvtctldclient MoveTables --target-keyspace customer create --workflow mt1 --source-keyspace orig --tables \"\"\n# after\nvtctldclient MoveTables --target-keyspace customer create --workflow mt1 --source-keyspace orig --tables users,orders","handlingStrategy":"validation","validationCode":"# shell check before invoking MoveTables\nif [ -z \"$TABLES\" ] && [ \"$ALL_TABLES\" != \"true\" ]; then\n  echo \"error: provide --tables or --all-tables\"; exit 1\nfi","typeGuard":null,"tryCatchPattern":"err := wr.MoveTables(ctx, opts)\nif err != nil && strings.Contains(err.Error(), \"no tables to move\") {\n\t// surface a config error to the caller with the empty table list\n}","preventionTips":["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"],"tags":["movetables","wrangler","configuration"],"backgroundTag":"no-tables-to-move","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}