Skip to content
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

WIP: Support for reusable SQL Macros #2787

Closed
wants to merge 3 commits into from
Closed

Conversation

Themiscodes
Copy link
Contributor

This is a WIP that introduces support for reusable user-defined SQL macros, fixes: #2505

These will be declared within the .sql files in the macros/ directory using the SQLMesh syntax:

@DEF(pythag, (x, y) -> sqrt(pow(x, 2) + pow(y, 2)));

Additionally, this enhancement will allow for nesting between macro functions defined in different files.

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.

Feature request: support user-defined macros written as SQL
1 participant