Forum Discussion
Calling Stored Procedure for Big Query as Power BI Data Source
- 1 year ago
Yes, you can use stored procedures in Power BI Import mode by entering a native SQL query (e.g., EXEC MyProcedure), but only if the procedure returns a single result set and has no output parameters. For more stability, it's better to use a SQL view instead.
Power BI does support executing stored procedures in DirectQuery mode, but there are certain limitations. For instance, stored procedures that return multiple result sets or include output parameters are not supported.
I have not been trying to use DirectQuery mode: I have just been trying to connect to the datasource via Get Data > Google BigQuery > Advanced Options > SQL Statement.
After successful connection, I am able to select Import.
My Stored Procedure as is currently creates a number of temp tables; would this be an issue?
- mh25871 year ago
Super User
Yes, you can use stored procedures in Power BI Import mode by entering a native SQL query (e.g., EXEC MyProcedure), but only if the procedure returns a single result set and has no output parameters. For more stability, it's better to use a SQL view instead.
- Anonymous1 year agoNot applicable
Thank you!
At the moment, I converted the SQL query to use tables instead of temp tables, then I use a query in Power BI to pull from there. I'm hoping to convert that to a view instead.
Thank you all for your timely feedback!