This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 38abf4e Add epoch funcs for BigQuery (#7567)
38abf4e is described below
commit 38abf4e07383e9ba14c50cb695edfd0868c2215f
Author: Ville Brofeldt <[email protected]>
AuthorDate: Fri Jun 7 20:01:58 2019 -0700
Add epoch funcs for BigQuery (#7567)
---
superset/db_engine_specs.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index 922e7cc..e0b2035 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -2421,6 +2421,14 @@ class BQEngineSpec(BaseEngineSpec):
return
[sqla.literal_column(c.get('name')).label(c.get('name').replace('.', '__'))
for c in cols]
+ @classmethod
+ def epoch_to_dttm(cls):
+ return 'TIMESTAMP_SECONDS({col})'
+
+ @classmethod
+ def epoch_ms_to_dttm(cls):
+ return 'TIMESTAMP_MILLIS({col})'
+
class ImpalaEngineSpec(BaseEngineSpec):
"""Engine spec for Cloudera's Impala"""