Forum Discussion
ebjm
8 years agoRegular Visitor
How to pass a parameter to a MySQL stored procedure from powerBI
Hi - I am using powerBI to connect to a MySQL server. We can connect fine and we can receive data fine - I am calling a stored procedure from powerBI using the following command; CALL my_sp(); My...
Anonymous
8 years agoNot applicable
How are you passing it?
ebjm
8 years agoRegular Visitor
I pass it through the 'SQL statement' text field after 'Get Data'.
- Anonymous8 years agoNot applicable
I'm not too familiar with MySQL but when connecting to SQL Server, Power BI will wrap the entire command in a SELECT.
That leads me to believe that
SELECT
*
FROM (CALL my_sp();
)will work but the following won't:
SELECT * FROM (SET @p0 = 'xyz'; CALL my_sp(@p0); )
Maybe that's the reason for your troubles. But like I said in an earlier post, take a look at my video and you can get around your issue if your situation fits. It involves using an R visual to run your SP instead of the Get Data function of Power BI.
Hope this helps,
Parker