Redshift Dynamic SQL Queries and Examples

When you are working on the various data sources and different kind of SQL queries, there may be situations where you want to generate dynamic SQL queries dynamically based on your requirement. In Redshift you can PREPARE SQL statement and EXECUTE it. Redshift also support use of EXECUTE command in Redshift stored procedures. In this article, we will check Redshift Dynamic SQL Queries, how to PREPARE them and run using EXECUTE statements. The dynamic SQL in Redshift can be useful in many scenarios, such as when you need to execute…

Continue ReadingRedshift Dynamic SQL Queries and Examples
Comments Off on Redshift Dynamic SQL Queries and Examples

Working with Amazon Redshift Stored Procedure

Amazon Redshift supports stored procedures written in PL/pgSQL, a dialect of the PostgreSQL database language. Stored procedures in Redshift are used to encapsulate logic on the database side and can be executed by multiple client applications, improving code reusability and reducing the amount of duplicated code in your applications. In this article, we will check how to create a stored procedure in Redshift using simple examples. Amazon Redshift Stored Procedure Overview Amazon Redshift stored procedures are used to encapsulate the data migration, data validation and business specific logic's and same time…

Continue ReadingWorking with Amazon Redshift Stored Procedure
Comments Off on Working with Amazon Redshift Stored Procedure