Cosmos SQL Container
  • 12 Feb 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Cosmos SQL Container

  • Dark
    Light
  • PDF

Article Summary

Azure Cosmos SQL

Azure Cosmos DB SQL API accounts provide support for querying items using the Structured Query Language (SQL), one of the most familiar and popular query languages, as a JSON query language.

With Turbo360, it is possible to manage Cosmos SQL Containers.

Once an Azure Cosmos SQL Container is associated with Turbo360's Business Application, it can be managed from a central place.

Cosmos SQL Database can contain any number of containers; each container can be managed separately by associating it with Turbo360.

Execute SQL Queries

Turbo360 extends its capability to execute SQL Queries without a need to switch to any database management tools.

Execute Query.png

Users can also save a query and run the associated stored procedures.

The saved queries can be opened by clicking the Saved queries option availabe at the top of the section.

Saved queries.png

Stored Procedures

The stored procedures present in the container will be listed by:

  1. selecting the required procedure
  2. providing the appropriate input,

Users can execute the stored procedures in Turbo360.

Stored procedures.png

SELECT queries and Stored Procedures can only be executed from Turbo360. DML and DDL statements are restricted to prevent SQL injection attacks.

Managing Container item

Users can select the results from the executed query and choose to perform either deletion or update of that item.

Manage container item.png

Bulk deletion of items is also possible. On clicking the item id, a blade will be displayed where users will be able to edit and update the item.

Turbo360 also provides the capability to save the queries that are frequently used, so that the process of manually entering the query can be eliminated.

Resource Dashboard

A default resource dashboard is available for Cosmos SQL Container resources in the Overview section, allowing for enhanced data visualization and tracking of real-time data.

Resource dashboard.png

Users are provided with the following pre-defined Dashboard widgets, which can be customised to meet their specific needs.

1. Metadata Requests
2. Total Requests vs Total Request Units
3. Cosmos Container Summary
4. Total Requests

Monitoring

  1. Navigate to Cosmos SQL Container -> Monitoring to configure monitoring rules.
  2. You can configure the monitoring metrics under the Metrics and Properties tab and query rules under the Queries tab.

Metric monitoring

  1. Switch to the Metrics and properties tab to configure rules for metric monitoring
  2. Select the necessary monitoring metrics and configure the threshold values
  3. Click Save

The threshold values can also be provided with any metric name, defining the monitoring rule to be violated when the metric value configured at threshold field is met.

Cosmos container - Metric monitoring.png

Monitoring rules will be saved for Cosmos SQL Container, and the monitoring state for the metrics will be reflected after every monitoring cycle.

Query monitoring

  1. Switch to the Queries tab to configure rules for query monitoring
  2. Click Add
  3. Enter a name to the query rule
  4. You can enter the desired query by choosing Enter query (or) select one from the list of saved queries by choosing Open from saved queries
  5. Click Validate to validate the query
  6. Click Save

Cosmos container - query monitoring.png

Query monitoring will be initiated once the rules are saved, and the query monitoring state will be reflected after every monitoring cycle.


Was this article helpful?