0 votes


Below is my code which reads the name of the dataset and prints it. Then it executes a Stored Procedure and prints the returned value. Somehow it is not reflecting in the generated log. Kindly suggest how to do so.

import dataiku
from dataiku.customrecipe import *

# Import the class that allows us to execute SQL on the Studio connections
from dataiku.core.sql import SQLExecutor2

# Recipe inputs
main_input_name = get_input_names_for_role('main')[0]
tblancovatest = dataiku.Dataset(main_input_name)

executor = SQLExecutor2(dataset=tblancovatest)
print main_input_name
ancova_run = executor.query_to_df("Exec SP_ANCOVA('"+main_input_name+"', 'GroupID', 'XVAL', 'YVAL', 0.05)")

# Recipe outputs
print ancova_run 

closed with the note: print command is working and output return values are now printed. The issue was with the understanding of pandas dataframe.
asked by
closed by
763 questions
787 answers
503 users