-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
This is a really great plugin and definitely simplifies preparing dates for SQlite!
I'm not sure if this would fit into this plugin (I realize that it is pretty aligned with the python library), but something that could potentially be really helpful would be an easy way to generate a date table. This would make it really easy to aggregated by different date parts to see a zoomed out picture, analyze seasonality, account for days where zero events happened, or calculate days between timestamps while excluding weekends or holidays.
Power BI, for instance, provides a function to generate all days that have been observed in the tables of the data model.
Emile posted details about how her team generated a date table when she was at GitLab. You may not be familiar with dbt so the syntax might look a bit strange to you (though also familiar since it's jinja2). I found where the table is currently documented to see what the code actually looks like (check "Compiled" under "Code"). It takes a while for that page to load for some reason.
That technique for generating a sequence is used because it works on pretty much all databases, but many databases have a function to do it. It looks like there's one for SQlite