File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -500,21 +500,21 @@ def snapshots(self) -> t.Dict[str, Snapshot]:
500500 def this_env (self ) -> str :
501501 """Returns the name of the current environment in before after all."""
502502 if "this_env" not in self .locals :
503- raise SQLMeshError ("Environment name is not available in this context " )
503+ raise SQLMeshError ("Environment name is only available in before_all and after_all " )
504504 return self .locals ["this_env" ]
505505
506506 @property
507507 def schemas (self ) -> t .List [str ]:
508508 """Returns the schemas of the current environment in before after all macros."""
509509 if "schemas" not in self .locals :
510- raise SQLMeshError ("Schemas are not available in this context " )
510+ raise SQLMeshError ("Schemas are only available in before_all and after_all " )
511511 return self .locals ["schemas" ]
512512
513513 @property
514514 def views (self ) -> t .List [str ]:
515515 """Returns the views of the current environment in before after all macros."""
516516 if "views" not in self .locals :
517- raise SQLMeshError ("Views are not available in this context " )
517+ raise SQLMeshError ("Views are only available in before_all and after_all " )
518518 return self .locals ["views" ]
519519
520520 def var (self , var_name : str , default : t .Optional [t .Any ] = None ) -> t .Optional [t .Any ]:
You can’t perform that action at this time.
0 commit comments