Cannot import Cosmosdb in databricks

Viewed 267

I setup a new cluster on databricks which using databricks runtime version 10.1 (includes Apache Spark 3.2.0, Scala 2.12). I also installed azure_cosmos_spark_3_2_2_12_4_6_2.jar in Libraries.

I create a new notebook with Scala

import com.microsoft.azure.cosmosdb.spark.schema._
import com.microsoft.azure.cosmosdb.spark.CosmosDBSpark
import com.microsoft.azure.cosmosdb.spark.config.Config

But I still get error: object cosmosdb is not a member of package com.microsoft.azure

Does anyone know which step I missing? Thanks

2 Answers

You may be missing the pip install step:

pip install azure-cosmos

Related