bigtable: edit to cbt tool regex warning for docs
Change-Id: Ib5aef7bb409f089198cedea40e554185071572f3
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/46410
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gary Elliott <garyelliott@google.com>
diff --git a/bigtable/cmd/cbt/cbt.go b/bigtable/cmd/cbt/cbt.go
index bac10a1..649bcf0 100644
--- a/bigtable/cmd/cbt/cbt.go
+++ b/bigtable/cmd/cbt/cbt.go
@@ -198,7 +198,7 @@
if a value is arbitrary bytes, you need to prefix it with a dollar sign and use single quotes.
Example:
- cbt -project my-bigtable-project -instance my-instance lookup my-table $'\224\257\312W\365:\205d\333\2471\315\'
+cbt -project my-project -instance my-instance lookup my-table $'\224\257\312W\365:\205d\333\2471\315\'
For convenience, you can add values for the -project, -instance, -creds, -admin-endpoint and -data-endpoint
@@ -429,16 +429,16 @@
" end=<row-row> Stop reading before this row\n" +
" prefix=<row-key-prefix> Read rows with this prefix\n" +
" regex=<regex> Read rows with keys matching this regex\n" +
- " Note: Using a regex to read rows results in a full\n" +
- " table scan, which can be slow\n" +
- " columns=[family]:[qualifier],... Read only these columns, comma-separated\n" +
+ " columns=<family>:<qualifier>,... Read only these columns, comma-separated\n" +
" count=<n> Read only this many rows\n" +
" cells-per-column=<n> Read only this many cells per column\n" +
" app-profile=<app-profile-id> The app profile ID to use for the request\n\n" +
" Examples: (see 'set' examples to create data to read)\n" +
" cbt read mobile-time-series prefix=phone columns=stats_summary:os_build,os_name count=10\n" +
" cbt read mobile-time-series start=phone#4c410523#20190501 end=phone#4c410523#20190601\n" +
- " cbt read mobile-time-series regex=\"phone.*\" cells-per-column=1\n",
+ " cbt read mobile-time-series regex=\"phone.*\" cells-per-column=1\n\n" +
+ " Note: Using a regex without also specifying start, end, prefix, or count results in a full\n" +
+ " table scan, which can be slow.\n",
Required: cbtconfig.ProjectAndInstanceRequired,
},
{
diff --git a/bigtable/cmd/cbt/cbtdoc.go b/bigtable/cmd/cbt/cbtdoc.go
index c958f25..f16f00a 100644
--- a/bigtable/cmd/cbt/cbtdoc.go
+++ b/bigtable/cmd/cbt/cbtdoc.go
@@ -87,7 +87,7 @@
if a value is arbitrary bytes, you need to prefix it with a dollar sign and use single quotes.
Example:
- cbt -project my-bigtable-project -instance my-instance lookup my-table $'\224\257\312W\365:\205d\333\2471\315\'
+cbt -project my-project -instance my-instance lookup my-table $'\224\257\312W\365:\205d\333\2471\315\'
For convenience, you can add values for the -project, -instance, -creds, -admin-endpoint and -data-endpoint
@@ -317,9 +317,7 @@
end=<row-row> Stop reading before this row
prefix=<row-key-prefix> Read rows with this prefix
regex=<regex> Read rows with keys matching this regex
- Note: Using a regex to read rows results in a full
- table scan, which can be slow
- columns=[family]:[qualifier],... Read only these columns, comma-separated
+ columns=<family>:<qualifier>,... Read only these columns, comma-separated
count=<n> Read only this many rows
cells-per-column=<n> Read only this many cells per column
app-profile=<app-profile-id> The app profile ID to use for the request
@@ -329,6 +327,9 @@
cbt read mobile-time-series start=phone#4c410523#20190501 end=phone#4c410523#20190601
cbt read mobile-time-series regex="phone.*" cells-per-column=1
+ Note: Using a regex without also specifying start, end, prefix, or count results in a full
+ table scan, which can be slow.
+