amazon-web-services - Redshift 加载数据问题:Redshift 表不支持指定的类型或函数(每条 INFO 消息一个)
问题描述
SELECT s.store_id AS store_key,
s.store_id,
a.address,
a.address2,
a.district,
c.city,
co.country,
a.postal_code,
st.first_name AS manager_first_name,
st.last_name AS manager_last_name,
now() AS start_date,
now() AS end_date
FROM staging_store s
JOIN staging_staff st ON (s.manager_staff_id = st.staff_id)
JOIN staging_address a ON (s.address_id = a.address_id)
JOIN staging_city c ON (a.city_id = c.city_id)
JOIN staging_country co ON (c.country_id = co.country_id)
我正在尝试使用上面的查询将我的 pagila 数据加载到 Redshift 中,我遇到了这个错误。找遍了,还是找不到解决的办法。
[Amazon](500310) Invalid operation: Specified types or functions (one per INFO message) not supported on Redshift tables.;
这是什么意思,如何解决?
解决方案
That is the Redshift error for referencing leader node information in a compute node based query - yes, it is a little cryptic. This often happens when you references leader tables and try to join them with compute node tables. But this isn't what you are doing. In your case I believe that "now()" is a leader function and deprecated - you need to use "getdate()" instead.
推荐阅读
- python - 如何使用 Xpath 从脚本中提取电话号码
- docker - 无法更改容器中的 Jupyter Lab 主题
- google-app-engine - 上游从上游读取响应标头时过早关闭连接,客户端:
- vb.net - VB:如何为计时器/按钮设置快捷键
- c - 宏中的变量
- bash - 如何正确比较 Bash 中的变量和字符串?
- c - 套接字如何在C中接受多个连接
- sql-server - Docker 网络中的 SQL Server:在 $PATH 中找不到可执行文件“:未知
- docker - Docker COPY 失败,没有这样的文件或目录
- javascript - 如何为表单Javascript中的选择分配数值