From 9a08c45e593cd3c25cea8814d02377fde85b3747 Mon Sep 17 00:00:00 2001 From: Giacomo Tagliabue Date: Tue, 3 May 2016 15:44:42 -0400 Subject: [PATCH] add additional postgres and redshift time grains (#429) --- caravel/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/caravel/models.py b/caravel/models.py index 4abc2a01426e9..dda42c326ff3c 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})"),