-
Notifications
You must be signed in to change notification settings - Fork 977
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
Example of custom macros in get_where_subquery #2418
Conversation
✅ Deploy Preview for docs-getdbt-com ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is... __wild__
! Thank you for documenting this possibility!
It's an example of very __lightweight__
, roll-your-own string interpolation using __magic__
strings rather than start/end delimiters. Now I'm curious how far an __enterprising__
person could get with defining and parsing their own delimiters!
(Feel free to go on your own Mad Libs® adventure and replace my comments above using the adjectives of your choice.)
Two things to resolve (both of which have inline suggestions):
- Choose either "use" or "access" as the MadLibs verb to proceed "custom macros" (but probably not both)
- Choose whether or not to namespace the
dateadd
andcurrent_timestamp
macros
Just picked some options so we can get this merged. Nothing stopping us from continuing to make updates if we change our minds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just committed some suggestions from my original review to get this merged.
If it turns out we actually wanted different text, there is nothing stopping us from continuing to make updates.
Description & motivation
We get this question a lot:
Folks want to be able to stick custom macros in the
where
config for tests. While that isn't directly possible today — and that limitation is worth documenting explicitly — there's a halfway-decent workaround that's worth documenting.