You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users may want to group their records with date and time fields by common intervals such as hours, months, quarters, years, etc. The appropriate grouping for a field will vary depend on the kind of data stored in that field. For example, if there are years ranging from 1500-2000 in the data, the user might want to group dates by century, but if the dates only range from 2008-2010, the user may want to group by month or quarter instead and centuries are useless.
We need to provide both useful grouping intervals for a given column and the ability to group by them.
Solution
We should support grouping by all valid date parts supported by Postgres' EXTRACT function. Documentation.
We should provide useful grouping intervals for a given column in the Column API.
We should extend our record grouping mechanism to accept date parts for columns of Date & Time types. We should only accept valid date parts based on the type of column (e.g. we should not accept century for TIME columns).
This involves:
Implementing the grouping in the backend
Updating the /api/v0/databases/<id>/types/ endpoint to store available grouping on this type
Additional context
Please see these PRs for code related to grouping:
Problem
Users may want to group their records with date and time fields by common intervals such as hours, months, quarters, years, etc. The appropriate grouping for a field will vary depend on the kind of data stored in that field. For example, if there are years ranging from 1500-2000 in the data, the user might want to group dates by century, but if the dates only range from 2008-2010, the user may want to group by month or quarter instead and centuries are useless.
We need to provide both useful grouping intervals for a given column and the ability to group by them.
Solution
EXTRACT
function. Documentation.century
forTIME
columns).This involves:
/api/v0/databases/<id>/types/
endpoint to store available grouping on this typeAdditional context
TIMESTAMP
data type in the backend #424DATE
data type in the backend #425TIME
data type in the backend #426The text was updated successfully, but these errors were encountered: