I am trying to get the status of the latest firestore export via Gcloud CLI.
However, if I execute
gcloud firestore operations list --limit=5 --sort-by="~metadata.startTime"
the results are not sorted by the start time in descending order. If I add --format="value(metadata.startTime)"
, I get the correct output
2023-01-17T00:05:13.818312Z
2023-01-17T15:30:19.362908Z
2023-01-18T08:11:18.433556Z
2023-01-19T00:05:01.440255Z
2023-01-20T00:05:04.135387Z
How can I achieve the results being sorted by the startTime in descending order?
At first glance it seems you are using the --sort-by
flag incorrectly it should be used with [ ]
as per the documentation .
The final command would be:
gcloud firestore operations list --limit=5 --sort-by=[~metadata.startTime] --format="value(metadata.startTime)"
This will list the last 5 operations and sort them by start time in descending order.
But when I tried with above command also it seems the issue is still there.I have raised this issue at with google.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.