From the course: AWS Certified Data Engineer Associate (DEA-C01) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Transform data with stored procedures

Transform data with stored procedures

- [Instructor] We may need to repeatedly perform multiple actions on our data all at once or perform a custom transformation. In this lesson, we'll learn about stored procedures and user-defined functions in Redshift. Stored procedures are commonly used to encapsulate logic for data transformation, data validation, and business-specific logic. By combining multiple SQL steps into a stored procedure, you could reduce round trips between your applications and the database. The application or client just has to call the stored procedure once and all the commands and the procedure will be executed. A stored procedure lets you limit user permissions by just giving a user access to run the procedure without having to give them permissions for the underlying cables. Redshift's stored procedures are written using the Postgres procedural language. You can create a stored procedure using the create procedure command. It's common just to use Create a replace procedure since that will update an…

Contents