Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
APPLIES TO:
Cassandra
This article explains how to provision throughput in Azure Cosmos DB for Apache Cassandra. You can provision standard(manual) or autoscale throughput on a container, or a database and share it among the containers within the database. You can provision throughput using Azure portal, Azure CLI, or Azure Cosmos DB SDKs.
If you are using a different API, see API for NoSQL, API for MongoDB, API for Gremlin articles to provision the throughput.
Sign in to the Azure portal.
Create a new Azure Cosmos DB account, or select an existing Azure Cosmos DB account.
Open the Data Explorer pane, and select New Table. Next, provide the following details:
/userrID
).
Note
If you are provisioning throughput on a container in an Azure Cosmos DB account configured with API for Cassandra, use /myPrimaryKey
for the partition key path.
// Create a Cassandra table with a partition (primary) key and provision throughput of 400 RU/s
session.Execute("CREATE TABLE myKeySpace.myTable(
user_id int PRIMARY KEY,
firstName text,
lastName text) WITH cosmosdb_provisioned_throughput=400");
Similar commands can be issued through any CQL-compliant driver.
// Altering the throughput too can be done through code by issuing following command
session.Execute("ALTER TABLE myKeySpace.myTable WITH cosmosdb_provisioned_throughput=5000");
Similar command can be executed through any CQL compliant driver.
// Create a Cassandra keyspace and provision throughput of 400 RU/s
session.Execute("CREATE KEYSPACE IF NOT EXISTS myKeySpace WITH cosmosdb_provisioned_throughput=400");
Azure Resource Manager templates can be used to provision autoscale throughput on database or container-level resources for all Azure Cosmos DB APIs. See Azure Resource Manager templates for Azure Cosmos DB for samples.
Azure CLI can be used to provision autoscale throughput on a database or container-level resources for all Azure Cosmos DB APIs. For samples see Azure CLI Samples for Azure Cosmos DB.
Azure PowerShell can be used to provision autoscale throughput on a database or container-level resources for all Azure Cosmos DB APIs. For samples see Azure PowerShell samples for Azure Cosmos DB.
See the following articles to learn about throughput provisioning in Azure Cosmos DB:
Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Configure Azure Cosmos DB for NoSQL - Training
Select between the various throughput offerings in Azure Cosmos DB for NoSQL.
Certification
Microsoft Certified: Azure Cosmos DB Developer Specialty - Certifications
Write efficient queries, create indexing policies, manage, and provision resources in the SQL API and SDK with Microsoft Azure Cosmos DB.
Documentation
Replace an Offer - Azure Cosmos DB REST API
Learn how to replace an offer's properties by using a REST API request, the request and response object formats for this operation.
Offers - Azure Cosmos DB REST API
Create, query, and manage offers using REST API. Request and response headers, body, status codes and examples.
Aggregate operations on Azure Cosmos DB for Apache Cassandra tables from Spark
This article covers basic aggregation operations against Azure Cosmos DB for Apache Cassandra tables from Spark
Get an Offer - Azure Cosmos DB REST API
Get an offer REST API syntax. Request and response headers, body, status codes and examples.