user2712166
user2712166

Reputation: 81

Synapse pyspark - execute stored procedure on Azure SQL Database?

Ok, I'm trying to adapt some Databricks notebooks (pyspark) to Synapse. I need to execute stored procedures/DDL/etc. on a regular Azure SQL DB in several places. In DBX, there's a known, if somewhat clunky, way to accomplish it. In the init script, you install pyodbc and the linux odbc driver for SQL Server. Then in your notebook, you make a pyodbc connection for your "executenonquery" procedures, updates, DDL, etc.

In Synapse, pyodbc is one of the default libraries, but I'm not sure how to ensure the sql server odbc driver is installed/available. I confirmed that neither "ODBC Driver 18 for SQL Server" nor "ODBC Driver 17 for SQL Server" is installed. Is there any way to install the driver here?

Upvotes: 1

Views: 1286

Answers (1)

user2712166
user2712166

Reputation: 81

Ok, I was screwing up the url. Synapse does include "ODBC Driver 17 for SQL Server" by default. You can use the same methodology as in Databricks.

Upvotes: 1

Related Questions