Retrieval of data from database using stored procedure in Spectrum Miner

Spectrum Miner supports retrieval of data from database using SQL statements and Views but it is not possible to retrieve the data using stored procedure directly. However, stored procedure can be called from view to retrieve the data from database. Follow these steps to create a stored procedure and call it from a view.

1.Create a Stored Procedure.
CREATE PROCEDURE dbo.<StoredProcedure_Name>
SELECT * FROM [<DB_name>].[dbo].[<Table_name>]
2. Create a View in Database and call Stored Procedure created in point #1.
CREATE VIEW [dbo].[<View_Name>]
SELECT * FROM OPENROWSET('SQLNCLI11', 'Server=<machine_name>;Trusted_Connection=yes;','exec [AdventureWorksDW2012].dbo.<StoredProcedure_Name>')
3. Write the SQL code to call the View in a .sql file and open it in Miner window.
select * from dbo.[<View_Name>];
UPDATED:  July 26, 2018