【发布时间】:2022-01-12 08:27:19
【问题描述】:
我需要将用 hive-SQL 编写的脚本转换为 Redshift 的 SQL。
我被以下部分卡住了:
select date_format(date_add(date_sub(current_date,cast(from_unixtime(unix_timestamp(current_date, 'yyyy-MM-dd'),'u') as int)),7), 'dd MMM')
没有使用 hive-sql 的时间戳功能的经验,我无法在 redshift 中重写这一行。
`current_date` 实际上是一个时间戳列,在此列上完成了一些计算。
请提供一些见解/建议。这将非常有帮助。
【问题讨论】:
标签: hive amazon-redshift hiveql unix-timestamp amazon-redshift-spectrum