pacman82/odbc2parquet

return table from store procedure not available

GilbertoH16 opened this issue · 2 comments

I have store procedure to return table, error recieved from odbc2parquet:

Query came back empty (not even a schema has been returned). No file has been created.

Workarround: store procedure to writte on temp table and then odbc2parquet to read that temp table

Hello @GilbertoH16

odbc2parquet does not care about the difference between calling a stored procedure or a typical query using SELECT. It just send the text representation of the SQL to the database and stores the result set if any. Since the query worked for you, it is most likely that the Stored Procedure in question does not return a result set. Please note that there are other ways for stored proceduers to return their results.

If you feel this is a Bug still, and the statement in question should have returned a result set, the fault would most likely be either with the datasource or its ODBC driver.

Best, Markus

after your answer, I give it a shot to diffent things and found the final answer/fix.

MSSQL allow you to not set the RETURN sentence on the store procedure and still provide results. but when we use it for other cases, like this odbc connection, it must be explicit. after changing the store procedure to specifically set the return command, everything works as it should be.

so, not sure what need to be fixed, default behavior on mssql, odbc drivers, or odbc2parquet app, but still think this is something that should be written somewhere.