Querying the Cosmos DB analytical store
With Azure Synapse, you get the option to choose between Spark or SQL as your compute environment. You can query a Cosmos DB analytical store using Spark and SQL Serverless, however, this feature is not available with SQL provisioned as of now.
Let's learn how to query data in the analytical store of a Cosmos DB container.
Querying with Azure Synapse Spark
Azure Synapse Spark allows you to analyze data in your Synapse Link enabled Azure Cosmos DB containers. You can query an analytical store from Spark in two possible ways:
- Loading data to a Spark DataFrame
- Creating a Spark table
A Spark DataFrame leverages the cached metadata through the lifetime of the Spark session, so any change in the source data will not be reflected here until you start a new Spark session. The metadata of the analytical store is reloaded on every query execution against the Spark table.
You can ingest data to the analytical store of...