Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat output of 'buckets load sample' #284

Open
Westwooo opened this issue Mar 25, 2024 · 0 comments
Open

Reformat output of 'buckets load sample' #284

Westwooo opened this issue Mar 25, 2024 · 0 comments

Comments

@Westwooo
Copy link
Contributor

Currently when a bucket is imported through cbshell the output is:

> buckets load-sample travel-sample
╭───┬─────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ # │ cluster │                                               results                                               │
├───┼─────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0 │ local   │ {"taskId":"991a2e9c-6993-48e3-b8b0-2d05811e7a8c","sample":"travel-sample","bucket":"travel-sample"} │
╰───┴─────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────╯

This should be improved to fully utilise nushells tables and the result should look like this:

> buckets load-sample travel-sample
╭───┬─────────┬────────────────────────────────────────────────────────────────|
│ # │ cluster │    sample     |.            taskId                   |  status |                                              
├───┼─────────┼───────────────|──────────────────────────────────────|─────────|
│ 0 │ local   │ travel-sample | 991a2e9c-6993-48e3-b8b0-2d05811e7a8c | success |
╰───┴─────────┴────────────────────────────────────────────────────────────────|

The bucket name needs no longer be returned, since it is the same as the sample name. And for now the status field will always be success since if a request fails then an error is returned before any output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants