首页 > 解决方案 > Redshift Alter table 命令返回“目标表和源表属性不匹配”。

问题描述

我有一个气流管道,它从现有表创建一个临时表,从 csv 加载数据,然后执行以下更改命令。

ALTER TABLE "schema"."table"
            APPEND FROM "schema"."table_staging"
            FILLTARGET

我观察到偶尔会重新调整以下错误,我只是删除了原始表并重新创建它,它会正常工作几天,然后我会再次遇到这个问题。

DETAIL:  
  -----------------------------------------------
  error:  Target table and source table attributes don't match.
  code:      8001
  context:   The source table and the target table have different sort keys. Both tables must use the same sort keys and sort style.
  query:     0
  location:  tbl_perm.cpp:2823
  process:   padbmaster [pid=19083]

我无法弄清楚为什么它突然开始破裂。

标签: mysqlamazon-redshiftairflowetl

解决方案


推荐阅读