mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
Add quarter time grain to postgresql (#1362)
The timestamp returned is the start date of the period. Reference: https://www.postgresql.org/docs/9.1/static/functions-datetime.html
This commit is contained in:
parent
2095095895
commit
0dff6a9030
@ -56,6 +56,7 @@ class PostgresEngineSpec(BaseEngineSpec):
|
|||||||
Grain("day", _('day'), "DATE_TRUNC('day', {col})"),
|
Grain("day", _('day'), "DATE_TRUNC('day', {col})"),
|
||||||
Grain("week", _('week'), "DATE_TRUNC('week', {col})"),
|
Grain("week", _('week'), "DATE_TRUNC('week', {col})"),
|
||||||
Grain("month", _('month'), "DATE_TRUNC('month', {col})"),
|
Grain("month", _('month'), "DATE_TRUNC('month', {col})"),
|
||||||
|
Grain("quarter", _('quarter'), "DATE_TRUNC('quarter', {col})"),
|
||||||
Grain("year", _('year'), "DATE_TRUNC('year', {col})"),
|
Grain("year", _('year'), "DATE_TRUNC('year', {col})"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user