在ETL期间,我们执行以下操作:
begin transaction;
drop table if exists target_tmp;
create table target_tmp like target;
insert into target_tmp select * from source_a inner join source_b on ...;
analyze table target_tmp;
drop table target;
alter table target_tmp rename to target;
commit;
Run Code Online (Sandbox Code Playgroud)
如果这很重要,则由AWS Data Pipeline执行SQL命令。
但是,管道有时会失败,并显示以下错误:
ERROR: table 111566 dropped by concurrent transaction
Run Code Online (Sandbox Code Playgroud)
Redshift支持可序列化的隔离。这些命令之一会中断隔离吗?
sql transactions amazon-web-services amazon-redshift amazon-data-pipeline