Database / Azure Cosmos DB interview questions
What is the Cosmos DB analytical store and Azure Synapse Link?
The Cosmos DB analytical store is a fully isolated, column-oriented copy of your operational data maintained automatically by Cosmos DB, designed for analytical queries. When you enable it on a container, Cosmos DB automatically synchronizes every insert, update, and delete from the row-oriented operational store to the columnar analytical store in near real time — without consuming your provisioned RU/s and without impacting the operational workload.
The columnar format is critical for performance: OLAP queries that aggregate millions of rows but only read 3-4 columns scan far less data in a columnar store than in a row-oriented one. The analytical store is also schema-agnostic — it handles heterogeneous JSON documents by inferring a column-based representation automatically.
Azure Synapse Link is the integration layer that connects the Cosmos DB analytical store to Azure Synapse Analytics. With Synapse Link, you can run Apache Spark notebooks or serverless SQL Pool queries directly against the Cosmos DB analytical store — no ETL pipeline, no data movement, no separate data warehouse copy. The data is always current because the analytical store synchronizes in near real time.
# Synapse Spark reading from Cosmos DB analytical store
df = spark.read.format("cosmos.olap") \
.option("spark.synapse.linkedService", "CosmosDbLink") \
.option("spark.cosmos.container", "orders") \
.load()
df.groupBy("region").agg(sum("amount").alias("total")).show()
Before Synapse Link, teams had to build nightly ETL jobs that exported Cosmos DB data to Azure Blob or Data Lake and then loaded it into Synapse — a pipeline with hours of lag and significant engineering overhead. Synapse Link eliminates this entirely, enabling what Microsoft calls HTAP (Hybrid Transactional/Analytical Processing).
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
