A lightweight command-line tool for connecting to, managing, and querying your Regatta database clusters.
yum install ./regatta-connect-<version>.el7.x86_64.rpm
ls /opt/regatta/1.0/connect/cli/bin/client_cli
/opt/regatta/<version>/connect/cli/bin/client_cli
/opt/regatta/1.0/connect/cli/bin/client_cli
rdb>
rdb>\connect user=admin pass=RegattaDefault1234! url=aaa.bbb.ccc.ddd:ppp
Successfully connected to cluster
employees
CREATE TABLE employees ( employee_key INT PRIMARY KEY INDEX, employee_name VARCHAR(40) NOT NULL, employee_salary INT, employee_department VARCHAR(50) NOT NULL);
statement executed successfully
SHOW TABLES;
| TABLE_NAME | IS_READY | PRIMARY_KEY_COLUMN | DEVICES | ----------------------------------------------------------- | employees | true | employee_key | m10d1 |
INSERT INTO employees ( employee_key, employee_name, employee_salary, employee_department) VALUES (1,'John Doe', 10932, 'DevOps'), (2,'Richard Roe', 18324, 'Legal'), (3,'Jane Roe', 20411, 'SoftwareDev'), (4,'Rachel Roe', 19555, 'Support');
SELECT * from employees;
statement executed successfully | employee_key | employee_name | employee_salary | employee_department | ------------------------------------------------------------------------ | 1 | John Doe | 10932 | DevOps | | 2 | Richard Roe | 18324 | Legal | | 3 | Jane Roe | 20411 | SoftwareDev | | 4 | Rachel Roe | 19555 | Support |
SELECT employee_name, employee_salary FROM employees WHERE employee_salary > 18324;
statement executed successfully | employee_name | employee_salary | ----------------------------------- | Jane Roe | 20411 | | Rachel Roe | 19555 |
UPDATE employees SET employee_salary=20202 WHERE employee_name='Richard Roe';
SELECT
statement executed successfully | employee_name | employee_salary | ----------------------------------- | Richard Roe | 20202 | | Jane Roe | 20411 | | Rachel Roe | 19555 |
DELETE FROM employees WHERE employee_salary = ( SELECT MAX(employee_salary) FROM employees );
statement executed successfully | employee_name | employee_salary | ----------------------------------- | Richard Roe | 20202 | | Rachel Roe | 19555 |
DROP TABLE employees;
SHOW TABLES
statement executed successfully | TABLE_NAME | IS_READY | PRIMARY_KEY_COLUMN | DEVICES | TABLE_METADATA | -------------------------------------------------------------------------
Was this page helpful?