File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717from sqlmesh .core .config import load_configs
1818from sqlmesh .core .context import Context
1919from sqlmesh .utils .date import TimeLike
20- from sqlmesh .utils .errors import MissingDependencyError
20+ from sqlmesh .utils .errors import MissingDependencyError , SQLMeshError
2121from pathlib import Path
2222
2323logger = logging .getLogger (__name__ )
@@ -907,7 +907,14 @@ def table_diff(
907907) -> None :
908908 """Show the diff between two tables or a selection of models when they are specified."""
909909 source , target = source_to_target .split (":" )
910- select_models = {model } if model else kwargs .pop ("select_model" , None )
910+ select_model = kwargs .pop ("select_model" , None )
911+
912+ if model and select_model :
913+ raise SQLMeshError (
914+ "The --select-model option cannot be used together with a model argument. Please choose one of them."
915+ )
916+
917+ select_models = {model } if model else select_model
911918 obj .table_diff (
912919 source = source ,
913920 target = target ,
You can’t perform that action at this time.
0 commit comments