How to execute a MS-SQL stored procedure in Dataiku

Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,410 Neuron

Not a question but an answer as I couln't find any relevant posts. I solved this problem using a SQLExecutor2 in a Python recipe:





from dataiku import SQLExecutor2




executor = SQLExecutor2(connection="connection name")




sql_str = """Execute sp_name 'param1','param2', 'param3'"""




output_df = executor.query_to_df(sql_str, post_queries=['COMMIT'])



Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.