メインコンテンツまでスキップ
バージョン: 3.12

ScalarDL TableStore Command Reference

This page introduces scalardl-tablestore, which is a client command for interacting with ScalarDL TableStore.

Overview of commands

  • Bootstrap TableStore
    • bootstrap: Bootstrap by registering identity and predefined contracts required to use TableStore.
  • Execute a statement
  • Validate the ledger
    • validate-ledger: Validate a specified record, index record, or table schema in TableStore.

bootstrap

Bootstrap by registering identity and predefined contracts required to use TableStore.

Options

OptionDescription
--config, --propertiesA configuration file in the .properties format.

Common utility options are also available.

Examples

scalardl-tablestore bootstrap --properties client.properties

execute-statement

Execute a specified statement.

Options

OptionDescription
--config, --propertiesA configuration file in the .properties format.
--statementA statement to interact with TableStore.

Common utility options are also available.

Examples

Execute a statement.

scalardl-tablestore execute-statement --properties client.properties --statement "SELECT * FROM employee WHERE id = '1001'"

For details about the grammar of SQL statements, see ScalarDL TableStore SQL Grammar.

validate-ledger

Validate a specified record, index record or table schema in TableStore.

Options

OptionDescription
--config, --propertiesA configuration file in the .properties format.
--table-nameThe name of the table.
--primary-key-column-nameThe primary key column name of the record.
--index-key-column-nameThe index key column name of the record.
--column-valueThe column value of the primary key or the index key as a JSON string.
--start-ageThe start age for the validation range.
--end-ageThe end age for the validation range.

Common utility options are also available.

Examples

Validate a record with primary key for all ages.

scalardl-tablestore validate-ledger --properties client.properties --table-name employee --primary-key-column-name id --column-value '"1001"'

Validate a record with primary key from age 0 to age 10 only.

scalardl-tablestore validate-ledger --properties client.properties --table-name employee --primary-key-column-name id --column-value '"1001"' --start-age 0 --end-age 10

Validate an index record.

scalardl-tablestore validate-ledger --properties client.properties --table-name employee --index-key-column-name department --column-value '"sales"'

Validate a table schema.

scalardl-tablestore validate-ledger --properties client.properties --table-name employee

Common utility options

You can use the following options in all the commands above.

OptionDescription
-g, --use-gatewayA flag to use the gateway.
-h, --helpDisplay the help message of a command.
--stacktraceOutput the Java stack trace to the stderr stream.