question

SANJEEV_MATTE avatar image
SANJEEV_MATTE asked

Alternative to a sql stored procedure in Amazon Redshift

Hello All, We are new to Amazon Redshift and we are planning to migrate the data(procs, cubes etc) from SQL Server to Redshift. I have gone through some articles and found that Redshift does not allow stored procedures. If that is the case my SSRS reports will fail. How do I handle the stored procedures in Redshift? Thanks.
sqlstored proceduresamazon-redshift
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
It rather depends on what your stored procedures are doing. If they are just selecting data, then you could [CREATE a VIEW][1]; you also have the option of creating python-based scalar functions. Failing that, it rather appears that you'll just have to redesign your reports to use different queries. [1]: http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_VIEW.html
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

SANJEEV_MATTE avatar image SANJEEV_MATTE commented ·
Thanks for the reply. you mean to say that instead of stored procedure need to use the query in the stored procedure directly in the report?
0 Likes 0 ·
ThomasRushton avatar image ThomasRushton ♦♦ commented ·
That's about it, yes.
0 Likes 0 ·
nilesh.deshmukh avatar image
nilesh.deshmukh answered
Stored procedure result is not just a selecting rows from table. It is more likely some sort manipulation and get the data into temp table, assign some values. How can we achieve this functionality in Redshift objects or any other alternatives? Does it support in python-based scalar function?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.