【发布时间】:2021-04-17 03:49:24
【问题描述】:
我找到了这个主题的网址:
- https://cube.dev/docs/types-and-formats#dimensions-formats
- https://cube.dev/docs/working-with-string-time-dimensions
我没有找到时间类型的格式。
所以我尝试使用sql:PARSE_TIMESTAMP('%Y-%m-%d', date)
createdat: {
sql: `PARSE_TIMESTAMP('%Y-%m-%d',${CUBE}.\`createdAt\`)`,
type: `time`
},
它会返回一个错误:
Error: Error: scalar function 'parse_timestamp' is not supported
【问题讨论】: