From 96e6a77c8286ccbdd36f9c9b9314f89cd337c4e8 Mon Sep 17 00:00:00 2001 From: Iaroslav Zeigerman Date: Wed, 25 Jun 2025 11:48:18 -0700 Subject: [PATCH] Chore(doc): Fix the 'table_name' command in the table migration guide --- docs/guides/table_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/table_migration.md b/docs/guides/table_migration.md index 5556986316..351a704ac3 100644 --- a/docs/guides/table_migration.md +++ b/docs/guides/table_migration.md @@ -131,7 +131,7 @@ Consider an existing table named `my_schema.existing_table`. Migrating this tabl c. Create the model in the SQLMesh project without backfilling any data by running `sqlmesh plan [environment name] --empty-backfill --start 2024-01-01`, replacing "[environment name]" with an environment name other than `prod` and using the same start date from the `MODEL` DDL in step 3b. -4. Determine the name of the model's snapshot physical table by running `sqlmesh table_name --env [environment name] my_schema.existing_table`. For example, it might return `sqlmesh__my_schema.existing_table_123456`. +4. Determine the name of the model's snapshot physical table by running `sqlmesh table_name --env [environment name] --prod my_schema.existing_table`. For example, it might return `sqlmesh__my_schema.existing_table_123456`. 5. Rename the original table `my_schema.existing_table_temp` to `sqlmesh__my_schema.existing_table_123456` The model would have code similar to: