Hi @Adepu Kranthi Kumar ,
Welcome to Microsoft Q&A!
Please have a try with below example or refer this official example and check whether any of them could be helpful to you.
CREATE PROCEDURE [dbo].get_ListOfOppToScore
AS
BEGIN
DECLARE @input_query NVARCHAR(MAX) = N'SELECT * FROM MIP_Dev.dbo.ListOfOpportunites'
EXEC sp_execute_external_script @language = N'Python', @script = N'
import pandas as pd
from ...
# Get data from input query
List_data = my_input_data
# Define the model
...
OutputDataSet = List_data
'
, @input_data_1 = @input_query
, @input_data_1_name = N'my_input_data'
WITH RESULT SETS (("Opp_ID" varchar(100) not null,...,"DealReg" varchar(100)));
END;
GO
Best regards,
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.