如何在 Redshift 中实现 Oracle 触发器类型的功能? [英] How to implement Oracle trigger kind of functionality in Redshift?

查看:17
本文介绍了如何在 Redshift 中实现 Oracle 触发器类型的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Oracle 中有一个触发器.任何人都可以帮助我如何将其复制到 Redshift 吗?DynamoDB 托管流类型的功能也可以使用.

I have a trigger in Oracle. Can anyone please help me with how it can be replicated to Redshift? DynamoDB managed stream kind of functionality will also work.

推荐答案

Redshift 不支持触​​发器,因为它是一个数据仓库系统,旨在能够在有限的时间内导入大量数据.因此,如果每行插入都能够触发触发器,则批量插入的性能将受到影响.这可能就是 Redshift 开发人员不愿意支持这一点的原因,我同意他们的看法.行为的触发器类型应该是在 OLTP 环境中运行的业务应用程序逻辑的一部分,而不是数据仓库逻辑.如果您想在插入或更新数据后在 DW 中运行一些代码,您必须将其作为数据管道的另一个步骤来执行.

Redshift does not support triggers because it's a data warehousing system which is designed to be able to import large amounts of data in a limited time. So, if every row insert would be able to fire a trigger the performance of batch inserts would suffer. This is probably why Redshift developers didn't bother to support this and I agree with them. The trigger type of behavior should be a part of business application logic that runs in OLTP environment and not the data warehousing logic. If you want to run some code in DW after inserting or updating data you have to do it as another step of your data pipeline.

这篇关于如何在 Redshift 中实现 Oracle 触发器类型的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆