Skip to content

Chore: edits to macros concepts doc this_model section #4525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2025

Conversation

treysp
Copy link
Contributor

@treysp treysp commented May 23, 2025

No description provided.

@treysp treysp requested a review from georgesittas May 23, 2025 23:18
@treysp treysp changed the title Chore: Trey edits to macros concepts doc this_model section Chore: edits to macros concepts doc this_model section May 23, 2025
Copy link
Contributor

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way cleaner, thanks a lot Trey!


The physical table name of the invoking model can be accessed within a Python macro function through its evaluation context's `this_model` property.
All SQLMesh models have a name in their `MODEL` specification. We refer to that as the model's "unqualified" and "unresolved" name because it may not correspond to any specific object in the SQL engine.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the "unqualified" bit because a model's name can be qualified as well.

@georgesittas georgesittas merged commit f3d436e into jo/docs_this_model May 26, 2025
20 checks passed
@georgesittas georgesittas deleted the trey/this-model-edits branch May 26, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants