The Azure Cosmos DB for NoSQL account contoso-orders is mirrored into the Fabric workspace SalesAnalytics. Lakehouse1 in that workspace has a OneLake shortcut to the mirrored tables. A Spark notebook must write the results into the categoryMaxPrice container of the contoso-orders account so that an application can serve them. The database and container names are already set in writeConfig.
Which value should you assign to spark.cosmos.accountEndpoint in writeConfig?
To write back from a Fabric notebook, configure Spark with the NoSQL account's endpoint, credentials, database and container. The connector sends writes directly to the operational account, while the OneLake shortcut provides access to the analytical copy. For contoso-orders, the required endpoint is https://contoso-orders.documents.azure.com:443/.
- Not correct:
https://onelake.dfs.fabric.microsoft.com/SalesAnalytics/Lakehouse1.Lakehouse/. The source distinguishes the OneLake analytical copy from the operational account. The connector must write directly to the Cosmos DB endpoint, rather than this OneLake location. - Not correct:
https://contoso-orders.table.cosmos.azure.com:443/. Although this URL includes the account name, its host differs from the documents.azure.com endpoint used for NoSQL write-back in the source. - Not correct:
https://salesanalytics.documents.azure.com:443/. SalesAnalytics is the Fabric workspace. The connector endpoint must identify the contoso-orders Cosmos DB account. - Correct:
https://contoso-orders.documents.azure.com:443/. The source configures this setting with the Azure Cosmos DB for NoSQL account's documents.azure.com endpoint. This URL identifies the required contoso-orders account.