Skip to content

Commit 4b16d6f

Browse files
authored
Chore: Update error message and method docs (#887)
1 parent 507c89a commit 4b16d6f

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

sqlmesh/core/loader.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def update_model_schemas(dag: DAG[str], models: UniqueKeyDict[str, Model]) -> No
7070
if "*" in model.columns_to_types:
7171
raise ConfigError(
7272
f"Can't expand SELECT * expression for model '{name}'."
73-
" Projections for models that use external sources must be specified explicitly"
74-
" or use external models (https://sqlmesh.readthedocs.io/en/stable/concepts/models/external_models)."
73+
" Projects from an external source must either be explicitly specified within models or added as"
74+
" external models by using the command 'sqlmesh create_external_models'."
7575
)
7676
elif model.mapping_schema:
7777
try:
@@ -101,10 +101,11 @@ def __init__(self) -> None:
101101

102102
def load(self, context: Context, update_schemas: bool = True) -> LoadedProject:
103103
"""
104-
Loads all hooks, macros, and models in the context's path
104+
Loads all hooks, macros, and models in the context's path.
105105
106106
Args:
107-
context: The context to load macros and models for
107+
context: The context to load macros and models for.
108+
update_schemas: Convert star projections to explicit columns.
108109
"""
109110
# python files are cached by the system
110111
# need to manually clear here so we can reload macros

sqlmesh/dbt/loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def __init__(self) -> None:
4343
self._project: t.Optional[Project] = None
4444
super().__init__()
4545

46-
def load(self, context: Context) -> LoadedProject:
46+
def load(self, context: Context, update_schemas: bool = True) -> LoadedProject:
4747
self._project = None
48-
return super().load(context)
48+
return super().load(context, update_schemas)
4949

5050
def _load_scripts(self) -> t.Tuple[MacroRegistry, HookRegistry, JinjaMacroRegistry]:
5151
macro_files = list(Path(self._context.path, "macros").glob("**/*.sql"))

0 commit comments

Comments
 (0)