Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Create SQL queries for the Azure Cosmos DB SQL API using the Data Explorer and the .NET SDK
This learning path helps prepare you for Exam DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB.
Prerequisites:
Before starting this learning path, you should have experience of building cloud applications with Microsoft C# or a similar programming language.
Author queries for Azure Cosmos DB SQL API using the SQL query language.
Learning objectives:
After completing this module, you’ll be able to:
Prerequisites:
Before starting this module, you should have experience of building cloud applications with Microsoft C# or a similar programming language.
Q1. You are tasked with writing the shortest possible SQL query to select all items and include all fields from your container. Which of these queries is both valid and would accomplish this task?
SELECT FROM
SELECT FROM p
SELECT * FROM p
Q2. Which SQL keyword is used to flatten your query results into an array of a specific field value for each item?
FROM
VALUE
DISTINCT
Q3. You have a container named products. What must the data source be named after the FROM
keyword in the query?
Create SQL queries for Azure Cosmos DB SQL API that uses subqueries or cross-products.
Learning objectives:
After completing this module, you’ll be able to:
Prerequisites:
Before starting this module, you should have experience of building cloud applications with Microsoft C# or a similar programming language.
Q1. You have a container of products with JSON documents that contain a string property named name. The JSON documents also all contain a property named tags that’s an array of string values. You are tasked with authoring a SQL query that will create a cross-product of the document names and tags. Which SQL query should you use?
SELECT p.name, t.tags[0] FROM products p
SELECT p.name, t.tags FROM products p
SELECT p.name, t FROM products p JOIN t IN p.tags
Q2. Which method of the Microsoft.Azure.Cosmos.Container class takes in a SQL query as a string parameter and returns an iterator that can be used to iterate over the query results as deserialized C# objects?
GetItemQueryStreamIterator<>
GetItemQueryIterator<>
I hope this Execute queries in Azure Cosmos DB SQL API Microsoft Quiz Answers would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>