Skip to content

Commit

Permalink
add macros context peroperty
Browse files Browse the repository at this point in the history
  • Loading branch information
karunpoudel authored Sep 22, 2022
1 parent 81118d9 commit 1ec45c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/dbt/context/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,10 @@ def env_var(self, var: str, default: Optional[str] = None) -> str:
msg = f"Env var required but not provided: '{var}'"
raise_parsing_error(msg)

@contextproperty
def macros(self) -> Dict[str, Any]:
return self.manifest.macros


class MacroContext(ProviderContext):
"""Internally, macros can be executed like nodes, with some restrictions:
Expand Down

0 comments on commit 1ec45c1

Please sign in to comment.