Analyzes how well a candidate shard key would distribute a collection across the shards of a cluster.
The atlas api sub-command is automatically generated from the MongoDB Atlas Admin API and offers full coverage of the Admin API. Admin API capabilities have their own release lifecycle, which you can check via the provided API endpoint documentation link.
Analyzing a shard key samples documents on a live cluster and does not finish within one request, so it is submitted as a long-running operation: the request returns an operation to poll, and the completed analysis is a separate resource that the operation links to. To receive the most common shard key values, you must have the Project Data Access Read Only role or higher. Otherwise, MongoDB Cloud omits those values, because they come from the collection's data rather than from statistics about it.
Options
Name | Type | Required | Description |
|---|---|---|---|
-h, --help | false | help for shardKeyAnalyzer |
Inherited Options
Name | Type | Required | Description |
|---|---|---|---|
-P, --profile | string | false | Name of the profile to use from your configuration file. To learn about profiles for the Atlas CLI, see https://dochub.mongodb.org/core/atlas-cli-save-connection-settings. |
Related Commands
atlas api shardKeyAnalyzer createShardKeyAnalysis - Analyzes how well one candidate shard key would distribute one collection across the shards of the specified cluster.
atlas api shardKeyAnalyzer getAnalysisOperation - Returns the progress of one shard key analysis for the specified cluster.
atlas api shardKeyAnalyzer getShardKeyAnalysis - Returns one completed shard key analysis for the specified cluster.
atlas api shardKeyAnalyzer listAnalysisOperations - Returns every shard key analysis attempt for the specified cluster, newest first, including attempts that are still running and attempts that failed.
atlas api shardKeyAnalyzer listShardKeyAnalyses - Returns all completed shard key analyses for the specified cluster, newest first.