Skip to content

Commit

Permalink
add presto dttm format
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekrached committed May 26, 2016
1 parent 7d27692 commit 7284e1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ def dttm_converter(self, dttm):
'oracle':
"""TO_TIMESTAMP('{}', 'YYYY-MM-DD"T"HH24:MI:SS.ff6')""".format(
dttm.isoformat()),
'presto': default,
'presto': "CAST('{}' AS TIMESTAMP)".format(
dttm.strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]),
'sqlite': default,
}
for k, v in d.items():
Expand Down

0 comments on commit 7284e1f

Please sign in to comment.