Not able to connect to cosmos Db in synapse using managed identity in Notebook

Sonali Dubey 0 Reputation points Microsoft Employee
2024-03-22T11:03:06.8333333+00:00

YI have try the below steps to connect Azure Cosmos DB using Apache Spark 2 in Azure Synapse Link:

Step1: Go to Linked and select the Azure Cosmos DB linked service and test the connection.

133591-image.png

Step2: Select the container and click on actions => New Notebook => Load streaming DataFrame from container.

133592-image.png

Step3: Select the Spark pool and run the code to load the dataframe from container.

133438-image.png

but we are still getting error.

Error :Py4JJavaError: An error occurred while calling o4047.load. : java.lang.RuntimeException: Resolving Azure CosmosDB LinkedService [SynapseCosmosDbMIConnect] in Azure Synapse failed.Validate the configured LinkedService. If still seeing this, try using the Azure CosmosDB account name and credentials directly.

Please let us know which approach we should use.

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.
4,392 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,447 questions
{count} votes