If you do decide to select the devices to where the table will be mapped, you may specify them.

NOTE: It’s an all-or-nothing option. You cannot specify the devices for the table and let Regatta select the devices for the indexes. If you decide to specify mapping, then you need to add all required mapping.

The first command should display the devices that are used in the cluster. We enter SHOW DEVICES in the CLI command line:

SHOW DEVICES

Then press SEND. In return we get the following:

Figure 10 SHOW DEVICES

The next command will be the CREATE TABLE command. This command will look as follows (note the usage of the devices). Let’s create a similar table called workers. Enter the following command:

CREATE TABLE workers (

 worker_key INT PRIMARY KEY INDEX WITH (devices = (m10d1)),

 worker_name VARCHAR(40) NOT NULL,

 worker_salary INT,

 worker_department VARCHAR(50) NOT NULL)

WITH (devices = (m10d1))

Running it will create the desired table.

Figure 11 CREATE TABLE mapped devices.

Enter the SQL command:

SHOW TABLES

In response, the following will be displayed:

Figure 12 Mapped devices table created.

We can see the table with all the columns and the device mapping.

We will continue here using the employees table.