Forum Discussion

PBIAniket's avatar
PBIAniket
New Member
2 years ago

Calling Amazon Redshift stored procedure from power bi

Hello,

 

I have a stored procedure in Amazon Redshift which accepts a parameter and returns refcursor.

 

This refcursor has a set or rows based on parameter values.

 

I want to use and call this stored procedure from Power BI in direct query mode so that I can provide the input parameter values and get the data back.

 

But I am getting different syntax error (please see attched screenshot) when I am calling this stored procedure using below code.

 

begin;

Call myschemaname.myprocname('1-Jan-2024','1-Jan-2024','myRefCursor');

Fetch all from myRefCursor;

End;

 

This block runs fine in DBeaver or any other editor tool, but giving error when used same in Power Bi.

 

Kindly let me know, if I am doing this correct, does power bi support such call and that too in direct query mode, is syntax different in Power Bi while calling Redshift stored procedure.

Thanks!

 

  

 

2 Replies