Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Calling a Stored Procedure inside an External Query

When I use External_Query, it works great except when I go to call a stored procedure with it:

SELECT * FROM EXTERNAL_QUERY("schema_name""CALL storedproc();");
or
SELECT * FROM EXTERNAL_QUERY("schema_name""CALL schema_name.storedproc();");
any suggestions?
0 2 194
2 REPLIES 2

Can you try below? Removed semicolon inside bracket

SELECT * FROM EXTERNAL_QUERY("cloudsql_instance_name.database_name", "CALL my_stored_procedure()");

Yes, that part is not the issue, I am able to return tables with no problem. when I switch it from "Select * table" to "CALL my_stored_procedure()" I get an error