Forum Discussion
JDBC connection to Fabric Lakehouse SQL endpoint using notebook
Hi,
We are trying to connect to the SQL endpoint of a Fabric lakehouse using a JDBC connection in a notebook in Fabric. The reason for this is that we want to access the SQL views created in the endpoint. There is a service principal created for this and it has read access to the Fabric workspace.
We have tried to connect using code from example screenshot below found at: https://learn.microsoft.com/en-gb/training/modules/ingest-data-with-spark-fabric-notebooks/2-connect-authenticate
The only change is that we have used the property Authentication=ActiveDirectoryPassword instead of ActiveDirectoryIntegrated.
When trying to connect to the endpoint however, we get the following error:
We have also tried doing the same connection with the same service principal using PYODBC and this works fine. Would like to use JDBC though, or at least know if it is possible.
Would greatly appreciate if anyone has any input regarding this, if there is anything clearly wrong in our connection, how to proceed with troubleshooting etc.
Thanks in advance!
- Anonymous2 years ago
Hi rettep48
Apologies for the issue you have been facing. I have contacted the internal team and they have confirmed that there is an ongoing bug regarding this issue. I will keep you updated regarding the bug. For now please use the pyodbc connection as it works good.
Hope this helps. Please let me know if you have any further questions.