Top.Mail.Ru
Adding and Configuring Tables
CTRL+K

Adding and Configuring Tables

In this article
  • Adding and Configuring Tables
  • Importing a Table
  • Creating a New Table
  • Connecting a Table from Storage
  • Viewing a Table
  • Storing System Tables
  • Working with Tables

All available tables are displayed on the Data Model tab. The table name must be unique within the workspace.

To create a new table, click Add table and then Create.

Creating tables

Importing a Table

To import a table from your computer, select Import. The file must contain a header. There must be no empty lines at the end of the file.

When uploading a table, specify the following:

  • Separator (; — semicolon, , — comma, | — vertical bar, / — forward slash, tab, space, or other)
  • Qualifier (' — single quotes or " — double quotes)
  • Encoding (UTF-8, UTF-8 BOM, or Windows-1251)

Importing a table

Note
  • You cannot upload multiple files at once.
  • You cannot upload an empty file as a table. The file must contain at least one column.
  • Values in square brackets [] are not recognized as arrays during import. To treat a column as an array, manually specify the type: Array(String).

Creating a New Table

When creating a new table, a dialog box opens where you can specify:

  • Table name
  • Column names and data types
  • Partitioning
  • Sorting

Creating a table

Table creation is available only if the following conditions are met:

  • A table name is specified
  • The table contains at least one column with both a name and a data type defined

For more information about data types, see Editing a Script.

To reorder columns while creating a table, hover over the move icon, click and hold, then drag the column to the desired position.

Reordering columns

Connecting a Table from Storage

Tables are connected to a workspace from a ClickHouse database whose server has been added in the Data Storages section. To add a table, click Connect. If tables exist in ClickHouse, a dialog box with their list appears. You cannot reconnect tables that are already connected to the workspace.

Connecting a table

Select the desired table and, in the preview mode, click Connect.

Uploaded and created tables are added to ClickHouse and can also be disconnected and reconnected.

Viewing a Table

To view a table’s contents, click the table. A console opens at the bottom.

Viewing a table

For convenience, you can resize the console by dragging its top border. To hide the console, click the close icon.

Expanding the panel

Storing System Tables

System tables are stored in the built-in file-based database. If you need to work with system tables, you can load them into ClickHouse using the Get system table script block. Other methods for working with system tables are not supported.

Working with Tables

To open a table’s context menu, click the three-dot icon. The following actions are available:

  • Export in the following formats (encoded in UTF-8):
    • .csv
    • .xls
    • .xlsx
  • Replace
  • Disconnect
  • Delete

Table actions

Important

When exporting a table to .csv, the first 200 million rows are exported. When exporting to .xls or .xlsx, the first one million rows are exported.

These actions are also available in the console that opens when you click a table.

Table actions_1

In addition to export, replace, disconnect, and delete, you can edit table settings. To do so, click the pencil icon.

Pencil button

In the side panel that opens, you can:

  • Change the table name
  • Edit existing columns
  • Add new columns using the + Add column button

Adding a column

To save your changes, click Save.

Saving changes

To modify a specific column, follow these steps:

  1. Click the three-dot icon next to the column name.
  2. In the context menu, click Edit.
  3. Make the necessary changes. You can:
    • Change the name
    • Change the data type
    • Toggle the NULLABLE property on or off
    • Add a column description
  4. Save your changes by clicking Save.

Editing columns

If the data type of one column does not match the data type of another during editing, an error message appears and the column reverts to its previous data type.

Warning

Creating columns with the Nullable property reduces performance. We recommend limiting the use of this property. For more information, see Known Issues and Limitations.

To delete a column, click the corresponding option in the context menu.

Deleting a column

Was the article helpful?

Yes
No
Previous
Data Model Configuration
We use cookies to improve our website for you.