From 252cba20de25407d8eab24b553ca073d34a75a77 Mon Sep 17 00:00:00 2001 From: aaronbannin Date: Wed, 4 Jul 2018 16:25:58 -0700 Subject: [PATCH] impala support for epoch timestamps (#5349) --- superset/db_engine_specs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py index 0441fe6a6c42a..0dc6f9b60301f 100644 --- a/superset/db_engine_specs.py +++ b/superset/db_engine_specs.py @@ -1425,6 +1425,10 @@ class ImpalaEngineSpec(BaseEngineSpec): Grain('year', _('year'), "TRUNC({col}, 'YYYY')", 'P1Y'), ) + @classmethod + def epoch_to_dttm(cls): + return 'from_unixtime({col})' + @classmethod def convert_dttm(cls, target_type, dttm): tt = target_type.upper()