首页 > 解决方案 > 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.;

这是什么意思,如何解决?

标签: amazon-web-servicesamazon-redshiftetl

解决方案


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.


推荐阅读