CData Python Connector for Azure Data Lake Storage

Build 22.0.8462

Calling Stored Procedures

You can execute stored procedures using either the execute() or callproc() method of the connection.

Call Stored Procedures Using the Execute Method

Stored procedures can be called by issuing EXECUTE commands. The stored procedures parameters are parameterized, as in the following example:

cmd = "EXECUTE DownloadFile Path = ?"
params = ["test/onePiece.txt"]
conn.execute(cmd, params)

Call Stored Procedures Using the Callproc Method

Rather than using "execute()", one can also use the callproc() method to execute the procedure. The method takes a procedure name and a list of parameters as its arguments:

cur = conn.cursor()
params = ["test/onePiece.txt"]
cur.callproc("DownloadFile", params)

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462