From 0d44bd92610c61b38c02330a20359c2c29f941e1 Mon Sep 17 00:00:00 2001 From: Giacomo Tagliabue Date: Tue, 3 May 2016 10:57:31 -0400 Subject: [PATCH] add additional postgres and redshift time grains --- caravel/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/caravel/models.py b/caravel/models.py index 4abc2a01426e..dda42c326ff3 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -396,6 +396,8 @@ def grains(self): ), 'postgresql': ( Grain("Time Column", "{col}"), + Grain("second", "DATE_TRUNC('second', {col})"), + Grain("minute", "DATE_TRUNC('minute', {col})"), Grain("hour", "DATE_TRUNC('hour', {col})"), Grain("day", "DATE_TRUNC('day', {col})"), Grain("week", "DATE_TRUNC('week', {col})"),