首页 > 解决方案 > 删除由 Amazon Redshift 创建的临时表

问题描述

我正在尝试删除由 Redshift 创建的临时表。我使用以下查询来查找集群中的所有临时表:

select name, count(distinct id)
from stv_tbl_perm
where temp = 1
group by 1

我要删除的表称为$stg_inappshourly. 我试图在以下两种方法中删除它:

drop table $stg_inappshourly
drop table stg_inappshourly

第一个返回语法错误。第二个删除实际表。

任何想法如何丢弃它?

标签: amazon-redshifttemp-tables

解决方案


解决了。

该表保持存在的原因是其会话出现错误并且未按预期关闭。

我发现删除此表的唯一方法是重新启动 Redshift 实例。


推荐阅读