Looks like I can read rows with a prefixed key using cbt like so:
cbt -project someproject -instance someinstance read sometable prefix=abc
But how can I use the cbt
command to delete those rows as selected by the above command?
Looks like I can read rows with a prefixed key using cbt like so:
cbt -project someproject -instance someinstance read sometable prefix=abc
But how can I use the cbt
command to delete those rows as selected by the above command?
Copyright © 2021 Jogjafile Inc.
To be able to do this using only
cbt
, you would to parse the output of the read command and iterate through each result executing thedeleterow
command for the specific rows.Alternatively, you could use one of the Bigtable’s Client Libraries which would be much faster.
Like in the Java client, you will find this same functionality in the other clients as well, like in the DropRowRangeRequest class for the C# Client Library.
EDIT: To delete a few rows using only
cbt
you could use something like this: