Documentation Index

Fetch the complete documentation index at: https://kb.vastdata.com/llms.txt

Use this file to discover all available pages before exploring further.

Managing Tables

Prev Next

Creating a Table using the VAST Web UI

To create a database table using the VAST Web UI:

  1. From the left navigation menu, choose DataBase -> VAST Database.

  2. In the VAST Database page select the database and the schema in which you want to create a table, and then click Add Table.

  3. In the Add Table dialog, enter a name for the table in the Table Name field. The name must meet the requirements for S3 object names.

  4. To add a column, specify a name for the column in the Name field and select a data type from the Column Type dropdown.

    Column naming requirements are the same as for S3 object names.

    Depending on the data type you selected, you may need to complete additional fields as follows:

    • For the Decimal 128 data type, specify the Precision (the number of significant digits in a decimal) and the Scale (the number of digits after the decimal point).

    • For the Timestamp data type, specify the time Unit.

    • For the List data type, select a data type for the list items from the Item Type dropdown.

    • For the Map data type, select a data type for the key from the Key Type dropdown and for the value from the Value Type dropdown.

    • For the Struct data type, click + Add Struct Column and add nested columns as to the structure, as necessary.

    • For the Vector data type, enter a Size and Item Type for the vector.

    Note

    For information about data types supported by VAST Database, see Supported Data Types.

    Click Add New Column and repeat the above step to add more columns, as necessary.

  5. In the Additional Capabilities section, select additional capabilities for the table, then click Next. The selected capabilities are configured in the next step.

    • Vector indexing. This enables indexing on a vector database (a VAST database with at least one column of type vector). Follow the steps in Configuring Vector Indexing. This option cannot be selected together with either Table sorting or Partitions.

    • Table sorting. This enables sorting the table according to selected columns, to improve query performance. Follow the steps in Configuring Table Sorting. This option cannot be selected together with Vector indexing.

    • Partitions. This enables partitioning on the table, to improve query performance. Follow the steps in Configuring Table Partitioning. This option cannot be selected together with Vector indexing.

  6. Click Create. The table is added to the schema and displayed in the database tree.

Configuring Additional Capabilities for Database Tables

These are detailed steps for configuring the Additional Capabilities that you selected for the table.

Configuring Table Sorting

In this step, columns are selected to be used to sort the table. See Sorted Tables

  1. In the Table Additional Capabilities dialog, select the Table Sorting tab in the pane on the right.

  2. In the left pane, select up to four columns to be used as sorting columns, from the list of columns. Only columns of types that can be used for sorting are shown in the list. Click Add Columns To Table Sorting.

  3. In the right pane, the selected columns are shown, in the order in which table sorting will be done. To change the order, drag a column up or down.

  4. Click Create Table (or select the Partitions tab, to configure Partitions).

Configuring Table Partitioning

In this step, columns are selected to be used to partition the table, and transformation functions are set for each of them. See Database Partitioning

  1. In the Table Additional Capabilities dialog, select the Partitions tab in the pane on the right.

  2. In the left pane, select up to four columns to be used to partition the table, from the list of columns. Click Add Columns to Partitions.

  3. In the right pane select a column from the list in Column Name (these are the columns selected in the previous step). Select a transformation function for the column, from the list. A transformation function is a function applied to the column's value to determine which partition a row belongs to. See Supported Column Transformations for details about the supported transformation functions. Some functions may require an additional Value (for example, for Truncate, the width). Click Add Function to add the function to the list in the table. Repeat for all columns selected for partitioning.

  4. Click Create Table (or select the Table Sorting tab, to configure Table sorting).

Configuring Vector Indexing

In this step, a vector column in the table is selected to be indexed. This improves query performance on vectors in the table. See Vector Database Indexing.

  1. In the Table Additional Capabilities dialog, select a column from the list in the pane on the left, to be indexed. The column must be of type Vector. Only a single column can be indexed. Click Add Column to Vectoring.

  2. In the right pane, the selected column is shown. Select the distance function for the index:

    • Euclidean. The geometric distance between two vector endpoints. Similar vectors have smaller euclidean metrics.

    • Cosine (negative) inner product. The cosine of the angle between two vectors, in the range -1 to 1. Similar vectors have values near 1.

  3. Click Create Table.

Adding Columns to a Table using the VAST Web UI

You can add, modify and remove columns in VAST database tables using the VAST Web UI.

  1. From the left navigation menu, choose DataBase -> VAST DataBase.

  2. In the VAST DataBase page, navigate to the table you want to modify by clicking the database, the schema and the table name in the database tree.

  3. Click Add Column. Enter a Name, and select a data type from the Column Type dropdown.

    Column naming requirements are the same as for S3 object names.

    Depending on the column type you selected, complete additional fields as follows:

    • For the Decimal 128 data type, specify the Precision (the number of significant digits in a decimal) and the Scale (the number of digits after the decimal point).

    • For the Timestamp data type, specify the Timezone and time Unit.

    • For the List data type, select a data type for the list items from the Item Type dropdown.

    • For the Map data type, select a data type for the key from the Key Type dropdown and for the value from the Value Type dropdown.

    • For the Struct data type, use the + Add Struct Column button to add as many nested columns as you need.

    Note

    For information about data types supported by VAST Database, see Supported Data Types.

  4. Click Add New Column and repeat the previous step, to add additional columns.

  5. Click Create.

Renaming Columns in a Table using the VAST Web UI

  1. In the Database page, select database and schema containing the table.

  2. Expand the table to show the columns.

  3. Click edit-symbol.png opposite the column to be modified, then, in the Column name field above the list of columns, make changes to the column name and click Save.

Deleting Columns from a Table using the VAST Web UI

  1. In the Database page, select database and schema containing the table.

  2. Expand the table to show the columns.

  3. Click delete-symbol.png opposite the column to be removed, then confirm the deletion.

Viewing a Table using the VAST Web UI

To view a VAST database table, choose DataBase -> VAST DB and navigate to the table you want to view by clicking the database, the schema and the table name in the database tree.

For each table, the following information is displayed:

  • Created on: The date and time when the table was created.

  • Rows: The number of rows in the table (estimated).

  • Size: The table's logical size (estimated).

  • A list of table columns with indication of the following for each column:

    • Column name

    • Nested columns, if any (for data types that imply nesting)

    • Data type name

    • Unit of measurement, precision and scale, where applicable

The table page lets you rename or delete an existing table, and also manage table columns.

Renaming a Table using the VAST Web UI

To rename a database table via VAST Web UI:

  1. From the left navigation menu, choose DataBase -> VAST Database.

  2. In the VAST Database page that opens, navigate to the table you want to rename by clicking the database, the schema and the table name in the database tree.

  3. In the table page that opens, click Edit.png to the right of the table name.

  4. Type a new name for the table. The name must meet the requirements for S3 object names.

  5. Click Save.

Deleting a Table using the VAST Web UI

To delete a database table via VAST Web UI:

  1. From the left navigation menu, choose DataBase -> VAST Database.

  2. In the VAST Database page that opens, navigate to the table you want to delete by clicking the database, the schema and the table name in the database tree.

  3. In the table page that opens, choose Delete from the Actions(Actiion-menu-symbol.png) menu.

  4. Confirm the action in the confirmation prompt.

The table is deleted from the database.

Managing Tables using the VAST CLI

Use the following commands to manage VAST database tables:

Action

Command

List tables

table list

Create a table

table create

Rename a table

table rename

Delete a table

table delete

Show details for a table

table show

Managing Table Columns using the VAST CLI

Use the following commands to manage columns in VAST database tables:

Action

Command

List table columns

column list

Add one or more columns

table add-columns

Rename a column

column rename

Delete a column

column delete

Show details for a column

column show