We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54d6f2c commit 65be7c6Copy full SHA for 65be7c6
data_diff/databases/databricks.py
@@ -92,7 +92,12 @@ def md5_as_hex(self, s: str) -> str:
92
93
def normalize_timestamp(self, value: str, coltype: TemporalType) -> str:
94
"""Databricks timestamp contains no more than 6 digits in precision"""
95
-
+ try:
96
+ is_date = coltype.is_date
97
+ except:
98
+ is_date = False
99
+ if isinstance(coltype, Date) or is_date:
100
+ return f"date_format({value}, 'yyyy-MM-dd')"
101
if coltype.rounds:
102
# cast to timestamp due to unix_micros() requiring timestamp
103
timestamp = f"cast(round(unix_micros(cast({value} as timestamp)) / 1000000, {coltype.precision}) * 1000000 as bigint)"
0 commit comments