Skip to content

Commit

Permalink
Adding quarter time grain for Presto
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jun 23, 2016
1 parent e230d9d commit 141dc12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ def grains(self):
Grain('Time Column', _('Time Column'), '{col}'),
Grain('week', _('week'), "date_trunc('week', CAST({col} AS DATE))"),
Grain('month', _('month'), "date_trunc('month', CAST({col} AS DATE))"),
Grain('quarter', _('quarter'), "date_trunc('quarter', CAST({col} AS DATE))"),
Grain("week_ending_saturday", _('week_ending_saturday'), "date_add('day', 5, "
"date_trunc('week', date_add('day', 1, CAST({col} AS DATE))))"),
Grain("week_start_sunday", _('week_start_sunday'), "date_add('day', -1, "
Expand Down

0 comments on commit 141dc12

Please sign in to comment.