-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
feat(sqla): add time grain and time column to jinja params #16680
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16680 +/- ##
==========================================
- Coverage 76.91% 76.80% -0.12%
==========================================
Files 1005 1005
Lines 54017 54049 +32
Branches 7337 7339 +2
==========================================
- Hits 41549 41512 -37
- Misses 12228 12297 +69
Partials 240 240
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
268cbf5
to
0214e97
Compare
template_kwargs = { | ||
"from_dttm": from_dttm.isoformat() if from_dttm else None, | ||
"groupby": groupby, | ||
"metrics": metrics, | ||
"row_limit": row_limit, | ||
"row_offset": row_offset, | ||
"time_column": granularity, |
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.
nice!
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.
LGTM.
SUMMARY
Add
time_grain
andtime_column
variables to the default Jinja context. Also add default Jinja variables to the documentation.With the following virtual dataset:
The generated query looks as follows:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION