(no title)
ahmedelsama | 4 years ago
I would love to know why warehouse do this because as a data person it confuses me and is even more confusing to explain to stakeholders.
ahmedelsama | 4 years ago
I would love to know why warehouse do this because as a data person it confuses me and is even more confusing to explain to stakeholders.
cedricd|4 years ago
I'm not necessarily the best person to defend it, but I think it has a couple nice properties.
1. it's an integer, so can be used in group_by, comparisons, bucketing, etc
2. it aligns to commonly understood boundaries, which helps with the above.
Another way to look at the boundary issue is that it only matters when things are close. If you get a 1 and don't like it, drop down a unit (year -> months or days) instead.
Comparing years the way I did above is obviously a bit of an edge case