question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`az cosmosdb database list` does not list db names in table format

See original GitHub issue

Description

az cosmosdb database list -g MYRG -n MYDB -otable
_colls    _etag                                   _rid      _self                 _ts  _users
--------  --------------------------------------  --------  -------------  ----------  --------
colls/    "00006003-0000-0000-0000-594da9980000"  GBtJAA==  dbs/GBtJAA==/  1498261906  users/
az cosmosdb database list -g MYRG -n MYDB -ojson
[
  {
    "_colls": "colls/",
    "_etag": "\"00006003-0000-0000-0000-594da9980000\"",
    "_rid": "GBtJAA==",
    "_self": "dbs/GBtJAA==/",
    "_ts": 1498261906,
    "_users": "users/",
    "id": "MyDatabaseName"
  }
]

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: interactive script

CLI Version: What version of the CLI and modules are installed? (Use az --version)

$ az --version
azure-cli (2.0.8)

acr (2.0.6)
acs (2.0.8)
appservice (0.1.8)
batch (3.0.1)
billing (0.1.1)
cdn (0.0.4)
cloud (2.0.4)
cognitiveservices (0.1.4)
command-modules-nspkg (2.0.0)
component (2.0.5)
configure (2.0.8)
consumption (0.1.1)
core (2.0.9)
cosmosdb (0.1.8)
dla (0.0.8)
dls (0.0.8)
feedback (2.0.4)
find (0.2.4)
interactive (0.3.4)
iot (0.1.7)
keyvault (2.0.6)
lab (0.0.6)
monitor (0.0.6)
network (2.0.8)
nspkg (3.0.0)
profile (2.0.6)
rdbms (0.0.3)
redis (0.2.5)
resource (2.0.8)
role (2.0.6)
sf (1.0.3)
sql (2.0.5)
storage (2.0.8)
vm (2.0.8)

Python (Darwin) 2.7.10 (default, Feb  7 2017, 00:08:15) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]

Python location '/Users/debekoe/lib/azure-cli/bin/python'

OS Version: What OS and version are you using?
macOS Sierra

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
bash

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tjprescottcommented, Jun 7, 2019

@shurd you should be able to provide a custom table format to display the ID. Worst case you alias the column name. Scripts should not be utilizing table format anyways, so it would not break any scripts.

0reactions
shurdcommented, Jun 12, 2019

We are tracking this change internally as work item 448974. We expect to deliver this change by the middle of July. The table output for collection and database will show the resource names with the change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az cosmosdb database | Microsoft Learn
Returns a boolean indicating whether the database exists. az cosmosdb database list. Lists all Azure Cosmos DB databases. az cosmosdb database show. Shows...
Read more >
List databases in a CosmosDB instance using the AZ ...
The CosmosDB that I am attempting to query absolutely does exist, derived by running the command az cosmosdb list , and I copied...
Read more >
Overview (Azure SDK for Java Reference Documentation) - NET
Azure Storage Tables client library is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schemaless...
Read more >
@azure/cosmos - npm
Azure Cosmos DB is a globally distributed, multi-model database service ... tsv az cosmosdb keys list --resource-group <your-resource-group> ...
Read more >
Azure Cosmos DB SQL API client library for Python - PyPI
Azure Cosmos DB is a globally distributed, multi-model database service that ... ACCOUNT_KEY=$(az cosmosdb list-keys --resource-group $RES_GROUP --name ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found