-
Notifications
You must be signed in to change notification settings - Fork 7
/
start_load_table_local.sh
executable file
·30 lines (22 loc) · 1.42 KB
/
start_load_table_local.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$(gcloud beta emulators bigtable env-init)
echo "To run examples with emulator, remember to set ENV param BIGTABLE_EMULATOR_HOST=$BIGTABLE_EMULATOR_HOST"
# https://cloud.google.com/bigtable/docs/quickstart-cbt
cbt -instance instance-1 -project project-1 createtable table-1
cbt -instance instance-1 -project project-1 ls
cbt -instance instance-1 -project project-1 createfamily table-1 cf1
cbt -instance instance-1 -project project-1 createfamily table-1 cf2
cbt -instance instance-1 -project project-1 ls table-1
cbt -instance instance-1 -project project-1 set table-1 key1 cf1:c1=value1
cbt -instance instance-1 -project project-1 set table-1 key2 cf1:c1=value2
cbt -instance instance-1 -project project-1 set table-1 key3 cf1:c1=value3
cbt -instance instance-1 -project project-1 set table-1 key4 cf1:c1=value4
cbt -instance instance-1 -project project-1 set table-1 key5 cf1:c1=value5
cbt -instance instance-1 -project project-1 set table-1 key6 cf1:c1=value6
# Set another version into key1
cbt -instance instance-1 -project project-1 set table-1 key1 cf1:c1=value1.v1
cbt -instance instance-1 -project project-1 set table-1 key1 cf1:c2=value1.c2
# Set another qualifier on key2
cbt -instance instance-1 -project project-1 set table-1 key2 cf1:c2=value2.c2
# Set another family on key3
cbt -instance instance-1 -project project-1 set table-1 key3 cf2:c1=value3.cf2
cbt -instance instance-1 -project project-1 read table-1