Skip to content

Commit

Permalink
Week beginning Monday time grain for MySQL (#2014)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmcruickshank authored and mistercrunch committed Jan 23, 2017
1 parent 404a94c commit 37fb56c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ class MySQLEngineSpec(BaseEngineSpec):
"+ INTERVAL QUARTER({col}) QUARTER - INTERVAL 1 QUARTER"),
Grain("year", _('year'), "DATE(DATE_SUB({col}, "
"INTERVAL DAYOFYEAR({col}) - 1 DAY))"),
Grain("week_start_monday", _('week_start_monday'),
"DATE(DATE_SUB({col}, "
"INTERVAL DAYOFWEEK(DATE_SUB({col}, INTERVAL 1 DAY)) - 1 DAY))"),
)

@classmethod
Expand Down

0 comments on commit 37fb56c

Please sign in to comment.