Azure Synapse Analytics - Connect to Serverless SQL Pool via Spark using Managed Identity

Graeme Cash 76 Reputation points
2024-02-05T12:38:24.3166667+00:00

Hello Is it possible to connect to the serverless sql pool via Spark in Synapse using managed identity? I need to run queries against the serverless pool and have tried pyodbc. I can run queries using a SQL logon but when I try managed identity I get a timeout... OperationalError: ('HYT00', '[HYT00] [Microsoft][ODBC Driver 18 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')

driver = '{ODBC Driver 18 for SQL Server}'

cnxn = pyodbc.connect(f'Driver={driver};Server={server};Database={database};Port=1433;Authentication=ActiveDirectoryMsi')

I have also configured the Spark session to run as managed identity... User's image Thanks in advance

Azure Synapse Analytics
Azure Synapse Analytics

An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.


2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.