@@ -35,7 +35,7 @@ Then, download the tools by running the following command:
3535``` console
3636curl -OL https://github.com/scalar-labs/scalardl/releases/download/v$VERSION/scalardl-tablestore-java-client-sdk-$VERSION.zip
3737unzip scalardl-tablestore-java-client-sdk-$VERSION.zip
38- mv scalardl-tablestore-java-client-sdk-$VERSION client
38+ mv scalardl-tablestore-java-client-sdk-$VERSION tablestore
3939```
4040
4141## Configure the client properties
@@ -71,7 +71,7 @@ Do not use the sample private key and certificate in production environments. Fo
7171Next, you can bootstrap TableStore by running the following command:
7272
7373``` console
74- client /bin/scalardl-tablestore bootstrap --properties client.properties
74+ tablestore /bin/scalardl-tablestore bootstrap --properties client.properties
7575```
7676
7777The bootstrap command internally registers identity information (a certificate or secret) and predefined contracts necessary to use TableStore.
@@ -91,11 +91,11 @@ Now you can execute SQL statements with TableStore. In this section, you'll try
9191You can create the sample table by running the following commands:
9292
9393``` console
94- client /bin/scalardl-tablestore execute-statement --properties client.properties \
94+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
9595--statement "CREATE TABLE employee (id STRING PRIMARY KEY, department STRING)"
9696```
9797``` console
98- client /bin/scalardl-tablestore execute-statement --properties client.properties \
98+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
9999--statement "CREATE TABLE department (id STRING PRIMARY KEY)"
100100```
101101
@@ -104,7 +104,7 @@ When creating a table, you need to specify the name and the primary key. You can
104104You can show the created tables by running the following command:
105105
106106``` console
107- client /bin/scalardl-tablestore execute-statement --properties client.properties \
107+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
108108--statement "SELECT * FROM information_schema.tables"
109109```
110110
@@ -133,26 +133,26 @@ Result:
133133Next, insert several ` employee ` records by running the following commands:
134134
135135``` console
136- client /bin/scalardl-tablestore execute-statement --properties client.properties \
136+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
137137--statement "INSERT INTO employee VALUES {'id': '1001', 'name': 'Alice', 'department': 'sales', 'salary': 654.3}"
138138```
139139``` console
140- client /bin/scalardl-tablestore execute-statement --properties client.properties \
140+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
141141--statement "INSERT INTO employee VALUES {'id': '1002', 'name': 'Bob', 'department': 'sales', 'salary': 543.2}"
142142```
143143``` console
144- client /bin/scalardl-tablestore execute-statement --properties client.properties \
144+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
145145--statement "INSERT INTO employee VALUES {'id': '1003', 'name': 'Carol', 'department': 'engineering', 'salary': 654.3}"
146146```
147147
148148Insert the corresponding ` department ` records as well by running the following commands:
149149
150150``` console
151- client /bin/scalardl-tablestore execute-statement --properties client.properties \
151+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
152152--statement "INSERT INTO department VALUES {'id': 'sales', 'location': 'Shinjuku', 'phone': '000-1234'}"
153153```
154154``` console
155- client /bin/scalardl-tablestore execute-statement --properties client.properties \
155+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
156156--statement "INSERT INTO department VALUES {'id': 'engineering', 'location': 'Shibuya', 'phone': '000-4321'}"
157157```
158158
@@ -161,7 +161,7 @@ client/bin/scalardl-tablestore execute-statement --properties client.properties
161161Then, check the inserted records. You need to specify at least a primary key or index key to select records. For example, you can get an ` employee ` record by specifying the primary key by running the following command:
162162
163163``` console
164- client /bin/scalardl-tablestore execute-statement --properties client.properties \
164+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
165165--statement "SELECT id, name, department FROM employee WHERE id = '1001'"
166166```
167167
@@ -179,7 +179,7 @@ Result:
179179You can also specify an index key to select records by running the following command:
180180
181181``` console
182- client /bin/scalardl-tablestore execute-statement --properties client.properties \
182+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
183183--statement "SELECT id, name, department FROM employee WHERE department = 'sales'"
184184```
185185
@@ -201,7 +201,7 @@ Result:
201201If you want to filter records, specify additional conditions by running the following command:
202202
203203``` console
204- client /bin/scalardl-tablestore execute-statement --properties client.properties \
204+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
205205--statement "SELECT id, name, department FROM employee WHERE department = 'sales' AND salary < 600"
206206```
207207
@@ -220,7 +220,7 @@ Result:
220220You can also join the two tables by running the following command:
221221
222222``` console
223- client /bin/scalardl-tablestore execute-statement --properties client.properties \
223+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
224224--statement "SELECT * FROM employee JOIN department ON employee.department = department.id WHERE employee.department = 'engineering'"
225225```
226226
@@ -244,7 +244,7 @@ Result:
244244You can update the ` employee ` records by running the following command:
245245
246246``` console
247- client /bin/scalardl-tablestore execute-statement --properties client.properties \
247+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
248248--statement "UPDATE employee SET salary = 754.3 WHERE department = 'engineering'"
249249```
250250
@@ -255,7 +255,7 @@ Make sure to specify at least a primary key or an index key to update the record
255255You can get the update history of a record by running the following command:
256256
257257``` console
258- client /bin/scalardl-tablestore execute-statement --properties client.properties \
258+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
259259--statement "SELECT history() FROM employee WHERE id = '1003'"
260260```
261261
@@ -285,7 +285,7 @@ Result:
285285If you want to limit the number of versions (ages), specify the ` LIMIT ` clause by running the following command:
286286
287287``` console
288- client /bin/scalardl-tablestore execute-statement --properties client.properties \
288+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
289289--statement "SELECT history() FROM employee WHERE id = '1003' LIMIT 1"
290290```
291291
@@ -311,7 +311,7 @@ In ScalarDL, you occasionally need to validate your data to make sure all the da
311311You can validate the table schema by running the following command:
312312
313313``` console
314- client /bin/scalardl-tablestore validate-ledger --properties client.properties \
314+ tablestore /bin/scalardl-tablestore validate-ledger --properties client.properties \
315315--table-name employee
316316```
317317
@@ -334,7 +334,7 @@ You should get a result like the following:
334334You can validate the record by running the following command:
335335
336336``` console
337- client /bin/scalardl-tablestore validate-ledger --properties client.properties \
337+ tablestore /bin/scalardl-tablestore validate-ledger --properties client.properties \
338338--table-name employee --primary-key-column-name id --column-value '"1001"'
339339```
340340
@@ -363,7 +363,7 @@ You should get a result like the following:
363363You can validate the index record by running the following command:
364364
365365``` console
366- client /bin/scalardl-tablestore validate-ledger --properties client.properties \
366+ tablestore /bin/scalardl-tablestore validate-ledger --properties client.properties \
367367--table-name employee --index-key-column-name department --column-value '"sales"'
368368```
369369
0 commit comments