I am attempting to run postgreSQL stored procedures , through Azure Databricks notebooks .
We have stored procedure written in Azure Database for PostgreSQL and want to run postgreSQL stored procedures through Azure Databricks Notebook (using Pyspark/SQL).
Step 1: Install required libraries
Step 2: Connect with Azure Database for PostgreSQL using ODBC
import pyodbc
conn = pyodbc.connect( 'DRIVER=*{ODBC Driver 17 for SQL Server}*;' 'SERVER=mydatabe.database.azure.net;' 'DATABASE=AdventureWorks;UID=jonnyFast;' 'PWD=MyPassword')
Step 3: Execute stored procedure in Databricks
{ODBC Driver 17 for SQL Server} – Do you know how to install the ‘ODBC Driver 17 for PostgreSQL’ on a Databricks cluster?
Step 1: Install required libraries
Step 2: Connect with Azure Database for PostgreSQL using ODBC
import pyodbc
conn = pyodbc.connect( 'DRIVER=*{ODBC Driver 17 for SQL Server}*;' 'SERVER=mydatabe.database.azure.net;' 'DATABASE=AdventureWorks;UID=jonnyFast;' 'PWD=MyPassword')
Step 3: Execute stored procedure in Databricks
{ODBC Driver 17 for SQL Server} – Do you know how to install the ‘ODBC Driver 17 for PostgreSQL’ on a Databricks cluster?
Singh A is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.